<?php $__env->startSection("content"); ?>
        <!--LOOKER 資料-->
    <div class="col-md-12 video_whole look_container">    
        <div class="col-md-10 col-md-offset-1">
            <div class="row">
                <div class="col-md-6 page_title" style="padding-right:40px;">
                    <h2><?php echo $category->title; ?></h2><h2 style="margin-top:-10px;">LOOKNOW</h2>
                    <div class="col-md-12" style="margin-top:45px;">
                        
                        <div class="col-xs-10 col-xs-offset-2">
<?php /*                            <div class="text-right" style="z-index:999;margin-top:200px;margin-left:30px;    position: absolute;left: -109px;" >
                                <img style="width:100%;"  src="../../../images/icons/line_bg_01.png">
                                <br>
                                <span style="margin-right:5px;"><?php echo date("Y M m",strtotime($article->created_at)); ?></span>
                            </div>
                            <?php echo HTML::image($article->img_path,"",['class' => "video"]); ?>

*/ ?>
<div class="text-right" style="z-index:999;margin-top:50%;margin-left:30px;    position: absolute;left: -106px;" >
                                <img style="width:100%;"  src="<?php echo asset('images/icons/line_bg_01.png'); ?>">
                                <br>
                                <span style="margin-right:5px;    line-height: 35px;"><?php echo date("Y M m",strtotime($article->created_at)); ?></span>
                            </div>
 <iframe class="video" src="https://www.youtube.com/embed/t75J7gfrPNs?rel=1&controls=1&showinfo=0&autohide=2&autoplay=1" frameborder="0" allowfullscreen></iframe>


                        </div>
                    </div>

                </div>


                <div class="col-md-6 video_looker" id="likes">
                        <div class="col-md-3">
                            <a href="<?php echo URL::to('admin/front/lookerinfo/'.$looker->id); ?>">
                                <?php echo HTML::image($looker->photo,"",['class'=>"img-circle",'style'=>'width:100px;height:100px']); ?>

                                <!--img class="media-object" src="../../images/head.jpg"--><!--大頭照-->
                            </a>
                        </div>
                        <div class="col-md-5" style="padding-left:20px; padding-top: 20px;">
                            <h3 class="media-heading"><b><?php echo $looker->name; ?></b></h3>
                            <p><b><?php echo $looker->follow_num; ?> followers</b></p>
                        </div>
                        <div class="col-md-4" style="padding-left:35px; padding-top: 20px; margin-bottom: 30px;">
                        <?php if($isfollow): ?>
                            <a onclick=" return(chk_login());" href="<?php echo URL::to('admin/front/actions/LOOKER/'.$article->blogger_id.'/FOLLOW/'.$article->blogger_id.'#follow'); ?>" name="follow" class="btn btn-default social_btn actived">   <!--追蹤-->
                                Followed
                        <?php else: ?>
                            <a onclick="return(chk_login());" href="<?php echo URL::to('admin/front/actions/LOOKER/'.$article->blogger_id.'/FOLLOW/'.$article->blogger_id.'#follow'); ?>" name="follow" class="btn btn-default social_btn unactive">   <!--追蹤-->
                                +Follow
                        <?php endif; ?>
                            </a>
                        </div>


                    <div class="col-md-12 video_title">
                        <a class="video_like">
                            <img style="margin-bottom: 2px;" height="16" src="../../../images/icons/icon_like_on.png" /><span class="like_count"><?php echo $like_this; ?></span></a>

                        <h1 style="clear:both;"><?php echo $article->title; ?></h1>
			<!--h2 style="font-size:30px;">沒關係，是熱天阿。</h2-->

                    </div>

                    <div class="col-md-12 video_body">
                        <br>
			<?php echo html_entity_decode($article->description); ?>
<?php /*                        <?php echo $article->description; ?>*/ ?>

                        <br>
                        <br>
                                            
                        <?php if(isset($article->tag1) && $article->tag1 !=""): ?>
                        <a href="<?php echo URL::to('admin/front/?tag='.$article->tag1.'#content'); ?>" class="video_tag">#<?php echo $article->tag1; ?></a><?php endif; ?>
                        <?php if(isset($article->tag2) && $article->tag1 !=""): ?>
                        <a href="<?php echo URL::to('admin/front/?tag='.$article->tag2.'#content'); ?>" class="video_tag">#<?php echo $article->tag2; ?></a><?php endif; ?>
                        <?php if(isset($article->tag3) && $article->tag1 !=""): ?>
                        <a href="<?php echo URL::to('admin/front/?tag='.$article->tag3.'#content'); ?>" class="video_tag">#<?php echo $article->tag3; ?></a><?php endif; ?>
                        <?php if(isset($article->mention_product)): ?>
                        <a class="video_tag product_tag">@ <?php echo $article->mention_product; ?></a><?php endif; ?>


                    <!--div class="col-md-12 video_product">
                        <a href="#">
			    <img class="video_product_img" src="../../../images/pro.jpg">
                            <span class="video_product_name">貓絕魅惑眼線液</span>
                        </a>
                    </div-->

                    <div class="video_share">
                        <?php if($islike): ?>
                        <a onclick="return(chk_login());" href="<?php echo URL::to('admin/front/like/'.$article->id.'/'.$article->blogger_id.'#likes'); ?>" class="btn btn-default social_btn actived">
                            <img style="margin-bottom: 2px;" height="12" src="../../../images/icons/icon_like_on.png" /><span class="like_count_button">Liked</span></a>
                        <?php else: ?>
                        <a onclick="return(chk_login());" href="<?php echo URL::to('admin/front/like/'.$article->id.'/'.$article->blogger_id.'#likes'); ?>" class="btn btn-default social_btn unactive">
                            <img style="margin-bottom: 2px;" height="12" src="../../../images/icons/icon_like_off.png" /><span id="like" class="like_count_button">Like</span></a>
                        <?php endif; ?>
                        </a>
                        <?php if($is_collect): ?>
                        <a onclick="return(chk_login());" href="<?php echo URL::to('admin/front/actions/ARTICLE/'.$article->id.'/COLLECT/'.$article->blogger_id.'#likes'); ?>" class="btn btn-default social_btn actived">
                           <img style="margin-bottom: 2px;" height="12" src="../../../images/icons/favorites.png" /><span class="like_count_button">已收藏</span></a>
                        <?php else: ?>
                        <a onclick="return(chk_login());"  href="<?php echo URL::to('admin/front/actions/ARTICLE/'.$article->id.'/COLLECT/'.$article->blogger_id.'#likes'); ?>" class="btn btn-default social_btn unactive">
                            <img style="margin-bottom: 2px;" height="12" src="../../../images/icons/favorites.png" /><span class="like_count_button">收藏</span></a>
                        <?php endif; ?>
                        </a>
                        <a class="btn btn-default social_btn" onclick="share('<?php echo URL::to('admin/front/video/'.$article->id); ?>','<?php echo $article->id; ?>','<?php echo $article->blogger_id; ?>');">
			    <img style="margin-bottom: 2px;" height="12" src="<?php echo asset('images/icons/icon_fb.png'); ?>" />
                            <span class="like_count_button">分享</span>
                        </a>

                   </div>

                 </div>

                </div>
            </div>
        </div>
    </div>



        <div class="col-md-12 comments look_container">
	    <div class="col-md-10 col-md-offset-1">
        <?php foreach($comments as $comment): ?>
            <div class="col-md-10 col-md-offset-1 comments2">
		<?php if($comment_num %2 ==0): ?>               
                    <div class="dialog_left"> 
		<?php else: ?>
                    <div class="dialog_right"> 
		<?php endif; ?>
	<?php if($comment_num +2 == count($comments)): ?>
	<!--下錨點-->
	<a name="finish_comment" />
	<?php endif; ?>
		    <div class="media">
                        <div class="media-left">
                            <a href="#">
                                <?php echo HTML::image($comment->img_path,"",['class' => "img-circle",'style'=>'width:75px;height:75px;']); ?>

                            </a>
                        </div>
                        <div class="media-body" style="    vertical-align: middle;padding-left:20px;">
                            <h6 class="media-heading"><b><?php echo $comment->commender; ?></b></h6>
                            <p style="margin:0px;"><?php echo $comment->comment_content; ?></p>
                        </div>
                    </div>
                    </div>

            </div> <!--col-md-10 col-md-offset-1 comments2-->
	<?php $comment_num++; ?>
        <?php endforeach; ?>
 <!--foreach-->
	<hr class="point" style="top:30px;">
	
            <div class="col-md-10 col-md-offset-1">        
		    <?php echo Form::open(array('action'=>'FrontController@postNewcomment', 'class'=>'form-inline', 'style'=>"z-index:999;margin-top:50px;")); ?>

                      <div class="form-group col-xs-2" style="    text-align: right;">
                        <div class="input-group">
			 <?php if($userinfo == 'visitor'): ?>
			     <img class="img-circle" style="width:50px;height:50px; margin-top: -9px;" src = "http://img4.wikia.nocookie.net/__cb20130205144914/glee-new-beginnings/images/f/fd/Unknown.gif">
			 <?php else: ?>
                             <?php echo HTML::image($userinfo,"",['class' => "img-circle",'style'=>'width:50px;height:50px; margin-top: -9px;']); ?>

			 <?php endif; ?>
                        </div>
                      </div>
                      <div class="form-group col-xs-8 text_input">   
                                    <?php echo Form::hidden('article_id',$article->id); ?>

                                    <?php echo Form::hidden('blogger_id',$article->blogger_id); ?>

                        <input name="comment_content" id = "GoComment" style="width:100%;" type="text" class="form-control" id="exampleInputEmail2" placeholder=" 我也想說說~(*^O^*)/">
                      </div>
                      <div class="form-group col-xs-2 submit">
                        <button onclick="return(chk_login());" type="submit" id = "submit" style="width:100%;"  class="btn btn-default">送出</button>
                      </div>
		    <?php echo Form::close(); ?>

            </div>


            <div class="col-md-10 col-md-offset-1 page_title" style="padding-bottom:20px;">
                <center><h2 class="times clear" style="margin:45px auto;">RELATED</h2></center>


                <?php foreach($other_articles as $other_article): ?>
                    
                        <div class="window col-md-4">
                          <div class="post">
                            <div>
                                <div class="col-xs-2 narrow">
                                <a href="<?php echo URL::to('admin/front/lookerinfo/'.$other_article->blogger_id); ?>">
                                     <?php echo HTML::image($other_article->blogger_img,"",['class' => "media-object img-circle img-responsive"]); ?>

                                    <!--img class="media-object img-circle" src="../../images/head.jpg"-->
                                </a>

                                </div>
                                <div class="col-xs-6 narrow">
                                    <div style="margin-left:7px;">
                                        <p class="looker_name media-heading"><?php echo $other_article->blogger_name; ?></p>
                                        <p class="post_date"><?php echo date("Y M d",strtotime($other_article->created_at)); ?></p>
                                    </div>

                                </div>
                                <div class="col-xs-4 narrow">
                                    <a class='like' href="#like" onclick="oneAction('ARTICLE','<?php echo $other_article->id; ?>','LIKE','<?php echo $other_article->blogger_id; ?>');" <?php /* href="<?php echo URL::to('admin/article/like/'.$other_article->id.'/'.$other_article->blogger_id); ?>"*/ ?>>
                                    <img id = "ARTICLE_<?php echo $other_article->id; ?>" style="margin-bottom: 2px;" height="16" onload="islike(<?php echo $other_article->id; ?>)" src="../../../images/icons/icon_like_off.png"/>
                                    <span class="like_count" id="like_<?php echo $other_article->id; ?>"><?php echo $other_article->likes; ?></span>

                                </div>
                            </div>

                                    <a href="<?php echo URL::to('admin/front/video/'.$other_article->id); ?>">
                            <h2 class="post_title"><?php echo $other_article->title; ?></h2>
				    </a>

                                    <a href="<?php echo URL::to('admin/front/video/'.$other_article->id); ?>">
                           <div class="screen">
                                <div class="product">
                                    <?php echo HTML::image($other_article->img_path,"",['class' => "media-object",'style'=>'width:100%;height:100%']); ?>

				
				     <img class="newest_post" src="<?php echo asset('images/icons/new_bg.png'); ?>">
                                    <!--img src="../../images/product.jpg"-->
                                </div>
                                <div class="cover">
                                    <img style="margin-top: 45%;"  src="../../../images/icons/logo_white.png" />
                                </div>
                            </div>
                                    </a>
                          </div>
                        </div>

                <?php endforeach; ?>
                                <!--endforeach-->



            </div>
	</div>

            
        </div>

         <script>(function(d, s, id) {
   var js, fjs = d.getElementsByTagName(s)[0];
   if (d.getElementById(id)) return;
   js = d.createElement(s); js.id = id;
   js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4&appId=558716530932928";
   fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'facebook-jssdk'));

 function share(url,article_id,blogger_id) {
   FB.ui({
     method: 'share',
     href: url,
   }, function(response){});
         action = "SHARE";
         location_url = "<?php echo URL::to('admin/article/actions/'); ?>"+'/'+article_id+'/'+action +'/'+ blogger_id;
        window.location.assign(location_url);
 }

           $(function(){
                $(window).resize(function(){    
                    x = $('.fanpage').innerHeight();
                    y = $('#since').innerHeight();
                    z = (x - y)/2;
                    $('#since').css('margin-top',z);
                });
                $(document).ready(function(){           
                    x = $('.fanpage').innerHeight();
                    y = $('#since').innerHeight();
                    z = (x - y)/2;
                    $('#since').css('margin-top',z);
                });
            });

        $('.screen').mouseenter(function(){
            $(this).children('.cover').fadeIn("fast");
        });

        $('.screen').mouseleave(function(){
            $(this).children('.cover').fadeOut("fast");
        });


/*	$("#GoComment").keyup(function(){
		if($(this).val() != "")
			$("#submit").removeClass('hidden');
		else
			$("#submit").addClass('hidden');
	});
*/
</script>
<script>
//////ajax/////////
function videoAction(thisObject,object_id,action,blogger_id,type){
        var elementId = thisObject +'_' +object_id;
        var likeNum = '#like_' +object_id;
        var user_id = "<?php echo Session::get('userId'); ?>";
        var URLs = "<?php echo URL::to('admin/front/oneAction'); ?>";
        $.get(URLs, {"object":thisObject ,"object_id":object_id,"action":action, "user_id":user_id,"blogger_id":blogger_id}, function(showview){
                if(showview['show'] >0)
                        $("#"+elementId).attr("src","<?php echo asset('images/icons/icon_like_on.png'); ?>");
                        //document.getElementById(elementId).setAttribute("src","<?php echo asset('images/icons/icon_like_on.png'); ?>");
                else
                        document.getElementById(elementId).setAttribute("src","<?php echo asset('images/icons/icon_like_off.png'); ?>");
                $(likeNum).text(showview['num']);
        });
}
</script>
 <script>

                                $(function(){
                                    $(window).resize(function(){    
                                        video_width = $('.video').width();
                                        video_height = video_width * 360 / 202;//依照影片比例調整大小
                                        $('.video').css('height',video_height);
                                    });
                                    $(document).ready(function(){           
                                        video_width = $('.video').width();
                                        video_height = video_width * 360 / 202;
                                        $('.video').css('height',video_height);
                                    });
                                });
                                

                                </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.basic_front', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>