mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
support Multilingual navigation
add reading time as i18n
This commit is contained in:
parent
04f9fabf92
commit
e35915a561
@ -20,7 +20,7 @@
|
|||||||
<div class="archive-meta">
|
<div class="archive-meta">
|
||||||
{{- if or .Params.author .Site.Params.author }}{{- .Params.author | default .Site.Params.author }} ·
|
{{- if or .Params.author .Site.Params.author }}{{- .Params.author | default .Site.Params.author }} ·
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $.Site.Params.ShowReadingTime }}{{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}
|
{{ if $.Site.Params.ShowReadingTime }}{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}
|
||||||
· {{ end }}
|
· {{ end }}
|
||||||
{{- .Date.Format "January 2, 2006" -}}
|
{{- .Date.Format "January 2, 2006" -}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.LanguageCode }}">
|
<html lang="{{ .Site.Language }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
{{- partial "head.html" . }}
|
{{- partial "head.html" . }}
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||||
{{ if $.Site.Params.ShowReadingTime }} .
|
{{ if $.Site.Params.ShowReadingTime }} .
|
||||||
{{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }}
|
{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}{{ end }}
|
||||||
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
|
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
<a class="entry-link" href="{{ .Permalink }}"></a>
|
<a class="entry-link" href="{{ .Permalink }}"></a>
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<footer class="entry-footer">
|
<footer class="entry-footer">
|
||||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
||||||
{{ if $.Site.Params.ShowReadingTime }} .
|
{{ if $.Site.Params.ShowReadingTime }} .
|
||||||
{{ .ReadingTime }}{{ $.Site.Params.MinuteReadingTime | default "min read" }}{{ end }}
|
{{ .ReadingTime }}{{ i18n "read_time" | default "min read" }}{{ end }}
|
||||||
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
|
{{ if or .Params.author .Site.Params.author }} . {{ .Params.author | default .Site.Params.author }}{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
<a class="entry-link" href="{{ .Permalink }}"></a>
|
<a class="entry-link" href="{{ .Permalink }}"></a>
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
{{- if .Params.tags }}
|
{{- if .Params.tags }}
|
||||||
<ul class="post-tags">
|
<ul class="post-tags">
|
||||||
{{- range .Params.tags }}
|
{{- range .Params.tags }}
|
||||||
{{- $href := print (absURL "tags/") (urlize .) }}
|
{{- $href := print (absLangURL "tags/") (urlize .) }}
|
||||||
<li><a href="{{ $href }}">{{ . }}</a></li>
|
<li><a href="{{ $href }}">{{ . }}</a></li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<span>© {{ now.Year }} <a href="{{ "" | absURL }}">{{ .Site.Title }}</a></span>
|
<span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
|
<span>Powered by <a href="https://gohugo.io/" rel="noopener" target="_blank">Hugo️️</a>️</span>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
{{- if .IsHome }}
|
{{- if .IsHome }}
|
||||||
<h1 class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></h1>
|
<h1 class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></h1>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<p class="logo"><a href="{{ "" | absURL }}">{{ .Site.Title }}</a></p>
|
<p class="logo"><a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Site.Menus.main }}
|
{{- if .Site.Menus.main }}
|
||||||
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
<ul class="menu" id="menu" onscroll="menu_on_scroll()">
|
||||||
{{- range .Site.Menus.main }}
|
{{- range .Site.Menus.main }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
<a href="{{ .URL | absLangURL}}">{{ .Name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user