|
11 | 11 | {{template "Next/header" .}} |
12 | 12 | <div class="wrapper"> |
13 | 13 | <article class="article__item"> |
14 | | - <header class="article__header{{if gt $.UserCount 1}} article__header--user{{end}}"> |
| 14 | + <header class="article__header article__header--center"> |
15 | 15 | <h2> |
16 | | - <a class="article__title" rel="bookmark" href="{{.Article.URL}}"> |
17 | | - {{if .Article.Topped}} |
18 | | - <svg> |
19 | | - <use xlink:href="#icon-focus"></use> |
20 | | - </svg> |
21 | | - {{end}} |
22 | | - {{.Article.Title}} |
23 | | - </a> |
| 16 | + {{if .Article.Topped}} |
| 17 | + <svg> |
| 18 | + <use xlink:href="#icon-focus"></use> |
| 19 | + </svg> |
| 20 | + {{end}} |
| 21 | + {{.Article.Title}} |
24 | 22 | </h2> |
25 | | - <time class="article__time{{if gt $.UserCount 1}} article__time--user{{end}}">{{.Article.CreatedAt}}</time> |
26 | | - {{if gt $.UserCount 1}} |
27 | | - <a rel="nofollow" |
28 | | - class="avatar pipe-tooltipped pipe-tooltipped--n" |
29 | | - aria-label="{{.Article.Author.Name}}" |
30 | | - data-src="{{.Article.Author.AvatarURLWithSize 116}}" |
31 | | - href="{{.Article.Author.URL}}"> |
32 | | - </a> |
33 | | - {{end}} |
| 23 | + <div class="article__meta"> |
| 24 | + {{if gt $.UserCount 1}} |
| 25 | + <a rel="nofollow" |
| 26 | + class="avatar pipe-tooltipped pipe-tooltipped--n" |
| 27 | + aria-label="{{.Article.Author.Name}}" |
| 28 | + data-src="{{.Article.Author.AvatarURLWithSize 116}}" |
| 29 | + href="{{.Article.Author.URL}}"> |
| 30 | + </a> |
| 31 | + {{end}} |
| 32 | + <time>{{.Article.CreatedAt}}</time> |
| 33 | + | |
| 34 | + <a href="{{.URL}}">{{.Article.ViewCount}}</a> {{$.I18n.View}} |
| 35 | + | |
| 36 | + <a href="{{.URL}}#comments">{{.Article.CommentCount}}</a> {{$.I18n.Comment}} |
| 37 | + </div> |
34 | 38 | </header> |
35 | | - <section class="pipe-content__reset article__abstract" id="articleContent" data-author="{{.Article.Author.Name}}"> |
| 39 | + <section class="pipe-content__reset" data-author="{{.Article.Author.Name}}"> |
36 | 40 | {{.Article.Content}} |
37 | 41 | </section> |
38 | 42 | <div class="article__footer fn-clear"> |
39 | | - <span class="article__share"> |
40 | | - <span class="article__share-btn article__share-btn--wechat" data-type="wechat"> |
41 | | - <svg><use xlink:href="#wechat"></use></svg> |
42 | | - </span> |
43 | | - <span class="article__share-btn article__share-btn--weibo" data-type="weibo"> |
44 | | - <svg><use xlink:href="#weibo"></use></svg> |
45 | | - </span> |
46 | | - <span class="article__share-btn article__share-btn--twitter" data-type="twitter"> |
47 | | - <svg><use xlink:href="#twitter"></use></svg> |
48 | | - </span> |
49 | | - <span class="article__share-btn article__share-btn--google" data-type="google"> |
50 | | - <svg><use xlink:href="#google"></use></svg> |
51 | | - </span> |
52 | | - <div class="article__code" |
53 | | - data-title="{{.Article.Title}}" |
54 | | - data-blogtitle="{{$.Setting.BasicBlogTitle}}" |
55 | | - data-url="{{.Article.URL}}" |
56 | | - data-avatar="{{.Article.Author.AvatarURLWithSize 128}}"></div> |
57 | | - </span> |
58 | | - <div class="fn-left"> |
59 | | - <svg> |
60 | | - <use xlink:href="#icon-tag"></use> |
61 | | - </svg> |
| 43 | + <span class="fn-left"> |
62 | 44 | {{range .Article.Tags}} |
63 | | - <a class="tag" rel="tag" href="{{.URL}}">{{.Title}}</a> |
| 45 | + <a class="article__tag" rel="tag" href="{{.URL}}">{{.Title}}</a> |
64 | 46 | {{end}} |
65 | | - </div> |
| 47 | + </span> |
| 48 | + |
66 | 49 | <span class="fn-right"> |
67 | | - <a href="{{.Article.URL}}" aria-label="{{$.I18n.View}}" |
68 | | - class="pipe-tooltipped pipe-tooltipped--w"> |
69 | | - {{.Article.ViewCount}} |
70 | | - <svg> |
71 | | - <use xlink:href="#icon-view"></use> |
72 | | - </svg> |
73 | | - </a> |
| 50 | + {{if .Article.Editable}} |
| 51 | + <a href="{{$.Conf.Server}}/admin/articles/post?id={{.Article.ID}}" |
| 52 | + aria-label="{{$.I18n.Edit}}" |
| 53 | + class="pipe-tooltipped pipe-tooltipped--n article__edit"> |
| 54 | + <svg> |
| 55 | + <use xlink:href="#icon-edit"></use> |
| 56 | + </svg> |
| 57 | + </a> |
| 58 | + |
| 59 | + {{end}} |
| 60 | + |
| 61 | + <span class="article__share"> |
| 62 | + <span class="article__edit" data-type="wechat"> |
| 63 | + <svg><use xlink:href="#wechat"></use></svg> |
| 64 | + </span> |
| 65 | + <span class="article__edit" data-type="weibo"> |
| 66 | + <svg><use xlink:href="#weibo"></use></svg> |
| 67 | + </span> |
| 68 | + <span class="article__edit" data-type="twitter"> |
| 69 | + <svg><use xlink:href="#twitter"></use></svg> |
| 70 | + </span> |
| 71 | + <span class="article__edit" data-type="google"> |
| 72 | + <svg><use xlink:href="#google"></use></svg> |
| 73 | + </span> |
| 74 | + <div class="article__code" |
| 75 | + data-title="{{.Article.Title}}" |
| 76 | + data-blogtitle="{{$.Setting.BasicBlogTitle}}" |
| 77 | + data-url="{{.Article.URL}}" |
| 78 | + data-avatar="{{.Article.Author.AvatarURLWithSize 128}}"></div> |
| 79 | + </span> |
| 80 | + |
| 81 | + <span id="articleCommentBtn" class="article__edit" |
| 82 | + data-title="{{$.I18n.Comment}}{{$.I18n.Colon}}{{.Article.Title}}" |
| 83 | + data-id="{{.Article.ID}}"> |
| 84 | + <svg> |
| 85 | + <use xlink:href="#icon-reply"></use> |
| 86 | + </svg> |
| 87 | + {{$.I18n.Comment}} |
| 88 | + </span> |
74 | 89 |
|
75 | | - <a href="{{.Article.URL}}#comments" aria-label="{{$.I18n.Comment}}" |
76 | | - class="pipe-tooltipped pipe-tooltipped--w"> |
77 | | - {{.Article.CommentCount}} |
78 | | - <svg> |
79 | | - <use xlink:href="#icon-comment"></use> |
80 | | - </svg> |
81 | | - </a> |
82 | | - {{if .Article.Editable}} |
83 | | - <a href="{{$.Conf.Server}}/admin/articles/post?id={{.Article.ID}}" |
84 | | - aria-label="{{$.I18n.Edit}}" |
85 | | - class="pipe-tooltipped pipe-tooltipped--w"> <svg> |
86 | | - <use xlink:href="#icon-edit"></use> |
87 | | - </svg> |
88 | | - </a> |
89 | | - {{end}} |
90 | | - <span id="articleCommentBtn" |
91 | | - data-title="{{$.I18n.Comment}}{{$.I18n.Colon}}{{.Article.Title}}" |
92 | | - data-id="{{.Article.ID}}"> |
93 | | - <svg> |
94 | | - <use xlink:href="#icon-reply"></use> |
95 | | - </svg> |
96 | | - {{$.I18n.Comment}} |
97 | 90 | </span> |
98 | | - </span> |
99 | 91 | </div> |
100 | 92 | </article> |
101 | 93 |
|
102 | | - <article class="article__item"> |
103 | | - {{template "comment/comments" .}} |
104 | | - </article> |
| 94 | + {{template "comment/comments" .}} |
105 | 95 | </div> |
106 | 96 | {{template "comment/editor" .}} |
107 | 97 | {{template "Next/side" .}} |
|
0 commit comments