add article header to single.html and add some demo articles

This commit is contained in:
geekifan
2025-04-21 15:51:31 +08:00
parent 8faf99334b
commit 99f5cf6774
9 changed files with 379 additions and 11 deletions

View File

@ -0,0 +1,12 @@
{{ $locales := index site.Data.locales .lang }}
{{ $dateFormat := default "02/01/2006" $locales.df.post.strftime }}
{{ $dayjsFormat := default "DD/MM/YYYY" $locales.df.post.dayjs }}
<time
{{ if .class }}class="{{ .class }}"{{ end }}
data-ts="{{ .date.Unix }}"
data-df="{{ $dayjsFormat }}"
{{ if .tooltip }}data-bs-toggle="tooltip" data-bs-placement="bottom"{{ end }}
>
{{ .date | time.Format $dateFormat }}
</time>