From 9dbf2d80d76ea849eff0b590eae25a7141f6c8ed Mon Sep 17 00:00:00 2001 From: Daniel Tomlinson Date: Sun, 31 May 2020 05:21:00 +0100 Subject: [PATCH] Copying layouts from old theme to new --- layouts/.DS_Store | Bin 0 -> 8196 bytes layouts/404.html | 0 layouts/_default/baseof.html | 24 +++++ layouts/_default/card.html | 21 +++++ layouts/_default/index.json | 5 + layouts/_default/list.html | 24 +++++ layouts/_default/single.html | 19 ++++ layouts/authors/list.html | 47 ++++++++++ layouts/authors/terms.html | 25 +++++ layouts/index.html | 60 ++++++++++++ layouts/partials/authors.html | 39 ++++++++ layouts/partials/css.html | 3 + layouts/partials/foot.html | 12 +++ layouts/partials/footer.html | 58 ++++++++++++ layouts/partials/head.html | 165 +++++++++++++++++++++++++++++++++ layouts/partials/header.html | 26 ++++++ layouts/partials/i18nlist.html | 6 ++ layouts/partials/js.html | 9 ++ layouts/partials/related.html | 10 ++ layouts/partials/schema.html | 40 ++++++++ layouts/partials/sharer.html | 24 +++++ layouts/post/card.html | 18 ++++ layouts/post/single.html | 75 +++++++++++++++ layouts/search/single.html | 100 ++++++++++++++++++++ layouts/shortcodes/figure.html | 27 ++++++ layouts/shortcodes/img.html | 5 + layouts/tags/tag-card.html | 10 ++ layouts/tags/terms.html | 30 ++++++ 28 files changed, 882 insertions(+) create mode 100644 layouts/.DS_Store create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/card.html create mode 100644 layouts/_default/index.json create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/authors/list.html create mode 100644 layouts/authors/terms.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/authors.html create mode 100644 layouts/partials/css.html create mode 100644 layouts/partials/foot.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/i18nlist.html create mode 100644 layouts/partials/js.html create mode 100644 layouts/partials/related.html create mode 100644 layouts/partials/schema.html create mode 100644 layouts/partials/sharer.html create mode 100644 layouts/post/card.html create mode 100644 layouts/post/single.html create mode 100644 layouts/search/single.html create mode 100644 layouts/shortcodes/figure.html create mode 100644 layouts/shortcodes/img.html create mode 100644 layouts/tags/tag-card.html create mode 100644 layouts/tags/terms.html diff --git a/layouts/.DS_Store b/layouts/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..830b626a9f05f57ae0115c5b0e7c0e206a32645e GIT binary patch literal 8196 zcmeHMJ8u&~5T13M#7RVw0x2o4K|vxQ8}X8&fH4Ls5=A5-Xk5>Gtfl-bOOOoqL=Ez&N%orUR$^#aEr7(q0Sv@e{ zl=&qFljhJH91fZHI~=%#52Ha_Y57QEcy|( zelOc@89M$ry+A+sLp01deuJu1qnl(>mu&KQy|3U`cEa2BT&dzVTf!U7d`t4#bc;pb zXXf$Nmxs?+-knXxRsRUrYN%_j^Q9+6{2o}l)TU0D1zP|@WgS6>IZVHa`%@WgJqs8_ z{50L|_(!9{(HmHdrpY2l?8BW=JI5XYr*g{ z`?|ezk+oIkzr%&Ozr~U`Gg{cQPV~-8nb4_x16(-n*-xquHQuYULA-&j8fTI|9G?N# zG=bP^BGVOWgzu}=N9ffUL)dVfb5_)s8tbd2Al8r%HQrH}aLnS&oJP#@N${wG?D8i( z@=T1aMq*F2Dfc=p|H*w{ZrN7H%Vs~b)L43aVlp#@wr}c2sp0lYp6PWv1+#sP|5`V_ zM%kZVa$P%^o8`+^t+z41|D5Z1rsdSy!q}?T0J(m}a;k2x;C7vANBAj8g;;1~exct# zoLx4ugJq+iJ8=rrT=wY6!C)%0a3Ht3w%NRUuYZ5=;0bu4G5?PXnv=hS@hN7BT*Lb{ zerps?-M0^if_+Q$sqWuS*zi6YJm5s1w@YoucAYx(oMReq0F&ym{e20YdT$1}2+xbE z50%@6(*d`@R^^kVPv8Ley6t)f#^ef%y#7Bw`uqQ`$DtR{8PFN{cNt*mVyRfb`oE69 zXehkaHqbZGdE>aDl)?mqD90g1ISv{8!w_==P;Qg=&wp{}?d{ + + + + + + + {{ partial "head.html" . }} + {{ partial "css.html" . }} + {{ partial "schema.html" . }} + + + + {{ partial "header.html" . }} + + {{ block "main" . }}{{ end }} + {{ partial "footer.html" . }} + {{ partial "foot.html" . }} + + {{ template "_internal/google_analytics.html" . }} + {{ partial "js.html" . }} + + + diff --git a/layouts/_default/card.html b/layouts/_default/card.html new file mode 100644 index 0000000..c4b3a5e --- /dev/null +++ b/layouts/_default/card.html @@ -0,0 +1,21 @@ + diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..39a6070 --- /dev/null +++ b/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "subtitle" .Params.subtitle "description" .Params.description "tags" .Params.tags "images" .Params.images "content" .Plain "permalink" .Permalink) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..35078df --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,24 @@ +{{ define "main" }} +
+ {{- if or .Title .Content -}} +
+
+ {{ with .Title }}

{{ . }}

{{ end }} + {{- with .Content -}} +
+ {{ . }} +
+ {{- end -}} +
+
+ {{- end -}} + +
+ {{ range .Pages }} +
+ {{ .Render "card" }} +
+ {{ end }} +
+
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..2c16c84 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,19 @@ +{{ define "main" }} +{{ .Scratch.Set "IsSingle" true }} +
+
+
+
+
+
+

{{ .Title }}

+
+ {{ .Content }} +
+
+
+
+
+
+
+{{ end }} diff --git a/layouts/authors/list.html b/layouts/authors/list.html new file mode 100644 index 0000000..cff6625 --- /dev/null +++ b/layouts/authors/list.html @@ -0,0 +1,47 @@ +{{ define "main" }} +
+
+
+
+
+
+ {{- $term := . -}} + {{- if $term.Params.images -}} + {{- with .Resources.GetMatch (index $term.Params.images 0) -}} + {{- $image := .Resize "300x" -}} +

+ {{ $term.Params.name }} +

+ {{- end -}} + {{- end -}} + +

{{ index $term.Params.name 0 }}

+ + {{- with $term.Params.twitter -}} +

+ @{{ .}} +

+ {{- end -}} + +
+ {{ $term.Content }} +
+ +
+

{{ T "articles" }}

+ + {{- with .Data.Pages -}} + + {{ end }} +
+
+
+
+
+
+
+{{ end }} diff --git a/layouts/authors/terms.html b/layouts/authors/terms.html new file mode 100644 index 0000000..1268680 --- /dev/null +++ b/layouts/authors/terms.html @@ -0,0 +1,25 @@ +{{ define "main" }} +
+
+
+
+
+
    + {{ range .Data.Pages }} + {{ $page := . }} + {{ range .Params.name }} +
  • {{ . }}
  • + {{ end }} + {{ end }} +
+
+ +
+
+
+
+{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..ca36631 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,60 @@ +{{ define "main" }} +{{ .Scratch.Set "IsSingle" true }} + + +
+
+ +
+ {{ .Scratch.Get "IsSingle" }} +
+ {{- with .Site.Params.homepageImage -}} + {{/*
*/}} +
+ +
+ {{- end -}} + +

{{ .Site.Title }}

+ {{- with .Site.Params.description -}} +

{{ . | safeHTML }}

+ {{- end -}} +
+
+ + + {{- range first 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) -}} + {{ $page := . }} +
+
+ {{- with .Resources.Match "images/banner.svg" -}} + {{ range . }} + {{- $image := . -}} + + {{ $page.Title }} + + {{- end -}} + {{- end -}} +
+
+
{{ $page.Date.Format "January 2, 2006" }}
+

{{ $page.Title }}

+ +
+ {{ $page.Summary }} +
+
+
+ {{- end -}} + + +
+ {{ range after 1 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} +
+ {{ .Render "card" }} +
+ {{ end }} +
+
+
+{{ end }} diff --git a/layouts/partials/authors.html b/layouts/partials/authors.html new file mode 100644 index 0000000..5edaf18 --- /dev/null +++ b/layouts/partials/authors.html @@ -0,0 +1,39 @@ +{{- if .Params.authors -}} +
    + {{- range .Params.authors -}} + {{- with $.Site.GetPage (printf "/authors/%s" (. | urlize)) -}} + {{- $term := . -}} +
  • +
    + {{- if $term.Params.images -}} + {{- with .Resources.GetMatch (index $term.Params.images 0) -}} + {{- $image := .Resize "64x" -}} + {{- $2ximage := .Resize "128x q100" -}} + {{- $3ximage := .Resize "192x q100" -}} + + + + {{ $term.Params.name }} + + + {{- end -}} + {{- end -}} +
    +
    + {{ range $term.Params.name }} + {{ $name := . }} + {{ $name }} + {{ end }} +
    + {{- with $term.Params.twitter -}} + + {{- end -}} +
    +
    +
  • + {{- end -}} + {{- end -}} +
+{{- end -}} diff --git a/layouts/partials/css.html b/layouts/partials/css.html new file mode 100644 index 0000000..b0b51c1 --- /dev/null +++ b/layouts/partials/css.html @@ -0,0 +1,3 @@ + + + diff --git a/layouts/partials/foot.html b/layouts/partials/foot.html new file mode 100644 index 0000000..16b1318 --- /dev/null +++ b/layouts/partials/foot.html @@ -0,0 +1,12 @@ +{{ with index .Site.Data "panaetius-theme" }} + {{ range $vendor := .assets }} + {{ if $vendor.js }} + + {{ end }} + {{ end }} +{{ end }} + +{{ range .Site.Params.customJS -}} + +{{ end }} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..c8400ae --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,58 @@ +
+
+
+
+
    + {{ if .Site.Params.social.rss -}} +
  • + {{- with .Site.GetPage "" -}} + {{- with .OutputFormats.Get "RSS" -}} + + + + + + + {{- end -}} + {{- end -}} +
  • + {{- end -}} + {{- if .Site.Params.social.email -}} +
  • + + + + + + +
  • + {{- end -}} + {{- range $name, $path := .Site.Params.social -}} + {{- if and $path (not (in (slice "rss" "email") $name)) -}} +
  • + + + + + + +
  • + {{- end -}} + {{- end }} +
+ +

+ {{ if .Site.Copyright }} + {{ .Site.Copyright | safeHTML }} + {{ else }} + Copyright © {{ .Site.Title }} {{ now.Year }} + {{ end }} +

+ + +
+
+
+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..4353365 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,165 @@ + + + + + {{- block "title" . -}} + {{- with .Params.Title -}} {{ . }} | {{ end }} + {{- .Site.Title -}} + {{- end -}} + + + +{{ $scratch := newScratch }} +{{ with .Params.Title }} +{{ $scratch.Set "title" . }} +{{ $scratch.Add "title" " | " }} +{{ end }} +{{ $scratch.Add "title" .Site.Title }} + + + + + + + + +{{ if .Description }} +{{ $scratch.Set "description" .Description}} +{{ else if .Site.Params.description }} +{{ $scratch.Set "description" .Site.Params.description }} +{{ end }} + + + + + + + + + + + + + + + + +{{ range .AllTranslations }} + +{{ end }} + + +{{ with .Params.images }} +{{ $image := index . 0 }} + + + + +{{ else }} + + + + +{{ end }} + + + + + +{{ with .OutputFormats.Get "RSS" }} + + +{{ end }} + + +{{ if eq .Section "post" }} + +{{ $paginator := .Paginate (where .Pages "Section" "post") }} +{{ if $paginator }} + + +{{ if $paginator.HasPrev }} + +{{end }} +{{ if $paginator.HasNext }} + +{{end }} +{{end }} + + + + +{{ if .Params.authors }} +{{ $authors := delimit .Params.authors ", " }} + + + +{{ else }} +{{ $authors := .Site.Params.author }} + + + +{{ end }} +{{ end }} + + +{{ if ne .Section "post" }} + + +{{ end }} + + + + + + + + + + + + + + + + + + + + + + + + + + +{{ if .Site.Params.prismJS.enable }} +{{ if .Site.Params.prismJS.theme }} + +{{ else }} + +{{ end }} +{{ end }} + +{{ with index .Site.Data "panaetius-theme" }} +{{ range $vendor := .assets }} +{{ if $vendor.css }} + +{{ end }} +{{ end }} +{{ end }} + +{{ range .Site.Params.customCSS -}} + +{{ end }} + + +{{- with .OutputFormats.Get "RSS" }} + + +{{- end -}} + +{{- template "_internal/opengraph.html" . -}} +{{- template "_internal/google_news.html" . -}} +{{- template "_internal/schema.html" . -}} +{{- template "_internal/twitter_cards.html" . -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..59b072a --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,26 @@ +{{ $current := . }} + diff --git a/layouts/partials/i18nlist.html b/layouts/partials/i18nlist.html new file mode 100644 index 0000000..486e1f3 --- /dev/null +++ b/layouts/partials/i18nlist.html @@ -0,0 +1,6 @@ +{{ if .IsTranslated }} + {{ range .Translations }} + + {{ end}} +{{ end }} diff --git a/layouts/partials/js.html b/layouts/partials/js.html new file mode 100644 index 0000000..7b3498b --- /dev/null +++ b/layouts/partials/js.html @@ -0,0 +1,9 @@ + + + + diff --git a/layouts/partials/related.html b/layouts/partials/related.html new file mode 100644 index 0000000..9dbae44 --- /dev/null +++ b/layouts/partials/related.html @@ -0,0 +1,10 @@ +{{- $related := .Site.RegularPages.Related . | first 3 -}} +{{- with $related -}} + +{{- end -}} diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html new file mode 100644 index 0000000..0ec7ada --- /dev/null +++ b/layouts/partials/schema.html @@ -0,0 +1,40 @@ + diff --git a/layouts/partials/sharer.html b/layouts/partials/sharer.html new file mode 100644 index 0000000..f13030b --- /dev/null +++ b/layouts/partials/sharer.html @@ -0,0 +1,24 @@ +{{- if and .Site.Params.share (ne .Params.share false) -}} +