From 3ec95503252645b87c625df10a8ac44d04563166 Mon Sep 17 00:00:00 2001 From: "C. Lente" <7017340+clente@users.noreply.github.com> Date: Wed, 1 Feb 2023 15:06:05 -0300 Subject: Bring files from personal blog --- layouts/_default/baseof.html | 5 +++-- layouts/_default/list.html | 28 +++++++++++++++------------- layouts/_default/single.html | 6 +++--- layouts/i18n/en.toml | 26 ++++++++++++++++++++++++++ layouts/i18n/pt.toml | 26 ++++++++++++++++++++++++++ layouts/partials/footer.html | 6 +++++- layouts/partials/header.html | 2 +- layouts/partials/nav.html | 20 ++++++++++++++------ layouts/partials/style.html | 4 ++++ layouts/robots.txt | 3 ++- layouts/shortcodes/rawhtml.html | 2 ++ 11 files changed, 101 insertions(+), 27 deletions(-) create mode 100644 layouts/i18n/en.toml create mode 100644 layouts/i18n/pt.toml create mode 100644 layouts/shortcodes/rawhtml.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6bce2dc..1f30b5d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,12 +11,13 @@ {{- partial "seo_tags.html" . -}} + {{ $css := resources.Get "style.css" | minify }} + + {{ with .OutputFormats.Get "rss" -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - {{- partial "style.html" . -}} - diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 8b8c14b..6c4f7d0 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,10 +1,10 @@ {{ define "main" }} {{ if .Data.Singular }} -

Filtering for "{{ .Title }}"

- - Remove filter - +

{{ i18n "filter" }} "{{ .Title }}"

+ + {{ i18n "remove" }} + {{ end }} {{ if .Data.Singular }} {{else}} - -
- {{ range .Site.Taxonomies.tags }} - #{{ .Page.Title }}  - {{ end }} -
-
- {{ end }} +
+ {{ range .Site.Taxonomies.tags }} + #{{ .Page.Title }}   + {{ end }} +
+ {{ end }}
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7d57351..40d0b03 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,5 @@ {{ define "main" }} -{{ if eq .Type "blog" }}{{ if not .Params.menu }} +{{ if not .Params.menu }}

{{ .Title }}

@@ -8,13 +8,13 @@

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

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

{{ end }} diff --git a/layouts/i18n/en.toml b/layouts/i18n/en.toml new file mode 100644 index 0000000..708eb64 --- /dev/null +++ b/layouts/i18n/en.toml @@ -0,0 +1,26 @@ +[home] + other = '/en' + +[posts] + other = '/en/posts' + +[other-lang] + other = "Português 🇧🇷" + +[other-home] + other = "/" + +[reply] + other = 'Reply to ' + +[filter] + other = 'Filtering for' + +[remove] + other = 'Remove filter' + +[stone] + other = 'Made of stone' + +[stone-link] + other = '/en/posts/stone-websites' \ No newline at end of file diff --git a/layouts/i18n/pt.toml b/layouts/i18n/pt.toml new file mode 100644 index 0000000..d2f2548 --- /dev/null +++ b/layouts/i18n/pt.toml @@ -0,0 +1,26 @@ +[home] + other = '/' + +[posts] + other = '/posts' + +[other-lang] + other = "English 🇺🇸" + +[other-home] + other = "/en" + +[reply] + other = 'Resposta a ' + +[filter] + other = 'Filtrando para' + +[remove] + other = 'Remover filtro' + +[stone] + other = 'Feito de pedra' + +[stone-link] + other = '/posts/sites-de-pedra' \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8eca955..83a3214 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1 +1,5 @@ -{{ if ne .Site.Params.hideMadeWithLine true }}Made with Hugo ʕ•ᴥ•ʔ Bear{{ end }} +{{ if ne .Site.Params.hideMadeWithLine true }} + + {{ .Site.Copyright }} | {{ i18n "stone" }} + +{{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e47df70..ba8e9ec 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,4 @@ - +

{{ .Site.Title }}

diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index def9b6e..951e433 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,7 +1,15 @@ -Home -{{ range .Site.Menus.main }} -{{ .Name }} -{{ end }} -{{ with .Site.GetPage "/blog" }} -Blog +Home +Blog +Email +RSS + +{{ $pageLang := .Page.Lang }} +{{ if .IsTranslated }} + {{ range .Translations }} + {{ if ne $pageLang .Lang }} + {{ i18n "other-lang" }} + {{ end }} + {{ end }} +{{ else }} + {{ i18n "other-lang" }} {{ end }} diff --git a/layouts/partials/style.html b/layouts/partials/style.html index 122a641..6ac5bc7 100644 --- a/layouts/partials/style.html +++ b/layouts/partials/style.html @@ -126,6 +126,10 @@ color: #8b6fcb; } + h3.blog-filter { + margin-bottom: 0; + } + @media (prefers-color-scheme: dark) { body { background-color: #333; diff --git a/layouts/robots.txt b/layouts/robots.txt index 0326f5c..4f4ca44 100644 --- a/layouts/robots.txt +++ b/layouts/robots.txt @@ -1,2 +1,3 @@ -User-Agent: * +User-agent: * +Allow: / Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..520ec17 --- /dev/null +++ b/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{.Inner}} \ No newline at end of file -- cgit v1.2.3