diff options
author | C. Lente <7017340+clente@users.noreply.github.com> | 2023-02-09 16:56:09 -0300 |
---|---|---|
committer | C. Lente <7017340+clente@users.noreply.github.com> | 2023-02-09 16:56:09 -0300 |
commit | 2ba59f18db6d5767653e3cad20d9a28da5f9aa79 (patch) | |
tree | f3cf1e0f5f519f6a9524c47c165167998ec4fbfb /layouts | |
parent | 3ec95503252645b87c625df10a8ac44d04563166 (diff) | |
download | hugo-bearcub-2ba59f18db6d5767653e3cad20d9a28da5f9aa79.tar.gz hugo-bearcub-2ba59f18db6d5767653e3cad20d9a28da5f9aa79.tar.bz2 |
Reproduce lente.dev setup
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 7 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/i18n/en.toml | 26 | ||||
-rw-r--r-- | layouts/i18n/pt.toml | 26 | ||||
-rw-r--r-- | layouts/partials/footer.html | 8 | ||||
-rw-r--r-- | layouts/partials/header.html | 4 | ||||
-rw-r--r-- | layouts/partials/nav.html | 19 |
7 files changed, 18 insertions, 74 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 6c4f7d0..67924e7 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,10 +1,7 @@ {{ define "main" }} <content> {{ if .Data.Singular }} - <h3 style="margin-bottom:0">{{ i18n "filter" }} "{{ .Title }}"</h3> - <small> - <a href="{{ i18n "posts" }}">{{ i18n "remove" }}</a> - </small> + <h3 style="margin-bottom:0">{{ i18n "filtering-for" }} "{{ .Title }}"</h3> {{ end }} <ul class="blog-posts"> {{ range .Pages }} @@ -12,7 +9,7 @@ <span> <i> <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate> - {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }} + {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }} </time> </i> </span> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 40d0b03..cd6b095 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,7 +4,7 @@ <p> <i> <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate> - {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }} + {{ .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }} </time> </i> </p> diff --git a/layouts/i18n/en.toml b/layouts/i18n/en.toml deleted file mode 100644 index 708eb64..0000000 --- a/layouts/i18n/en.toml +++ /dev/null @@ -1,26 +0,0 @@ -[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 deleted file mode 100644 index d2f2548..0000000 --- a/layouts/i18n/pt.toml +++ /dev/null @@ -1,26 +0,0 @@ -[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 83a3214..dca6c23 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,3 @@ -{{ if ne .Site.Params.hideMadeWithLine true }} - <small> - {{ .Site.Copyright }} | <a href="{{ i18n "stone-link" }}">{{ i18n "stone" }}</a> - </small> -{{ end }} +<small> + {{ .Site.Copyright }} | {{ markdownify .Site.Language.Params.params.madeWith }} +</small>
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index ba8e9ec..f8e3fd8 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,2 @@ -<a href="{{ i18n "home" | relURL }}" class="title"> - <h2>{{ .Site.Title }}</h2> -</a> +<a href="{{ .Site.Language.Params.params.home }}" class="title"><h2>{{ .Site.Title }}</h2></a> <nav>{{- partial "nav.html" . -}}</nav> diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 951e433..95e33bc 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,15 +1,18 @@ -<a href={{ i18n "home" | relURL }}>Home</a> -<a href={{ i18n "posts" }}>Blog</a> -<a href="mailto:c@lente.dev?subject={{ i18n "reply" }}'{{ .Page.Title | default .Site.Title }}'">Email</a> -<a href="/index.xml">RSS</a> - +{{ range .Site.Menus.main }} + <a href="{{ .URL | absLangURL }}">{{ .Name }}</a> +{{ end }} {{ $pageLang := .Page.Lang }} {{ if .IsTranslated }} {{ range .Translations }} {{ if ne $pageLang .Lang }} - <a href="{{ .Permalink }}">{{ i18n "other-lang" }}</a> + <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> {{ end }} {{ end }} -{{ else }} - <a class="disabled" href="">{{ i18n "other-lang" }}</a> +{{ else if not .Site.Params.hideUntranslated }} + <a class="disabled" href="">{{ .Language.LanguageName }}</a> {{ end }} + +<!-- <a href={{ i18n "home" | relURL }}>Home</a> +<a href={{ i18n "posts" }}>Blog</a> +<a href="mailto:c@lente.dev?subject={{ i18n "reply" }}'{{ .Page.Title | default .Site.Title }}'">Email</a> +<a href="/index.xml">RSS</a> -->
\ No newline at end of file |