77 < li > < a href ="/ "> 首页</ a > </ li >
88 < li class ="active "> 文章</ li >
99 </ ol >
10- {{range .articles}}
10+ {{range $i, $article := .articles}}
1111 < article class ="article box_white ">
1212 < div class ="row ">
1313 {{if .Cover}}
@@ -70,7 +70,17 @@ <h2><a href="/articles/{{.Id}}" target="_blank" title="{{.Title}}">
7070 </ div >
7171 </ div >
7272 </ article >
73- {{else}}
73+
74+ {{if eq (mod $i 6) 3}}
75+ {{if $.pos_ad.feed}}
76+ < article class ="article box_white ">
77+ {{if eq $.pos_ad.feed.AdType 0}}
78+ {{noescape $.pos_ad.feed.Code}}
79+ {{end}}
80+ </ article >
81+ {{end}}
82+ {{end}}
83+
7484 < article class ="article box_white ">
7585 < div class ="row "> 暂无博文,< a class ="btn btn-default btn-sm " href ="/articles/new "> 撰写文章</ a > </ div >
7686 </ article >
@@ -88,8 +98,6 @@ <h2><a href="/articles/{{.Id}}" target="_blank" title="{{.Title}}">
8898 < div class ="sep20 "> </ div >
8999 {{include "common/my_info.html" .}}
90100
91- {{include "sidebar/view_rank.html" (parseJSON `{"rank_title":"今日阅读排行","objtype":1,"limit":10,"rank_type":"today"}`)}}
92-
93101 {{if .pos_ad.right1}}
94102 < div class ="box_white sidebar " id ="ad-right1 ">
95103 {{if eq .pos_ad.right1.AdType 0}}
@@ -98,6 +106,8 @@ <h2><a href="/articles/{{.Id}}" target="_blank" title="{{.Title}}">
98106 </ div >
99107 {{end}}
100108
109+ {{include "sidebar/view_rank.html" (parseJSON `{"rank_title":"今日阅读排行","objtype":1,"limit":10,"rank_type":"today"}`)}}
110+
101111 {{include "sidebar/view_rank.html" (parseJSON `{"rank_title":"一周阅读排行","objtype":1,"limit":10,"rank_type":"week"}`)}}
102112
103113 {{if .pos_ad.right2}}
@@ -126,4 +136,4 @@ <h2><a href="/articles/{{.Id}}" target="_blank" title="{{.Title}}">
126136 {{end}}
127137{{end}}
128138
129- {{end}}
139+ {{end}}
0 commit comments