mirror of https://github.com/istio/istio.io.git
More translation work.
- Add a language selection menu selection in the gear menu. - Fix the Blog link in the top nav to use the proper trsanslated term and target page.
This commit is contained in:
parent
94ff6c9c44
commit
76d6469251
|
|
@ -13,7 +13,7 @@
|
|||
<link>{{ $home }}</link>
|
||||
</image>
|
||||
|
||||
{{ $pages := (where .Site.AllPages "Section" "blog").ByPublishDate }}
|
||||
{{ $pages := (where .Site.Pages "Section" "blog").ByPublishDate }}
|
||||
|
||||
{{ range $post := $pages }}
|
||||
{{ if and (not $post.Draft) $post.IsPage }}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ $posts := (where .Site.AllPages "Section" "blog").ByPublishDate.Reverse }}
|
||||
{{ $posts := (where .Site.Pages "Section" "blog").ByPublishDate.Reverse }}
|
||||
{{ $latest_post := index $posts 0 }}
|
||||
{{ $version := .Site.Data.args.version }}
|
||||
|
||||
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
<header>
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark justify-content-between">
|
||||
<a class="navbar-brand" href="/">
|
||||
{{ $home := .Site.GetPage "home" }}
|
||||
|
||||
<a class="navbar-brand" href="{{ $home.Permalink }}">
|
||||
<span class="logo">{{ partial "icons/istio-logo-blue-background-round.svg" }}</span>
|
||||
|
||||
{{ if .Site.Data.args.archive }}
|
||||
|
|
@ -64,6 +66,11 @@
|
|||
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<a href="/" class="dropdown-item {{ if eq $home.Lang "en" }}active{{ end }}">English</a>
|
||||
<a href="/cn" class="dropdown-item {{ if eq $home.Lang "cn" }}active{{ end }}">中文</a>
|
||||
|
||||
<div class="dropdown-divider"></div>
|
||||
|
||||
<a class="dropdown-item" id="light-theme-item" href="" onclick="setActiveStyleSheet('light');return false;">{{ i18n "light_theme" }}</a>
|
||||
<a class="dropdown-item" id="dark-theme-item" href="" onclick="setActiveStyleSheet('dark');return false;">{{ i18n "dark_theme" }}</a>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="directory" role="tablist">
|
||||
{{ $section := .Site.GetPage "section" .Section }}
|
||||
|
||||
{{ $pages := (where .Site.AllPages "Section" .Section).ByWeight }}
|
||||
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
|
||||
{{ $current := . }}
|
||||
|
||||
{{ range $count, $page := $pages }}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{ $pages := (where .Site.AllPages "Section" .Section).ByWeight }}
|
||||
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
|
||||
|
||||
<div role="tabpanel" aria-labelledby="header0">
|
||||
<div class="card-body">
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<p>{{ .Description }}</p>
|
||||
|
||||
<div class="section-index">
|
||||
{{ $pages := (where .Site.AllPages "Section" .Section).ByWeight }}
|
||||
{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }}
|
||||
{{ partial "section-index-level.html" (dict "pages" $pages "parent" . ) }}
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue