github.com/insionng/yougam@v0.0.0-20170714101924-2bc18d833463/themes/wind/templates/root/widget_boxes.html (about) 1 <div class="row-fluid"> 2 <div class="span6"> 3 <div class="widget-box"> 4 <div class="widget-title bg_ly" data-toggle="collapse" href="#collapseG2"> 5 <span class="icon"> <i class="icon-chevron-down"></i> 6 </span> 7 <h5>最新话题</h5> 8 </div> 9 {% if tps %} 10 <div class="widget-content nopadding collapse in" id="collapseG2"> 11 <ul class="recent-posts"> 12 {% for tp in tps %} 13 <li> 14 <div class="user-thumb"> 15 <img width="40" height="40" alt="User" src="/root/img/demo/av1.jpg"></div> 16 <div class="article-post"> 17 <span class="user-info"> 18 {% with s=Htm2Str(tp.Title) %} 19 {%if not s %} 20 {{ tp.Author }} {{TimeSince(tp.Created)}} 发布了话题#{{tp.Id}} 21 {%else%} 22 {{Cropword(s,0,24,"...")}} 23 {%endif%} 24 {% endwith %} 25 </span> 26 <p> 27 <a href="/root/read/topic/{{tp.Id}}/"> 28 {% with s=Htm2Str(tp.Content) %} 29 {%if not s %} 30 {{ tp.Author }} {{TimeSince(tp.Created)}} 发布了话题#{{tp.Id}} 31 {%else%} 32 {{Cropword(s,0,48,"...")}} 33 {%endif%} 34 {% endwith %} 35 </a> 36 </p> 37 </div> 38 <div style="clear:both;"></div> 39 </li> 40 {% endfor %} 41 <li> 42 <a href="/root/read/topic/" target="_blank" class="btn btn-warning btn-mini">浏览所有</a> 43 <div style="clear:both;"></div> 44 </li> 45 </ul> 46 </div> 47 {% else %} 48 49 <div class="widget-content nopadding collapse in" id="collapseG2"> 50 <ul class="recent-posts"> 51 <li>尚无话题 52 <div style="clear:both;"></div> 53 </li> 54 </ul> 55 </div> 56 {% endif %} 57 58 </div> 59 </div> 60 <div class="span6"> 61 62 <div class="widget-box"> 63 <div class="widget-title"> 64 <ul class="nav nav-tabs"> 65 <li class="active"> 66 <a data-toggle="tab" href="#tab1">最近评论</a> 67 </li> 68 <li> 69 <a data-toggle="tab" href="#tab2">本周趋势</a> 70 </li> 71 <li> 72 <a data-toggle="tab" href="#tab3">最热话题</a> 73 </li> 74 </ul> 75 </div> 76 <div class="widget-content tab-content"> 77 <div id="tab1" class="tab-pane active"> 78 {% if replys %} 79 <p> 80 <div class="cell last"> 81 <ul class="sidebar-list"> 82 {% for reply in replys %} 83 <li> 84 {% with s=Htm2Str(reply.Content) %} 85 <a href="/topic/{{reply.Tid}}/#reply{{reply.Id}}"> 86 {%if not s %} 87 {{ reply.Author }} {{TimeSince(reply.Created)}} 回应了话题#{{reply.Tid}} 88 {%else%} 89 {{Cropword(s,0,48,"...")}} 90 {%endif%} 91 </a> 92 {% endwith %} 93 </li> 94 {% endfor %} 95 </ul> 96 </div> 97 </p> 98 {%else%} 99 <p>尚无评论</p> 100 {% endif %} 101 </div> 102 <div id="tab2" class="tab-pane"> 103 {% if topics_thisWeek_10 %} 104 <p> 105 <div class="cell last"> 106 <ul class="sidebar-list"> 107 {% for topic in topics_thisWeek_10 %} 108 <li> 109 {% with s=Htm2Str(topic.Title) %} 110 <a href="/topic/{{topic.Id}}/"> 111 {%if not s %} 112 {{ topic.Author }} {{TimeSince(topic.Created)}} 发布了话题#{{topic.Id}} 113 {%else%} 114 {{Cropword(s,0,24,"...")}} 115 {%endif%} 116 </a> 117 {% endwith %} 118 </li> 119 {% endfor %} 120 </ul> 121 </div> 122 </p> 123 {%else%} 124 <p>尚无话题</p> 125 {% endif %} 126 </div> 127 <div id="tab3" class="tab-pane"> 128 {% if topics_sidebar_10 %} 129 <p> 130 <div class="cell last"> 131 <ul class="sidebar-list"> 132 {% for topic in topics_sidebar_10 %} 133 <li> 134 {% with s=Htm2Str(topic.Title) %} 135 <a href="/topic/{{topic.Id}}/"> 136 {%if not s %} 137 {{ topic.Author }} {{TimeSince(topic.Created)}} 发布了话题#{{topic.Id}} 138 {%else%} 139 {{Cropword(s,0,24,"...")}} 140 {%endif%} 141 </a> 142 {% endwith %} 143 </li> 144 {% endfor %} 145 </ul> 146 </div> 147 </p> 148 {%else%} 149 <p>尚无话题</p> 150 {% endif %} 151 </div> 152 </div> 153 </div> 154 </div> 155 156 </div>