parent
6bdf479e17
commit
05cf2daa26
1 changed files with 16 additions and 15 deletions
|
|
@ -13,22 +13,23 @@
|
|||
{{ else }}
|
||||
<h3>{{ i18n "noComment" }}</h3>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $.Scratch.Set "hasComments" 0 }}
|
||||
{{ range $index, $comments := (index $.Site.Data.comments $slug ) }}
|
||||
{{ if not .parent }}
|
||||
{{ $.Scratch.Add "hasComments" 1 }}
|
||||
<article id="comment-{{ $.Scratch.Get "hasComments" }}" class="static-comment">
|
||||
<img class="comment-avatar" src="https://www.gravatar.com/avatar/{{ .email }}?s=48">
|
||||
{{ if .website }}
|
||||
<h4 class="comment-author"><a rel="external nofollow" href="{{ .website }}">{{ .name }}</a></h4>
|
||||
{{ else }}
|
||||
<h4 class="comment-author">{{ .name }}</h4>
|
||||
{{ end }}
|
||||
<div class="comment-timestamp"><a href="#comment-{{ $.Scratch.Get "hasComments" }}" title="Permalink to this comment"><time datetime="{{ .date }}">{{ dateFormat (default (i18n "shortdateFormat") .Site.Params.dateformat) .date}}</time></a></div>
|
||||
<div class="comment-content"><p>{{ .comment | markdownify }}</p></div>
|
||||
</article>
|
||||
|
||||
{{ $.Scratch.Set "hasComments" 0 }}
|
||||
{{ range $index, $comments := (index $.Site.Data.comments $slug ) }}
|
||||
{{ if not .parent }}
|
||||
{{ $.Scratch.Add "hasComments" 1 }}
|
||||
<article id="comment-{{ $.Scratch.Get "hasComments" }}" class="static-comment">
|
||||
<img class="comment-avatar" src="https://www.gravatar.com/avatar/{{ .email }}?s=48">
|
||||
{{ if .website }}
|
||||
<h4 class="comment-author"><a rel="external nofollow" href="{{ .website }}">{{ .name }}</a></h4>
|
||||
{{ else }}
|
||||
<h4 class="comment-author">{{ .name }}</h4>
|
||||
{{ end }}
|
||||
<div class="comment-timestamp"><a href="#comment-{{ $.Scratch.Get "hasComments" }}" title="Permalink to this comment"><time datetime="{{ .date }}">{{ dateFormat (default (i18n "shortdateFormat") .Site.Params.dateformat) .date}}</time></a></div>
|
||||
<div class="comment-content"><p>{{ .comment | markdownify }}</p></div>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue