Skip to content

Commit

Permalink
🎨 #10
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Jan 2, 2020
1 parent de6c25b commit 961340e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions theme/x/Next/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2>
<time>{{.Article.CreatedAt}}</time> &nbsp;
| &nbsp;
<a href="{{.URL}}">{{.Article.ViewCount}}</a> {{$.I18n.View}}
{{if gt .Article.CommentCount 0}}
{{if and $.Commentable (gt .Article.CommentCount 0)}}
&nbsp; | &nbsp;
<a href="{{.URL}}#pipeComments">{{.Article.CommentCount}}</a> {{$.I18n.Comment}}
{{end}}
Expand Down Expand Up @@ -82,6 +82,7 @@ <h2>
data-avatar="{{.Article.Author.AvatarURLWithSize 128}}"></div>
</span>

{{if $.Commentable}}
<span id="articleCommentBtn" class="article__edit"
data-title="{{$.I18n.Comment}}{{$.I18n.Colon}}{{.Article.Title}}"
data-id="{{.Article.ID}}">
Expand All @@ -90,7 +91,7 @@ <h2>
</svg>
{{$.I18n.Comment}}
</span>

{{end}}
</div>
</div>
</article>
Expand Down Expand Up @@ -136,6 +137,7 @@ <h2>
<a class="avatar" data-src="{{$item.Author.AvatarURL}}"
href="{{$item.Author.URL}}" target="_blank"></a>
<a href="{{$item.Author.URL}}" class="ft__gray" target="_blank">{{$item.Author.Name}}</a>
{{if $.Commentable}}
<a href="{{$item.URL}}#comments" class="ft__fade fn__right" target="_blank">
{{if ne 0 $item.CommentCount}}
{{$item.CommentCount}}
Expand All @@ -144,7 +146,8 @@ <h2>
{{$.I18n.Comment}}
<svg><use xlink:href="#icon-comment"></use></svg>
{{end}}
</a>
</a>
{{end}}
</div>
</div>
{{end}}
Expand Down
2 changes: 1 addition & 1 deletion theme/x/Next/define-article-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h2>
<time>{{.CreatedAt}}</time> &nbsp;
| &nbsp;
<a href="{{.URL}}">{{.ViewCount}}</a> {{$.I18n.View}}
{{if gt .CommentCount 0}}
{{if and $.Commentable (gt .CommentCount 0)}}
&nbsp; | &nbsp;
<a href="{{.URL}}#pipeComments">{{.CommentCount}}</a> {{$.I18n.Comment}}
{{end}}
Expand Down
2 changes: 2 additions & 0 deletions theme/x/Next/define-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
&nbsp;
{{.Statistic.StatisticArticleCount}}
{{.I18n.Article}}
{{if $.Commentable}}
&nbsp;
{{.Statistic.StatisticCommentCount}}
{{.I18n.Comment}}
{{end}}
<div class="fn__right">
Powered by <a href="https://b3log.org/" target="_blank">B3log 开源</a>
<a href="https://hacpai.com/tag/pipe" target="_blank">Pipe</a>
Expand Down

0 comments on commit 961340e

Please sign in to comment.