Browse Source

simplify layouts

Alexander Avery 5 months ago
parent
commit
8e8a0284b5
  1. 2
      layouts/_default/meta-extra.html
  2. 7
      layouts/games/meta-extra.html
  3. 25
      layouts/partials/article-meta.html

2
layouts/_default/meta-extra.html

@ -1,2 +0,0 @@
<h2 class="small-text">{{ .Date.Format "Mon | Jan 2, 2006" }}</h2>

7
layouts/games/meta-extra.html

@ -1,6 +1,7 @@
{{ if .Params.releaseDate }}
<h2 class="small-text center-text">Released {{ dateFormat "Mon | Jan 2, 2006" .Params.releaseDate }}</h2>
{{ with .Params.releaseDate }}
<h2 class="small-text">Released: {{ dateFormat "Mon | Jan 2, 2006" . }}</h2>
{{ end }}
<h2 class="small-text">Platforms:</h2>
<h2 class="small-text">Platforms:
<span class="margin small-text">{{ delimit .Params.platforms " · " }}</span>
</h2>

25
layouts/partials/article-meta.html

@ -1,22 +1,25 @@
<section class="article-header">
<h1>{{ .Title | markdownify }}</h1>
<section>
<h1 class="large-text">{{ .Title | markdownify }}</h1>
{{- $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }}
{{- $primaryAuthor := index $authors 0 }}
{{ with .Params.authors }}
{{ $author := (index . 0) }}
<h2>
Author: <a href={{ printf "/%s/%s" "authors" (urlize $author) }}>{{ $author }}</a>
</h2>
{{ end }}
{{ with $primaryAuthor }}
<a class="center-text" href={{ printf "/%s/%s" "authors" (urlize .) }}>
<h2>{{ . }}</h2>
</a>
{{ with .Date }}
<h2 class="small-text">Posted: {{ .Format "Mon | Jan 2, 2006" }}</h2>
{{ end }}
{{ .Render "meta-extra" }}
{{ .Render "meta-extra" }}
{{ range (.GetTerms "tags") }}
<a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
<span>
<a class="small-text" href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</span>
{{ end }}
{{ $image := (.Resources.GetMatch "featured") }}
{{ partial "image.html" (dict "image" $image "alt" .Params.featured.alt "class" "shadow featured") }}
</section>

Loading…
Cancel
Save