i18n: fix back to home button

This commit is contained in:
log101 2023-12-11 07:07:57 +00:00
parent f131445ce9
commit 5ac92b98ba
5 changed files with 8 additions and 3 deletions

View File

@ -12,3 +12,5 @@
translation: "🞀 Back To Home" translation: "🞀 Back To Home"
- id: tags - id: tags
translation: "Tags" translation: "Tags"
- id: back-to-posts
translation: "🞀 Back to Posts"

View File

@ -4,3 +4,5 @@
translation: "Yazılar" translation: "Yazılar"
- id: tags - id: tags
translation: "Etiketler" translation: "Etiketler"
- id: back-to-posts
translation: "🞀 Yazılara Dön"

View File

@ -3,7 +3,7 @@
<div id="home-center"> <div id="home-center">
<h1 id="home-title">{{ .Site.Title }}</h1> <h1 id="home-title">{{ .Site.Title }}</h1>
<nav id="home-nav"> <nav id="home-nav">
{{ partialCached "menu.html" . }} {{ partial "menu.html" . }}
</nav> </nav>
</div> </div>
<div id="site-footer"> <div id="site-footer">

View File

@ -1,4 +1,4 @@
<header id="posts-header"> <header id="posts-header">
<a href="{{.Site.BaseURL}}">{{ i18n "backTitle" | safeHTML }}</a> <a href="{{ .Site.Home.Permalink | absLangURL }}">{{ i18n "backTitle" | safeHTML }}</a>
<h1 id="header-title">{{ i18n ( lower .Title ) }}</h1> <h1 id="header-title">{{ i18n ( lower .Title ) }}</h1>
</header> </header>

View File

@ -1,5 +1,6 @@
<header id="post-header"> <header id="post-header">
<a href="{{.Site.BaseURL}}">{{ i18n "backTitle" | safeHTML }}</a> {{ $link := "posts/" }}
<a href="{{ $link | absLangURL }}">{{ i18n "back-to-posts" | safeHTML }}</a>
<h1 id="post-title">{{ .Title }}</h1> <h1 id="post-title">{{ .Title }}</h1>
<div class="post-meta"><span>{{ time.Format .Site.Params.dateform .Date }}</span></div> <div class="post-meta"><span>{{ time.Format .Site.Params.dateform .Date }}</span></div>
</header> </header>