diff --git a/layouts/.DS_Store b/layouts/.DS_Store new file mode 100644 index 0000000..830b626 Binary files /dev/null and b/layouts/.DS_Store differ diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..3eb31b3 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,24 @@ + + + + + + + + {{ 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 @@ +
+ {{ $page := . }} + + {{- with $page.Params.images -}} + {{- $images := . -}} + {{- with $page.Site.GetPage "section" "images" -}} + {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}} + {{- $image := . -}} + {{ $page.Title }} + {{- end -}} + {{- end -}} + {{- end -}} +
+

{{ $page.Title }}

+

{{ $page.Date.Format "January 2, 2006" }}

+
+ {{ $page.Summary | plainify }} +
+
+
+
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 -}} + +{{- 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 @@ + 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) -}} +