Browse Source

use article meta partial

master
Alexander Avery 9 months ago
parent
commit
7f43210a42
  1. 13
      layouts/_default/single.html
  2. 15
      layouts/games/list.html

13
layouts/_default/single.html

@ -1,18 +1,11 @@
{{ define "main" }} {{ define "main" }}
<div class="article-meta">
<h1 class="center-text">{{ .Title | markdownify }}</h1> {{ partial "article-meta.html" . }}
{{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }}
<a class="center-text" href={{ printf "/%s/%s" "authors" (index $authors 0 | urlize) }}><h2 class="center-text">{{ index $authors 0 }}</h2></a>
{{ if .Params.date }}<h2 class="small-text">{{ .Date.Format "Mon | Jan 2, 2006" }}</h2>{{ end }}
{{ range (.GetTerms "tags") }}
<a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ end}}
{{ partial "responsive-image.html" (dict "context" . "class" "shadow large-image") }}
</div>
{{ if .Params.toc }} {{ if .Params.toc }}
{{ .TableOfContents }} {{ .TableOfContents }}
{{ end }} {{ end }}
<div class="content-wrapper"> <div class="content-wrapper">
<main> <main>
{{ .Content }} {{ .Content }}

15
layouts/games/list.html

@ -1,17 +1,6 @@
{{ define "main" }} {{ define "main" }}
<div class="article-meta">
<h1 class="center-text">{{ .Title | markdownify }}</h1> {{ partial "article-meta.html" . }}
{{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }}
<a class="center-text" href={{ printf "/%s/%s" "authors" (index $authors 0 | urlize) }}><h2 class="center-text">{{ index $authors 0 }}</h2></a>
{{ if .Params.releaseDate }}<h2 class="small-text">Released {{ dateFormat "Mon | Jan 2, 2006" .Params.releaseDate }}</h2>{{ end }}
{{ range (.GetTerms "tags") }}
<a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ end }}
<div class="break"></div>
<h2 class="small-text">Platforms:</h2>
<span class="margin small-text">{{ delimit .Params.platforms " · " }}</span>
{{ partial "responsive-image.html" (dict "context" . "class" "shadow fill-wh") }}
</div>
{{ if .Params.toc }} {{ if .Params.toc }}
{{ .TableOfContents }} {{ .TableOfContents }}

Loading…
Cancel
Save