 

<?php $__env->startSection("content"); ?>
    <div class="col-md-12 look_container" style="padding-bottom:60px;">    
        <div class="col-md-10 col-md-offset-1">
            <div class="row">
                <div class="col-md-3 page_title" style="padding-right:40px;">
                    <h2>LOOKER</h2><h2 style="margin-top:-10px;">INFO</h2>
                </div>


                <div class="col-md-6 text-center">
                    <div style="margin:30px 0px;">
                            <a href="#" >
                                <?php echo HTML::image($user->img_path,"",['class'=>"img-circle",'style'=>'width:100px;height:100px']); ?>

                            </a>
                            <h1 style="clear:both;margin-bottom:30px;"><?php echo $user->name; ?></h1>
		 <?php if($user->login_type != 'Facebook'): ?>
                            <a href="#" class="btn btn-default social_btn" id="UserEdit"><img style="margin-bottom: 2px;" height="20" src="<?php echo asset('images/icons/icon_setting.png'); ?>" /><span id="like" class="like_count_button liked">編輯個人資料</span></a>
		
		 <?php else: ?>
			<a href="#" class="btn btn-default social_btn disabled"><img style="margin-bottom: 2px;" height="20" src="<?php echo asset('images/icons/icon_setting.png'); ?>" /><span class="like_count_button liked">編輯個人資料</span></a>
		 <?php endif; ?>
                    </div>

                </div>
            </div>

        </div>
    </div>

    <div class="col-md-12 looker_info_ban">
        <div class="col-md-4 col-md-offset-4 text-center">

            <div class="col-xs-6 left_wave">
                <a href="#post_tab" id ="posts_tab" ><p>Favorate Posts</p>
                <h2><?php echo $collect_num; ?></h2>
		</a>
            </div>
            <div id="follower" class="col-xs-6">
                <a href="#follows_tab" id ="follows_tab" ><p>Follow</p>
                <h2><?php echo $follow_num; ?></h2>
		</a>
            </div>

        </div>
    </div>

	<div class="col-md-12 comments look_container">
            <div class="col-md-10 col-md-offset-1">

            <div class="col-md-10 col-md-offset-1 page_title" style="padding-bottom:20px;" id ="anchor">
	<div  id='articles'>
		<?php foreach($articles as $article): ?>
                <?php if($_FRONTCONST["COL_COUNT"] % 3 ==1): ?>
                    <div class="row">
                <?php endif; ?>
                        <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/'.$article->blogger_id); ?>">
                                     <?php echo HTML::image($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 $article->blogger_name; ?></p>
                                        <p class="post_date"><?php echo date("Y M d",strtotime($article->created_at)); ?></p>
                                    </div>

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

                                </div>
                            </div>

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

                                    <a href="<?php echo URL::to('admin/front/video/'.$article->id); ?>">
                           <div class="screen">
                                <div class="product">
                                    <?php echo HTML::image($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="<?php echo asset('images/icons/logo_white.png'); ?>" />
                                </div>
                            </div>
                                    </a>
                          </div>
                        </div>

                <?php if($_FRONTCONST["COL_COUNT"] % 3 ==0 || $_FRONTCONST["COL_COUNT"] == count($articles)): ?>
                    </div><br>
                <?php endif; ?>
                <?php $_FRONTCONST["COL_COUNT"]++; ?>
		<?php endforeach; ?>
	<?php if($load_start != 'all'): ?>
        <div class="col-xs-12 text-center more">
            <a href="<?php echo URL::to('admin/front/profile/'.$load_start.'#anchor'); ?>"><span class="more">LOOOK</span></a>
        </div>
	<?php endif; ?>
	
	</div> <!--id = articles-->

        <!-- follower -->
        <div id="follower" class="col-md-12">
        <div id="follower2">
                <?php foreach($follows as $follow): ?>
                <div class="follower_list text-center">
                         <a href="<?php echo URL::to('admin/front/lookerinfo/'.$follow->id); ?>">
                        <?php echo HTML::image($follow->photo,"",['class' => "img-circle",'style'=>'width:100%;']); ?>

                        </a>
                </div>
                <?php endforeach; ?>
            </div>
       </div>
        <!-- end follow -->

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

<div class="col-lg-12 login_wraper hidden">
    <div class="col-lg-6 col-lg-offset-3 login">
        <div class="col-lg-12 page_title" style="border:1px solid #555;height:100%;    float: left;">
              <div class="col-lg-10 col-lg-offset-1 text-center">
                <h2>PERSONAL INFORMATION</h2>
              </div>
              <div class="col-lg-12">
                  <hr class="point">
              </div>

              <div class="col-lg-12 ">


                <div class="col-md-4" style="margin-bottom:0px;">
                <form enctype="multipart/form-data" action="<?php echo URL::to('admin/user/useredit'); ?>" method="post" style="padding-bottom:30px;">
                  <input name="img_path" type="file" onchange="loadFile(event)">
		  <?php echo HTML::image($user->img_path,"",['style'=>'width:100px;margin-bottom:10px','id'=>"img_show"]); ?>

                  <button style="width:100%;margin-bottom:30px;" type="sumbit" class="btn btn-default">Upload Photo</button>
                </form>    
                </div>
                    <div class="col-md-8">
                      <form enctype="multipart/form-data" action="<?php echo URL::to('admin/user/useredit'); ?>" method="post" style="padding-bottom:30px;">
                        <div class="form-group">
                          <label>變更使用者名稱</label>
                          <input style="height:45px;" name = "user_name" type="text" class="form-control" id="exampleInputEmail1" value="<?php echo $user->name; ?>">
                        </div>
                        <div class="form-group">
                          <label>變更密碼</label>
                          <input style="height:45px;" name = "pre_password"  type="password" class="form-control" id="exampleInputPassword1" placeholder="原密碼">
                        </div>
                        <div class="form-group">
                          <input style="height:45px;" name = "new_password" type="password" class="form-control" id="exampleInputPassword1" placeholder="新密碼">
                        </div>
                        <div class="form-group">
                          <input style="height:45px;" name = "check_password" type="password" class="form-control" id="exampleInputPassword1" placeholder="確認新密碼">
                        </div>
                        
                        
                        <button type="submit" class="btn btn-default social_btn">確認</button>
                      </form> 
                  </div>
              </div>

        </div>
    </div>        




</div>
<script>
$(function(){
$('#follower2').fadeOut();
});
        $("#posts_tab").click(function(){
                $('#articles').fadeIn();
                $('#follower2').fadeOut();
        });
        $("#follows_tab").click(function(){
                $('#articles').fadeOut();
                $('#follower2').fadeIn();
        });
</script>
<script>

          $(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);
                });
            });
        
        //點黑色遮罩，隱藏LOGIN

        $('.login').mouseenter(function(){
            $('.login_wraper').removeClass( "hidelogin" );
        });

        $('.login').mouseleave(function(){
            $('.login_wraper').addClass( "hidelogin" );
        });

        $('.login').click(function(){
            $('.login_wraper').css('display','block');

        });

        $('.login_wraper').click(function(){
            $('.hidelogin').fadeOut();
        });

	//點擊編輯
        $('#UserEdit').click(function(){
            $('.login_wraper').removeClass( "hidden" );
            $('.hidelogin').fadeIn();
        });

//  上傳大頭照
        var loadFile = function(event){
                var reader = new FileReader();
                reader.onload = function(){
                        var output = document.getElementById('img_show');
                        output.src = reader.result;
                };
        reader.readAsDataURL(event.target.files[0]);
        };
</script>


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

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