feat(i18n): initial support for i18n

This commit is contained in:
Jimmy Cai
2020-09-09 17:17:09 +02:00
parent 98804e578d
commit ed4a43096c
8 changed files with 34 additions and 8 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
<div class="widget-icon">
{{ (resources.Get "icons/infinity.svg").Content | safeHTML }}
</div>
<h1 class="widget-title">Archive</h1>
<h1 class="widget-title">{{ T "widgetArchiveTitle" }}</h1>
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
@@ -22,7 +22,7 @@
{{ if gt (len $archive) .Site.Params.widgets.archive.limit }}
<div class="archive-year">
<a href="{{ $.Site.BaseURL }}/archive">
<span class="year">More</span>
<span class="year">{{ T "widgetArchiveMore" }}</span>
</a>
</div>
{{ end }}
+1 -1
View File
@@ -5,7 +5,7 @@
<div class="widget-icon">
{{ (resources.Get "icons/tag.svg").Content | safeHTML }}
</div>
<h1 class="widget-title">Tags</h1>
<h1 class="widget-title">{{ T "widgetTagCloudTitle" }}</h1>
<div class="tagCloud-tags">
{{ range first .Site.Params.widgets.tagCloud.limit $v2 }}