Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Tam <sere@live.hk>2019-05-20 14:46:29 +0300
committerVincent Tam <sere@live.hk>2019-05-20 14:46:29 +0300
commitc446cb28ae1a40899acfaa92abdca47ec87573a0 (patch)
treeaefce01eee885c64a71e6a7e29312634388d6b96 /layouts
parentbb5dc77c22d6bfcab5ec98e27a41cc19d3b06263 (diff)
Template pour Staticman simplifié
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/staticman-comments.html18
1 files changed, 6 insertions, 12 deletions
diff --git a/layouts/partials/staticman-comments.html b/layouts/partials/staticman-comments.html
index 8715b8f..ba6cc77 100644
--- a/layouts/partials/staticman-comments.html
+++ b/layouts/partials/staticman-comments.html
@@ -18,26 +18,22 @@
{{ range $comments }}
{{ if not .replyThread }}
{{ $.Scratch.Add "hasComments" 1 }}
- {{ $.Scratch.Set "hasReplies" 0 }}
{{ $.Scratch.Set "threadID" ._id }}
- <article id="comment-{{ $.Scratch.Get "hasComments" }}" class="static-comment">
+ <article id="{{ ._id }}" 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-timestamp"><a href="#{{ ._id }}" 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>
- <div class="comment-reply-btn">
- <a id="{{ ._id }}" class="btn" href="#comment-form" title="{{ ._id }}">{{ i18n "replyToMsg" }}</a>
- </div>
+ <a class="btn" href="#comment-form" title="{{ ._id }}">{{ i18n "replyToMsg" }}</a>
</article>
{{ range $comments }}
{{ if eq .replyThread ($.Scratch.Get "threadID") }}
- {{ $.Scratch.Add "hasReplies" 1 }}
- <article id="comment-{{ $.Scratch.Get "hasComments" }}r{{ $.Scratch.Get "hasReplies" }}" class="static-comment static-comment-reply">
+ <article id="{{ ._id }}" class="static-comment static-comment-reply">
<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>
@@ -45,11 +41,9 @@
<h4 class="comment-author">{{ .name }}</h4>
{{ end }}
<h5 class="comment-reply-target"><a href="#{{ .replyID }}"> ↶ {{ .replyName }}</a></h5>
- <div class="comment-timestamp"><a href="#comment-{{ $.Scratch.Get "hasComments" }}r{{ $.Scratch.Get "hasReplies" }}" title="Permalink to this comment"><time datetime="{{ .date }}">{{ dateFormat (default (i18n "shortdateFormat") .Site.Params.dateformat) .date }}</time></a></div>
+ <div class="comment-timestamp"><a href="#{{ ._id }}" 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>
- <div class="comment-reply-btn">
- <a id="{{ ._id }}" class="btn" href="#comment-form" title="{{ $.Scratch.Get "threadID" }}">{{ i18n "replyToMsg" }}</a>
- </div>
+ <a class="btn" href="#comment-form" title="{{ .replyThread }}">{{ i18n "replyToMsg" }}</a>
</article>
{{ end }}
{{ end }}