mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
fix: appropriate back button and menu links for multi-language site (#386)
This commit is contained in:
parent
b3088be62d
commit
d04b3a8771
2 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@
|
||||||
{{ define "left-sidebar" }}
|
{{ define "left-sidebar" }}
|
||||||
{{ if (.Scratch.Get "hasTOC") }}
|
{{ if (.Scratch.Get "hasTOC") }}
|
||||||
<div id="article-toolbar">
|
<div id="article-toolbar">
|
||||||
<a href="{{ .Site.BaseURL }}" class="back-home">
|
<a href="{{ .Site.BaseURL | relLangURL }}" class="back-home">
|
||||||
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
{{ (resources.Get "icons/back.svg").Content | safeHTML }}
|
||||||
<span>{{ T "article.back" }}</span>
|
<span>{{ T "article.back" }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<h1 class="site-name"><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
|
||||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||||
|
|
||||||
<li {{ if $active }} class='current' {{ end }}>
|
<li {{ if $active }} class='current' {{ end }}>
|
||||||
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
<a href='{{ .URL | relLangURL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ partial "helper/icon" .Pre }}
|
{{ partial "helper/icon" .Pre }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue