@@ -106,34 +106,33 @@ <h2 class="header__title">
106106 < div class ="relevant__panel ">
107107 {{range $index, $item := .RelevantArticles}}
108108 < div class ="relevant__item ">
109+ {{if $item.ThumbnailURL}}
110+ < a class ="relevant__thumbnail "
111+ href ="{{$item.URL}} "
112+ data-src ="https://img.hacpai.com/bing/20171109.jpg?imageView2/1/w/960/h/520/interlace/1/q/100 "> </ a >
109113 < a class ="module__list-title fn-ellipsis " href ="{{$item.URL}} "> {{$item.Title}}</ a >
110- < div class ="ft-fade relevant__abstract ">
114+ {{else}}
115+ < a class ="module__list-title fn-ellipsis " href ="{{$item.URL}} "> {{$item.Title}}</ a >
116+ < a href ="{{$item.URL}} " class ="ft-fade relevant__abstract ">
111117 我是摘要我是摘要我是摘要我是摘要我是摘要我是摘要我是摘要我是摘要我是摘要我是摘要
112- </ div >
118+ </ a >
119+ {{end}}
113120 < div class ="fn-relative ">
114121 < a class ="avatar fn-absolute " data-src ="{{$item.Author.AvatarURL}} "
115122 href ="{{$item.Author.URL}} "> </ a >
116123 < div class ="relevant__content ">
117124 < a href ="{{$item.Author.URL}} " class ="ft-gray "> {{$item.Author.Name}}</ a > < br >
118125 < span class ="ft-12 ft-fade fn-clear ">
119126 {{$item.CreatedAt}}
120- < span class ="fn-right "> {{$item.CommentCount}} {{$.I18n.Comment}}</ span >
121- </ span >
122- </ div >
123- </ div >
124- </ div >
125- < div class ="relevant__item ">
126- < div class ="relevant__thumbnail "
127- data-src ="https://img.hacpai.com/bing/20171109.jpg?imageView2/1/w/960/h/520/interlace/1/q/100 "> </ div >
128- < a class ="module__list-title fn-ellipsis " href ="{{$item.URL}} "> {{$item.Title}}</ a >
129- < div class ="fn-relative ">
130- < a class ="avatar fn-absolute " data-src ="{{$item.Author.AvatarURL}} "
131- href ="{{$item.Author.URL}} "> </ a >
132- < div class ="relevant__content ">
133- < a href ="{{$item.Author.URL}} " class ="ft-gray "> {{$item.Author.Name}}</ a > < br >
134- < span class ="ft-12 ft-fade fn-clear ">
135- {{$item.CreatedAt}}
136- < span class ="fn-right "> {{$item.CommentCount}} {{$.I18n.Comment}}</ span >
127+ < a href ="{{$item.URL}}#pipeComments " class ="fn-right ft-fade ">
128+ {{if ne 0 $item.CommentCount}}
129+ {{$item.CommentCount}}
130+ {{$.I18n.Comment}}
131+ {{else}}
132+ {{$.I18n.Comment}}
133+ < svg > < use xlink:href ="#comment "> </ use > </ svg >
134+ {{end}}
135+ </ a >
137136 </ span >
138137 </ div >
139138 </ div >
0 commit comments