Managing i18n

This commit is contained in:
Hugo Martin 2020-08-04 18:47:20 +02:00 committed by Emruz Hossain
parent 6c2cca0127
commit 9930b37554
5 changed files with 37 additions and 12 deletions

View file

@ -29,7 +29,7 @@
</div>
{{ if .resume }}
<a href="{{ .resume }}" target="#"
><button class="btn btn-dark">My Resume</button></a
><button class="btn btn-dark">{{ i18n "resume"}}</button></a
>
{{ end }}
</div>

View file

@ -23,12 +23,18 @@
<span class="ityped-cursor"></span>
</div>
<ul id="typing-carousel-data">
{{ range .Site.Params.author.summary }}
<li>{{ . }}</li>
{{ if .Site.Params.author.summary }}
{{ range .Site.Params.author.summary }}
<li>{{ . }}</li>
{{ end}}
{{ else }}
{{ range (split (i18n "quotes") ";") }}
<li>{{ . }}</li>
{{ end}}
{{ end }}
</ul>
{{ if .Site.Data.sections }}
{{ range first 1 (where (sort .Site.Data.sections "section.weight") ".section.enable" true) }}
{{ if (index .Site.Data .Site.Language.Lang).sections }}
{{ range first 1 (where (sort (index .Site.Data .Site.Language.Lang).sections "section.weight") ".section.enable" true) }}
<a href="#{{ replace (lower .section.name) " " "-" }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
{{ end }}
{{ end }}