From 1964f176d2d47f0ba2bb2cf948a09233f7a5e3d9 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Tue, 26 Sep 2023 15:54:37 -0400 Subject: [PATCH] Fixed amp pages --- layouts/_default/baseof.amp.html | 8 + layouts/_default/baseof.html | 1 + layouts/_default/list.html | 1 - layouts/_default/single.html | 1 - layouts/_default/stats.html | 1 - layouts/blog/list.html | 1 - layouts/blog/single.amp.html | 46 +++ layouts/blog/single.html | 1 - layouts/feed/list.html | 1 - layouts/observations/list.html | 1 - layouts/observations/single.html | 3 - layouts/paper/single.html | 1 - layouts/partials/footer.amp.html | 41 +++ layouts/partials/head.amp.html | 78 ++++++ layouts/partials/style.amp.html | 463 +++++++++++++++++++++++++++++++ layouts/toots/list.html | 1 - layouts/toots/single.html | 3 - layouts/tracks/list.html | 1 - layouts/tracks/single.html | 1 - 19 files changed, 637 insertions(+), 17 deletions(-) create mode 100644 layouts/_default/baseof.amp.html create mode 100644 layouts/blog/single.amp.html create mode 100644 layouts/partials/footer.amp.html create mode 100644 layouts/partials/head.amp.html create mode 100644 layouts/partials/style.amp.html diff --git a/layouts/_default/baseof.amp.html b/layouts/_default/baseof.amp.html new file mode 100644 index 0000000..434cbab --- /dev/null +++ b/layouts/_default/baseof.amp.html @@ -0,0 +1,8 @@ + + + {{ partial "head.amp.html" . }} + + {{ block "main" . }}{{ end }} + + {{ partial "footer.amp.html" . }} + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6bf669a..2cfae89 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,4 +4,5 @@ {{ block "main" . }}{{ end }} + {{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4a687c0..6a070c1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,5 +8,4 @@ {{ .Content }} - {{ partial "footer.html" . }} {{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 1c3a4c4..7068c75 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,5 +8,4 @@ {{ .Content }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/_default/stats.html b/layouts/_default/stats.html index 7dd3f6a..fad91b1 100644 --- a/layouts/_default/stats.html +++ b/layouts/_default/stats.html @@ -117,5 +117,4 @@ -{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 638c6e0..2897b9b 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -43,5 +43,4 @@ {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/blog/single.amp.html b/layouts/blog/single.amp.html new file mode 100644 index 0000000..19f1da7 --- /dev/null +++ b/layouts/blog/single.amp.html @@ -0,0 +1,46 @@ +{{ define "main"}} +{{ .Scratch.Set "customTitleHeaderSet" true }} +{{ .Scratch.Set "customTitleHeader" "Blog" }} +{{ .Scratch.Set "customTitleHeaderLink" "/blog" }} +{{ partial "header.html" . }} +
+
+

{{ .Title }}

+ + + {{ .Scratch.Set "beforeDateString" "Published on "}} + {{ partial "date.html" . }} + {{ partial "reading_time.html" . }} + {{ partial "tags/page.html" . }} + +
+ {{ .Content }} +
+
+ {{ partial "sharepost.html" . }} + Reply via Email + +
+ + +{{ end }} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 566c35d..5436d85 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -44,5 +44,4 @@ }] } -{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/feed/list.html b/layouts/feed/list.html index 7f26c64..62d0018 100644 --- a/layouts/feed/list.html +++ b/layouts/feed/list.html @@ -20,5 +20,4 @@ {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/observations/list.html b/layouts/observations/list.html index 57fd69e..6c988f7 100644 --- a/layouts/observations/list.html +++ b/layouts/observations/list.html @@ -36,5 +36,4 @@ {{ end }} {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/observations/single.html b/layouts/observations/single.html index 7556023..b1f0fd9 100644 --- a/layouts/observations/single.html +++ b/layouts/observations/single.html @@ -36,7 +36,4 @@ {{ end }} - - -{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/paper/single.html b/layouts/paper/single.html index f656fe3..95937d3 100644 --- a/layouts/paper/single.html +++ b/layouts/paper/single.html @@ -65,5 +65,4 @@ -{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/partials/footer.amp.html b/layouts/partials/footer.amp.html new file mode 100644 index 0000000..a862c89 --- /dev/null +++ b/layouts/partials/footer.amp.html @@ -0,0 +1,41 @@ + diff --git a/layouts/partials/head.amp.html b/layouts/partials/head.amp.html new file mode 100644 index 0000000..5927845 --- /dev/null +++ b/layouts/partials/head.amp.html @@ -0,0 +1,78 @@ + + + + + + {{- if eq .Title .Site.Title -}} + {{ .Site.Title }} + {{- else -}} + {{ .Title }} | {{ .Site.Title }} + {{- end -}} + + + + + + + + + + + + {{- range .Site.Params.identities -}} + + {{ end -}} + + + {{ $siteHost := (urls.Parse .Site.BaseURL).Host -}} + + + + + {{- if .IsHome -}} + + + + + {{ else }} + {{ range .AlternativeOutputFormats -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end }} + {{ end -}} + + {{ partial "style.amp" .}} + + + + {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}} + {{- template "_internal/opengraph.html" . -}} + {{- template "_internal/schema.html" . -}} + {{- partial "external/twitter_cards.html" . -}} + + {{ partial "citation.html" . }} + + + + + + + diff --git a/layouts/partials/style.amp.html b/layouts/partials/style.amp.html new file mode 100644 index 0000000..4127a40 --- /dev/null +++ b/layouts/partials/style.amp.html @@ -0,0 +1,463 @@ + diff --git a/layouts/toots/list.html b/layouts/toots/list.html index 82f7df8..15f54cc 100644 --- a/layouts/toots/list.html +++ b/layouts/toots/list.html @@ -25,5 +25,4 @@ {{ end }} {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/toots/single.html b/layouts/toots/single.html index b6497a2..d8ea4e9 100644 --- a/layouts/toots/single.html +++ b/layouts/toots/single.html @@ -20,7 +20,4 @@ {{ .Scratch.Set "toot" $dataJ }} {{ partial "external/toot.html" . }} - - -{{ partial "footer.html" . }} {{ end }} diff --git a/layouts/tracks/list.html b/layouts/tracks/list.html index c785d5e..1f2218c 100644 --- a/layouts/tracks/list.html +++ b/layouts/tracks/list.html @@ -16,5 +16,4 @@ {{ end }} - {{ partial "footer.html" . }} {{ end }} diff --git a/layouts/tracks/single.html b/layouts/tracks/single.html index 8e4de5f..6628d8a 100644 --- a/layouts/tracks/single.html +++ b/layouts/tracks/single.html @@ -24,5 +24,4 @@ {{ partial "webmentions.html" . }} -{{ partial "footer.html" . }} {{ end }}