mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
layouts: post_meta as partial
This commit is contained in:
parent
3d60370494
commit
684cb2160f
@ -22,11 +22,7 @@
|
||||
{{- .Title | markdownify }}
|
||||
</h3>
|
||||
<div class="archive-meta">
|
||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
{{- partial "post_meta.html" . -}}
|
||||
</div>
|
||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||
</div>
|
||||
@ -39,4 +35,4 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}{{/* end main */}}
|
||||
{{- end }}{{/* end main */}}
|
||||
|
@ -44,11 +44,7 @@
|
||||
</section>
|
||||
{{- end }}
|
||||
<footer class="entry-footer">
|
||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime }} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
{{- partial "post_meta.html" . -}}
|
||||
</footer>
|
||||
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
|
||||
</article>
|
||||
|
@ -8,11 +8,7 @@
|
||||
</h1>
|
||||
{{- if .Params.hideMeta }}{{ else }}
|
||||
<div class="post-meta">
|
||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime -}} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
||||
{{- partial "post_meta.html" . -}}
|
||||
{{- if .IsTranslated -}} |
|
||||
<ul class="i18n_list">
|
||||
{{- i18n "translations" | default "Translations"}}:
|
||||
|
5
layouts/partials/post_meta.html
Normal file
5
layouts/partials/post_meta.html
Normal file
@ -0,0 +1,5 @@
|
||||
<time>{{ .Date.Format (default "January 2, 2006" .Site.Params.DateFormat) }}</time>
|
||||
{{- if $.Site.Params.ShowReadingTime -}} ·
|
||||
{{- $default_txt := print .ReadingTime " " "min" }}
|
||||
{{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }}
|
||||
{{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }}
|
Loading…
Reference in New Issue
Block a user