github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/templates/user/index.html (about)

     1  {% extends "../base.html" %}
     2  
     3  {% block title %}
     4  <title>{{userProfile.Username}} - {{SiteName}}</title>
     5  {% endblock title %}
     6  
     7  {% block mainland %}
     8  <div id="main" class="container">
     9      <section class="hbox stretch" style="margin-bottom:1em;">
    10          {% include "./sidebar.html" %}
    11          <aside class="bg-white">
    12              <section class="vbox">
    13                  <header class="header bg-light lt">
    14                      <ul class="nav nav-tabs nav-white">
    15                          <li class="active">
    16                              <a href="#m1" data-toggle="tab">最近回复</a>
    17                          </li>
    18                          <li class="">
    19                              <a href="#m2" data-toggle="tab">最近话题</a>
    20                          </li>
    21                          <li class="">
    22                              <a href="#m3" data-toggle="tab">话题收藏</a>
    23                          </li>
    24                      </ul>
    25                  </header>
    26                  <section class="scrollable">
    27                      <div class="tab-content">
    28                          <div class="tab-pane active" id="m1">
    29                              {% if replys %}
    30                                  <ul class="list-group no-radius m-b-none m-t-n-xxs list-group-lg no-border">
    31                                      {% for reply in replys %}
    32                                      <li class="list-group-item">
    33                                          <a href="/user/{{reply.Reply.Author}}/" class="thumb-sm pull-left m-r-sm">
    34                                              <img src="{% if userProfile.AvatarMedium %}{{File(userProfile.AvatarMedium)}}{% else %}/identicon/{{userProfile.Username}}/48/default.png{% endif %}" class="img-circle"></a>
    35                                              <small class="pull-right">{{TimeSince(reply.Reply.Created)}}</small>
    36                                              <strong class="block">
    37                                              <a class="color-link" target="_blank" href="/topic/{{reply.Reply.Tid}}/">
    38                                                  {% with s=Htm2Str(reply.Topic.Title) %}
    39                                                    {%if not s %}
    40                                                      {{ reply.Reply.Author }} {{TimeSince(reply.Reply.Created)}} 回应了话题#{{reply.Reply.Tid}}
    41                                                    {%else%}
    42                                                      {{Cropword(s,0,48,"...")}}
    43                                                    {%endif%}
    44                                                  {% endwith %}
    45                                              </a>
    46                                              </strong>
    47                                              <h4>
    48                                              <a href="/topic/{{reply.Reply.Tid}}/#reply{{reply.Reply.Id}}" rel="floor-link">#{{reply.Reply.Id}}
    49                                                  {% with s=Htm2Str(reply.Reply.Content) %}
    50                                                    {%if not s %}
    51                                                      {{ reply.Reply.Author }} {{TimeSince(reply.Reply.Created)}} 回应了话题#{{reply.Reply.Tid}}
    52                                                    {%else%}
    53                                                      {{Cropword(s,0,48,"...")}}
    54                                                    {%endif%}
    55                                                  {% endwith %}
    56                                              </a>
    57                                              </h4>
    58                                      </li>
    59                                      {% endfor %}
    60                                  </ul>
    61                                  {% if replys|length >= 10 %}
    62                                      <div class="cell last low">
    63                                          <span class="pull-right"><a href="/user/{{userProfile.Username}}/replys/"><i class="icon-caret-right"></i> 更多回复</a></span>
    64                                          <span class="clearfix"></span>
    65                                      </div>
    66                                  {% endif %}
    67                              {% else %}
    68                                  <div class="cell post-list last">这是一个没有节操的家伙.</div>
    69                              {% endif %}
    70                          </div>
    71                          <div class="tab-pane" id="m2">
    72                                  {% if topics %}
    73                                      <ul class="list-group no-radius m-b-none m-t-n-xxs list-group-lg no-border">
    74                                          {% for topic in topics %}
    75                                              <li class="list-group-item">
    76                                                  <a href="/user/{{userProfile.Username}}/" class="thumb-sm pull-right m-r-sm"><img src="{% if userProfile.AvatarLarge %}{{File(userProfile.AvatarMedium)}}{% else %}/identicon/{{userProfile.Username}}/48/default.png{% endif %}" class="img-circle">
    77                                              </a>
    78                                                  <h4 class="title">
    79                                                      <a href="/topic/{{topic.Id}}/">
    80                                                          {% with s=Htm2Str(topic.Title) %}
    81                                                                    {%if not s %}
    82                                                                      {{ topic.Author }} {{TimeSince(topic.Created)}} 发布了话题#{{topic.Id}}
    83                                                                    {%else%}
    84                                                                      {{Cropword(s,0,48,"...")}}
    85                                                                    {%endif%}
    86                                                          {% endwith %}
    87                                                      </a>
    88                                                  </h4>
    89                                                  <div class="meta">
    90                                                      {% if topic.Category %}
    91                                                      <a class="tag" href="/category/{{ topic.Cid }}/">{{ topic.Category }}</a> •
    92                                                      {% endif %}
    93                                                      {% if topic.Node %}
    94                                                      <a class="tag" href="/node/{{ topic.Nid }}/">{{ topic.Node }}</a> •
    95                                                      {% endif %}
    96                                                      <span class="time">{{Unix2Time(topic.Created,"2006.01.02 15:04")}}</span>
    97                                                      •
    98                                                      {% if topic.ReplyLastUsername %}
    99                                                      <span class="last-reply">
   100                                                          最后回复来自
   101                                                          <a href="/user/{{topic.ReplyLastUsername}}/">{{topic.ReplyLastUsername}}</a>
   102                                                      </span>
   103                                                      {% endif %}
   104                                                      {% if topic.ReplyCount %}
   105                                                      <div class="data hidden-xs pull-right">
   106                                                          {{topic.ReplyCount}}
   107                                                          <i class="icon-comment"></i>
   108                                                          个回复
   109                                                      </div>
   110                                                      {% endif %}
   111                                                  </div>
   112                                              </li>
   113                                          {% endfor %}
   114                                      </ul>
   115                                  {% if topics|length >= 10 %}
   116                                      <div class="cell last low">
   117                                          <span class="pull-right"><a href="/user/{{userProfile.Username}}/topics/"><i class="icon-caret-right"></i> 更多话题</a></span>
   118                                          <span class="clearfix"></span>
   119                                      </div>
   120                                  {% endif %}
   121                                  {% else %}
   122                                  <div class="cell post-list last">这是一个没有节操的家伙.</div>
   123                                  {% endif %}
   124                          </div>
   125                          <div class="tab-pane" id="m3">
   126                              {% if favorites %}
   127                                  <ul class="list-group no-radius m-b-none m-t-n-xxs list-group-lg no-border">
   128                                      {% for favorite in favorites %}
   129                                      <li class="list-group-item">
   130                                          <a href="/user/{{favorite.User.Username}}/" class="thumb-sm pull-right m-r-sm"><img src="{% if favorite.User.AvatarLarge %}{{File(favorite.User.AvatarMedium)}}{% else %}/identicon/{{favorite.User.Username}}/48/default.png{% endif %}" class="img-circle">
   131                                          </a>
   132                                          <span>
   133                                              {% if favorite.Topic.Title %}
   134                                                  <h4 class="block">
   135                                                      <a href="/topic/{{favorite.TopicMark.Tid}}/">
   136                                                          {% with s=Htm2Str(favorite.Topic.Title) %}
   137                                                                    {%if not s %}
   138                                                                      {{ favorite.Topic.Author }} {{TimeSince(favorite.Topic.Created)}} 发布了话题#{{favorite.TopicMark.Tid}}
   139                                                                    {%else%}
   140                                                                      {{Cropword(s,0,48,"...")}}
   141                                                                    {%endif%}
   142                                                          {% endwith %}
   143                                                      </a>
   144                                                  </h4>
   145                                              {% endif %}
   146                                              <small>
   147                                                  {% if favorite.Topic.Category %}
   148                                                  <a class="tag" href="/category/{{ favorite.Topic.Cid }}/">{{ favorite.Topic.Category }}</a> •
   149                                                  {% endif %}
   150                                                  <a class="tag" href="/node/{{favorite.Topic.Node}}/">{{favorite.Topic.Node}}</a>
   151                                                  •
   152                                                  {% if favorite.User.Username %}
   153                                                  <a href="/user/{{favorite.User.Username}}/">{{favorite.User.Username}}</a>
   154                                                  •
   155                                                  {% endif %}
   156                                                  {% if favorite.Topic.Created %}
   157                                                      <span class="time">{{TimeSince(favorite.Topic.Created)}}发布</span> •
   158                                                  {% endif %}
   159                                                  {% if favorite.Topic.ReplyLastUsername %}
   160                                                  <span class="last-reply">
   161                                                      <a href="/user/{{favorite.Topic.ReplyLastUsername}}/">{{favorite.Topic.ReplyLastUsername}}</a>
   162                                                  </span>
   163                                                  {% endif %}
   164                                                  {% if favorite.Topic.ReplyTime %}
   165                                                      <span class="time">最后回复于{{Unix2Time(favorite.Topic.ReplyTime,"2006.01.02 15:04")}}</span>
   166                                                      •
   167                                                  {% endif %}
   168  
   169                                                  {% if favorite.Topic.Views %}
   170                                                      <div class="data hidden-xs pull-right">
   171                                                          {% if favorite.Topic.ReplyCount %} {{ favorite.Topic.ReplyCount }} <i class="icon-comment"></i>个回复{% endif %}{% if favorite.Topic.Views %}
   172                                                          {{ favorite.Topic.Views }} <i class="icon-eye-open"></i>次浏览{% endif %}
   173                                                      </div>
   174                                                  {% endif %}
   175                                              </small>
   176                                          </span>
   177                                          <div class="clear"></div>
   178                                      </li>
   179                                      {% endfor %}
   180                                  </ul>
   181                                  {% if favorites|length >= 10 %}
   182                                      <div class="cell last low">
   183                                          <span class="pull-right"><a href="/user/{{userProfile.Username}}/favorites/"><i class="icon-caret-right"></i> 更多回复</a></span>
   184                                          <span class="clearfix"></span>
   185                                      </div>
   186                                  {% endif %}
   187                              {% else %}
   188                                  <div class="cell post-list last">尚无收藏的话题.</div>
   189                              {% endif %}
   190                          </div>
   191                      </div>
   192                  </section>
   193              </section>
   194          </aside>
   195          <aside class="col-lg-3 b-l">
   196              <section class="vbox">
   197                  <section class="scrollable padder-v" style="padding-top:0;">
   198                  {% comment %}
   199                      <div class="panel">
   200                          <h4 class="font-thin padder">博客</h4>
   201                          <ul class="list-group">
   202                              <li class="list-group-item">
   203                                  <p>
   204                                      不要怪我太坦白!就凭这你们这几个滥番薯,臭鸟蛋,想取我的性命,未免太过儿戏吧!!!!
   205                                  </p>
   206                                  <small class="block text-muted"> <i class="fa fa-clock-o"></i>
   207                                      2 分钟之前
   208                                  </small>
   209                              </li>
   210                              <li class="list-group-item">
   211                                  <p>
   212                                      三十多年前,我上中学的时候,我真的时时刻刻都会想着她,有时候撒尿都会突然间停一下,然后想起她,心里甜甜的,跟着那半泡尿就忘了尿了。
   213                                  </p>
   214                                  <small class="block text-muted"> <i class="fa fa-clock-o"></i>
   215                                      1 小时之前
   216                                  </small>
   217                              </li>
   218                              <li class="list-group-item">
   219                                  <p>
   220                                      十年了,已经十年了,我还以为国家已经把我忘记了。
   221                                  </p>
   222                                  <small class="block text-muted">
   223                                      <i class="fa fa-clock-o"></i>
   224                                      2 小时之前
   225                                  </small>
   226                              </li>
   227                          </ul>
   228                      </div>
   229                  {% endcomment %}
   230                      <div class="panel clearfix">
   231                          <div class="panel-body">
   232                              <a href="#" class="thumb pull-left m-r"><img src="{% if userProfile.AvatarMedium %}{{File(userProfile.AvatarMedium)}}{% else %}/identicon/{{userProfile.Username}}/48/default.png{% endif %}" class="img-circle"></a>
   233                              <div class="clear">
   234                                  <span>{% if userProfile.Gender > 0 %}<i class="fa fa-user"></i>{%else%}<i class="fa fa-female"></i>{% endif %}</span>
   235                                  <a href="#" class="text-info">
   236                                      @{{userProfile.Username}}
   237                                  </a>
   238                                  <small class="block text-muted">
   239                                  {{userProfile.ReplyCount}} 评论 / {{userProfile.TopicCount}} 话题 / {{userProfile.NodeCount}} 节点 / {{userProfile.FavoriteCount}} 收藏
   240                                  </small>
   241                                  <a href="/friend/add/{{userProfile.Id}}/" class="btn btn-xs btn-success m-t-xs">申请好友</a>
   242                              </div>
   243                          </div>
   244                      </div>
   245                  </section>
   246              </section>
   247          </aside>
   248      </section>
   249  </div>
   250  {% endblock mainland %}