<div class="ucenter-avatar">
    <div class="panel panel-default">
        <div class="panel-heading">个人主页</div>
        <div class="panel-body">
            <img class="thumbnail" src="{{showImg .User.Avatar "avatar"}}" alt="{{.User.Nickname}}">
            <div class="ucenter-info">
                <h3>
                    <span>{{.User.Nickname}}</span>
                    <small class="text-muted">(@{{.User.Account}})</small>
                    {{if .IsSelf}}
                    <span class="sign-rule">
                        <small class="text-muted">|</small>
                        <a href="/read/help/sign-rule.md" title="签到规则" target="_blank"><small>签到规则</small></a>
                    </span>
                    {{end}}
                </h3>
                <div class="btns">
                    {{if .IsSelf}}
                        <a target="_blank" href="{{urlfor "SettingController.Index"}}" class="btn btn-success btn-sm"><i class="fa fa-cogs"></i> 个人设置</a>
                        {{if .IsSignedToday}}
                            <a target="_blank" href="javascript:void(0);" class="btn btn-success btn-sm disabled"><i class="fa fa-calendar-check-o"></i> 今日已签到</a>
                        {{else}}
                            <a target="_blank" href="{{urlfor "BaseController.SignToday"}}" class="btn btn-success btn-sm ajax-get"><i class="fa fa-calendar-plus-o"></i> 每日签到</a>
                        {{end}}

                        {{if gt .LatestSign.Id 0}}
                            <div class="help-block text-left">
                                <div><small class="text-muted">最近一次签到:  </small> <span class="text-success">{{date .LatestSign.CreatedAt "Y-m-d H:i:s"}}</span></div>
                                <div><small class="text-muted">阅读时长增加:  </small> <span class="text-red">{{.LatestSign.Reward}}</span> <small class="text-muted">秒</small></div>
                            </div>
                        {{end}}

                    {{else}}
                        {{if (IsFollow .User.MemberId  .Member.MemberId)}}
                            <a href="{{urlfor "BaseController.SetFollow" ":uid" .User.MemberId}}" class="btn btn-default btn-sm btn-cancel"><i class="fa fa-heart text-danger"></i> 取消关注</a>
                        {{else}}
                            <a href="{{urlfor "BaseController.SetFollow" ":uid" .User.MemberId}}" class="btn btn-success btn-sm btn-follow"><i class="fa fa-heart-o"></i> 关注Ta</a>
                        {{end}}
                    {{end}}
                </div>
                <div class="user-stat">
                    <ul>
                        <li>
                            <span>加入网站</span> <span>{{.JoinedDays}}</span> <small>天</small>
                        </li>
                        <li>
                            <span>连续签到</span> <span>{{.User.TotalContinuousSign}}</span> <small>天</small>
                        </li>
                        <li>
                            <span>最高连签</span> <span>{{.User.HistoryTotalContinuousSign}}</span> <small>天</small>
                        </li>

                        <li>
                            <span>累计签到</span> <span>{{.User.TotalSign}}</span> <small>天</small>
                        </li>
                        <li>
                            <span>今日阅读</span> {{str2html .TodayReading}}
                        </li>
                        <li>
                            <span>本周阅读</span> {{str2html .WeekReading}}
                        </li>
                        <li>
                            <span>本月阅读</span> {{str2html .MonthReading}}
                        </li>
                        <li>
                            <span>累计阅读</span> {{str2html .TotalReading}}
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix">

    </div>
</div>
