diff options
Diffstat (limited to 'layouts/_default')
| -rw-r--r-- | layouts/_default/single.html | 127 | 
1 files changed, 63 insertions, 64 deletions
| diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6869a46..209524e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -7,70 +7,69 @@  {{ end }}  <div {{ if .Param "autonumber" }} class="autonumber" {{ end }}> - -  <div class="single-intro-container"> - -    {{/* Title and Summary */}} - -    <h1 class="single-title">{{ .Title }}</h1> -    {{ with .Param "summary" }} -    <p class="single-summary">{{ . | markdownify }}</p> -    {{ end }} - -    {{/* Reading Time */}} - -    <p class="single-readtime"> -      {{ with .Date }} -      {{ $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} -      {{ $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} -      <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> -      {{end}} - -      {{ if .Param "readTime" }} -        ·   -      {{ .ReadingTime }} min read -      {{end }} -    </p> - -  </div> - -  {{ if .Param "showTags" }} - -  {{ $taxonomy := "tags" }} -  {{ with .Param $taxonomy }} - -  <div class="single-tags"> -    {{ range $index, $tag := . }} -    {{ with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} -    <span> -      <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> -    </span> -    {{ end }} -    {{ end }} -  </div> - -  {{ end }} -  {{ end }} - -  {{/* Table of Content */}} - -  {{ if .Param "toc" }} -  <aside class="toc"> -    <p><strong>Table of contents</strong></p> -    {{ .TableOfContents }} -  </aside> -  {{ end }} - -  {{/* Page content */}} - -  <div class="single-content"> -    {{ .Content }} -    {{ if .Site.Params.giscus.enable }} -    {{ if not .Params.disableComment }} -    {{ partial "comments.html" . }} -    {{ end }} -    {{ end }} -  </div> +  <article> +    <header class="single-intro-container"> +        {{- /* Title and Summary */}} +         +        <h1 class="single-title">{{ .Title }}</h1> +        {{- with .Param "summary" }} +        <p class="single-summary">{{ . | markdownify }}</p> +        {{- end }} +     +        {{- /* Reading Time */}} +     +        <p class="single-readtime"> +        {{- with .Date }} +          {{- $dateMachine := . | time.Format "2006-01-02T15:04:05-07:00" }} +          {{- $dateHuman := . | time.Format (default ":date_long" $.Site.Params.singleDateFormat) }} +          <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> +        {{- end }} +     +        {{- if .Param "readTime" }} +            ·   +          {{- .ReadingTime }} min read +        {{- end }} +        </p> +    </header> +     +    {{- if .Param "showTags" }} +      {{- $taxonomy := "tags" }} +      {{- with .Param $taxonomy }}     +        <div class="single-tags"> +            {{- range $index, $tag := . }} +            {{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}} +                <span> +                  <a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> +                </span> +            {{- end }} +            {{- end }} +        </div> +      {{- end }} +    {{- end }} +     +    {{- /* Table of Contents */}} +     +    {{- if .Param "toc" }} +      <aside class="toc"> +        <p><strong>Table of contents</strong></p> +        {{ .TableOfContents }} +      </aside> +    {{- end }} +     +    {{- /* Page content */}} +     +    <div class="single-content"> +      {{ .Content }} +    </div> +  </article> +   +  {{- /* Comments */}} + +  {{- if and .Site.Params.giscus.enable (not .Params.disableComment) }} +    <div class="single-comments"> +      {{ partial "comments.html" . }} +    </div> +  {{- end }}    {{ if .Store.Get "hasMermaid" }}    {{ $mermaidDarkTheme := default "dark" (or .Params.mermaidDarkTheme .Site.Params.mermaidDarkTheme) }} | 
