commit 069b809bd6d776c84bc08ab4f6866af128d662ae
parent d192a98b4ed275820ea6208a7530c474c5cc5cc6
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sun, 29 Mar 2020 00:53:04 -0500
Simplify comment heading structure
Diffstat:
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/layouts/partials/list_comment.html b/layouts/partials/list_comment.html
@@ -8,22 +8,17 @@
{{ $hash := print .name $timestamp | md5 | last 7 }}
<article id="{{ $hash }}">
<header>
- <h3>{{ or .name (i18n "hyperskip-name-default") }}
- {{- if (strings.HasSuffix ($.Site.Author.email | sha256) .email_hash) -}}
- ✦
- {{- else -}}
- <code>{{ .email_hash | last 4 }}</code>
- {{- end -}}
- </h3>
- <nav><p>
- {{- .time.Format "2006-01-02" -}}
- | <a href="#{{ $hash }}">#{{ $hash }}</a>
- {{- if not ($.Scratch.Get "is_feed") -}}
- | <a href="#comment" onclick="reply({{ $hash }})">
- {{- i18n "hyperskip-reply" -}}
- </a>
- {{- end -}}
- </p></nav>
+ <b>{{- or .name (i18n "hyperskip-name-default") }}</b>
+ {{- if (strings.HasSuffix ($.Site.Author.email | sha256) .email_hash) -}}
+ ✦{{ else }}<code>{{ .email_hash | last 4 }}</code>
+ {{- end -}}
+ <br/>{{ .time.Format "2006-01-02" -}}
+ | <a href="#{{ $hash }}">#{{ $hash }}</a>
+ {{- if not ($.Scratch.Get "is_feed") -}}
+ | <a href="#comment" onclick="reply({{ $hash }})">
+ {{- i18n "hyperskip-reply" -}}
+ </a>
+ {{- end -}}
</header>
{{- with (.content | htmlEscape | markdownify) }}
{{ if not ( findRE "<[h|p][^>]*>" . ) }}<p>{{ . }}</p>{{ else }}{{ . }}{{ end }}