diff options
author | Justin Berthault <justin.berthault@zaclys.net> | 2017-12-12 13:32:35 +0300 |
---|---|---|
committer | Justin Berthault <justin.berthault@zaclys.net> | 2017-12-12 13:32:35 +0300 |
commit | 87901c737c23a5aec12407db343b53398401c645 (patch) | |
tree | b9e7a8bed240ea646de10a896eedfbd58eb606bb /layouts/partials | |
parent | 0e603213dd96662699eed1a1e0b1589e67aed866 (diff) |
Update comments layout to add anchors
- Each comment has an #id
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/comments.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index abd639b..af9436c 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -3,17 +3,17 @@ <div class="comments"> {{ range .comments }} {{ if .id }} - <div class="comment"> - <span><strong>{{ .id }}</strong></span></br> - <div class="comment-name">{{ .name }}{{if .website}} - <a href="{{ .website | safeURL }}">{{ .website }}{{ end }}</a></div> - <div class="comment-date">{{ .date }}</div> + <div class="comment" id="comment-{{ .id }}"> + <span><strong>#{{ .id }}</strong></span></br> + <div class="comment-name">{{ if .name }}{{ .name }}{{else}}Commentaire Anonymus{{ end }}{{if .website}} - <a href="{{ .website | safeURL }}">{{ .website }}{{ end }}</a></div> + <div class="comment-date"><a href="#comment-{{ .id }}">{{ .date }}</a></div> <div class="comment-body">{{ .body | markdownify }}</div> {{if .reply}} {{range .reply}} - <div class="reply"> - <span><strong>{{ .replyid }}</strong></span></br> + <div class="reply" id="comment-{{ .replyid }}"> + <span><strong>#{{ .replyid }}</strong></span></br> <div class="reply-name">{{ .replyname }}{{if .replywebsite}} - <a href="{{ .replywebsite | safeURL }}">{{ .replywebsite }}{{ end }}</a></div> - <div class="reply-date">{{ .replydate }}</div> + <div class="reply-date"><a href="#comment-{{ .replyid }}">{{ .replydate }}</a></div> <div class="reply-body">{{ .replybody | markdownify }}</div> </div> {{ end }} |