edited post

This commit is contained in:
Morgan 2023-10-29 11:02:35 +09:00
parent a0a32c3d74
commit eaeebd59ff
1 changed files with 13 additions and 6 deletions

View File

@ -1,24 +1,31 @@
{{- define "main" }} {{- define "main" }}
<article class="post-single"> <article class="post-single">
<header class="post-header"> <header class="post-header">
{{ partial "breadcrumbs.html" . }}
<h1 class="post-title"> <h1 class="post-title">
{{ .Title }} {{ .Title }}
{{- if .Draft }}<sup><span class="entry-isdraft">&nbsp;&nbsp;[draft]</span></sup>{{- end }}
</h1> </h1>
{{- if .Description }} {{- if .Description }}
<div class="post-description"> <div class="post-description">
{{ .Description }} {{ .Description }}
</div> </div>
{{- end }} {{- end }}
{{- if not (.Param "hideMeta") }}
<div class="post-meta"> <div class="post-meta">
{{- $scratch := newScratch }} {{- partial "post_meta.html" . -}}
{{- if not .Date.IsZero -}} {{- partial "translation_list.html" . -}}
{{- $scratch.Add "meta" (slice (printf "<span title='%s'>%s</span>" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} {{- partial "edit_post.html" . -}}
{{- end }} {{- partial "post_canonical.html" . -}}
</div> </div>
{{- end }}
</header> </header>
{{- $isHidden := .Params.cover.hidden | default site.Params.cover.hiddenInSingle | default site.Params.cover.hidden }}
{{- partial "cover.html" (dict "cxt" . "IsHome" false "isHidden" $isHidden) }}
{{- if (.Param "ShowToc") }}
{{- partial "toc.html" . }}
{{- end }}
{{- if .Content }} {{- if .Content }}
<div class="post-content"> <div class="post-content">