From 2ddbc2b056af0585b905606a2c6887d43f9c3b01 Mon Sep 17 00:00:00 2001 From: Leonardo Santiago Date: Sat, 1 Jun 2024 17:30:03 -0300 Subject: localize bearblog, update some UI --- themes/hugo-bearblog | 1 - themes/hugo-bearblog/layouts/404.html | 6 + themes/hugo-bearblog/layouts/_default/baseof.html | 43 +++++ themes/hugo-bearblog/layouts/_default/list.html | 38 +++++ themes/hugo-bearblog/layouts/_default/single.html | 20 +++ themes/hugo-bearblog/layouts/index.html | 3 + .../layouts/partials/custom_body.html | 3 + .../layouts/partials/custom_head.html | 3 + themes/hugo-bearblog/layouts/partials/favicon.html | 2 + themes/hugo-bearblog/layouts/partials/footer.html | 1 + themes/hugo-bearblog/layouts/partials/header.html | 4 + themes/hugo-bearblog/layouts/partials/nav.html | 7 + .../hugo-bearblog/layouts/partials/seo_tags.html | 13 ++ themes/hugo-bearblog/layouts/partials/style.html | 173 +++++++++++++++++++++ themes/hugo-bearblog/layouts/robots.txt | 2 + 15 files changed, 318 insertions(+), 1 deletion(-) delete mode 160000 themes/hugo-bearblog create mode 100644 themes/hugo-bearblog/layouts/404.html create mode 100644 themes/hugo-bearblog/layouts/_default/baseof.html create mode 100644 themes/hugo-bearblog/layouts/_default/list.html create mode 100644 themes/hugo-bearblog/layouts/_default/single.html create mode 100644 themes/hugo-bearblog/layouts/index.html create mode 100644 themes/hugo-bearblog/layouts/partials/custom_body.html create mode 100644 themes/hugo-bearblog/layouts/partials/custom_head.html create mode 100644 themes/hugo-bearblog/layouts/partials/favicon.html create mode 100644 themes/hugo-bearblog/layouts/partials/footer.html create mode 100644 themes/hugo-bearblog/layouts/partials/header.html create mode 100644 themes/hugo-bearblog/layouts/partials/nav.html create mode 100644 themes/hugo-bearblog/layouts/partials/seo_tags.html create mode 100644 themes/hugo-bearblog/layouts/partials/style.html create mode 100644 themes/hugo-bearblog/layouts/robots.txt (limited to 'themes/hugo-bearblog/layouts') diff --git a/themes/hugo-bearblog b/themes/hugo-bearblog deleted file mode 160000 index efc24bc..0000000 --- a/themes/hugo-bearblog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit efc24bc5e95f0ccb88051e1a7d95e8a1404e953e diff --git a/themes/hugo-bearblog/layouts/404.html b/themes/hugo-bearblog/layouts/404.html new file mode 100644 index 0000000..c6b3dfd --- /dev/null +++ b/themes/hugo-bearblog/layouts/404.html @@ -0,0 +1,6 @@ +{{ define "title" }}404{{ end }} + +{{ define "main" }} +

404

+

ʕノ•ᴥ•ʔノ ︵ ┻━┻

+{{ end }} diff --git a/themes/hugo-bearblog/layouts/_default/baseof.html b/themes/hugo-bearblog/layouts/_default/baseof.html new file mode 100644 index 0000000..6bce2dc --- /dev/null +++ b/themes/hugo-bearblog/layouts/_default/baseof.html @@ -0,0 +1,43 @@ + + + + + + + + {{- partial "favicon.html" . -}} + {{- block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{- end }} + + {{- partial "seo_tags.html" . -}} + + + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{- partial "style.html" . -}} + + + {{- partial "custom_head.html" . -}} + + + +
+ {{- partial "header.html" . -}} +
+
+ {{- block "main" . }}{{- end }} +
+ + + + {{- partial "custom_body.html" . -}} + + + diff --git a/themes/hugo-bearblog/layouts/_default/list.html b/themes/hugo-bearblog/layouts/_default/list.html new file mode 100644 index 0000000..443cd2f --- /dev/null +++ b/themes/hugo-bearblog/layouts/_default/list.html @@ -0,0 +1,38 @@ +{{ define "main" }} + + {{ if .Data.Singular }} +

filtering for "{{ .Title }}"

+ + remove filter + + {{ end }} + + {{ if .Data.Singular }} + {{else}} + +
+ {{ range .Site.Taxonomies.tags }} + #{{ .Page.Title }}  + {{ end }} +
+
+ {{ end }} +
+{{ end }} diff --git a/themes/hugo-bearblog/layouts/_default/single.html b/themes/hugo-bearblog/layouts/_default/single.html new file mode 100644 index 0000000..346c9bc --- /dev/null +++ b/themes/hugo-bearblog/layouts/_default/single.html @@ -0,0 +1,20 @@ +{{ define "main" }} +{{ if eq .Type "blog" }}{{ if not .Params.menu }} +

{{ .Title }}

+

+ + + +

+{{ end }}{{ end }} + + {{ .Content }} + +

+ {{ range (.GetTerms "tags") }} + #{{ .LinkTitle }} + {{ end }} +

+{{ end }} diff --git a/themes/hugo-bearblog/layouts/index.html b/themes/hugo-bearblog/layouts/index.html new file mode 100644 index 0000000..9983b08 --- /dev/null +++ b/themes/hugo-bearblog/layouts/index.html @@ -0,0 +1,3 @@ +{{ define "main" }} +{{ .Content }} +{{ end }} diff --git a/themes/hugo-bearblog/layouts/partials/custom_body.html b/themes/hugo-bearblog/layouts/partials/custom_body.html new file mode 100644 index 0000000..951fb15 --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/custom_body.html @@ -0,0 +1,3 @@ + diff --git a/themes/hugo-bearblog/layouts/partials/custom_head.html b/themes/hugo-bearblog/layouts/partials/custom_head.html new file mode 100644 index 0000000..4c53c40 --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/custom_head.html @@ -0,0 +1,3 @@ + diff --git a/themes/hugo-bearblog/layouts/partials/favicon.html b/themes/hugo-bearblog/layouts/partials/favicon.html new file mode 100644 index 0000000..ccf1a5d --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/favicon.html @@ -0,0 +1,2 @@ +{{ with .Site.Params.favicon }} +{{ end }} diff --git a/themes/hugo-bearblog/layouts/partials/footer.html b/themes/hugo-bearblog/layouts/partials/footer.html new file mode 100644 index 0000000..8eca955 --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/footer.html @@ -0,0 +1 @@ +{{ if ne .Site.Params.hideMadeWithLine true }}Made with Hugo ʕ•ᴥ•ʔ Bear{{ end }} diff --git a/themes/hugo-bearblog/layouts/partials/header.html b/themes/hugo-bearblog/layouts/partials/header.html new file mode 100644 index 0000000..9bb5112 --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/header.html @@ -0,0 +1,4 @@ + +

{{ .Site.Title }}

+
+ diff --git a/themes/hugo-bearblog/layouts/partials/nav.html b/themes/hugo-bearblog/layouts/partials/nav.html new file mode 100644 index 0000000..f4fabed --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/nav.html @@ -0,0 +1,7 @@ +Home +{{ range .Site.Menus.main }} +{{ .Name }} +{{ end }} +{{ with .Site.GetPage "/blog" }} +Blog +{{ end }} diff --git a/themes/hugo-bearblog/layouts/partials/seo_tags.html b/themes/hugo-bearblog/layouts/partials/seo_tags.html new file mode 100644 index 0000000..0b01f8b --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/seo_tags.html @@ -0,0 +1,13 @@ + + + + + + +{{ template "_internal/opengraph.html" . }} + + +{{ template "_internal/twitter_cards.html" . }} + + +{{ template "_internal/schema.html" . }} diff --git a/themes/hugo-bearblog/layouts/partials/style.html b/themes/hugo-bearblog/layouts/partials/style.html new file mode 100644 index 0000000..122a641 --- /dev/null +++ b/themes/hugo-bearblog/layouts/partials/style.html @@ -0,0 +1,173 @@ + diff --git a/themes/hugo-bearblog/layouts/robots.txt b/themes/hugo-bearblog/layouts/robots.txt new file mode 100644 index 0000000..0326f5c --- /dev/null +++ b/themes/hugo-bearblog/layouts/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Sitemap: {{ "sitemap.xml" | absURL }} -- cgit v1.2.3