Fix multilingual site layouts/templates.

This commit is contained in:
Egon Elbre 2015-04-26 18:42:09 +03:00 committed by bep
parent 3596b1b810
commit 9123ac559e
17 changed files with 77 additions and 107 deletions

View file

@ -1,6 +1,6 @@
baseurl = "" baseurl = "http://example.com"
[taxonomies] [taxonomies]
tag = "tags" tag = "tags"
group = "groups" group = "groups"
menu = "menu" menu = "menu"

View file

@ -1,12 +1,12 @@
--- +++
title: "About" title = "About"
linktitle: "About" linktitle = "About"
url: /about url = "/about"
lang: "en" lang = "en"
menu: ["en"] menu = ["en"]
menu_weight: 30 menu_weight = 30
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.

View file

@ -1,12 +1,12 @@
--- +++
title: "Minust" title = "Minust"
linktitle: "Minust" linktitle = "Minust"
url: /minust url = "/minust"
lang: "et" lang = "et"
menu: ["et"] menu = ["et"]
menu_weight: 30 menu_weight = 30
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.

View file

@ -1,12 +1,12 @@
--- +++
title: "" title = "Home"
linktitle: "Home" linktitle = "Home"
url: / url = "/home"
lang: "en" lang = "en"
menu: ["en"] menu = ["en"]
menu_weight: 0 menu_weight = 0
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.

View file

@ -1,12 +1,12 @@
--- +++
title: "" title = "Kodu"
linktitle: "Kodu" linktitle = "Kodu"
url: /kodu url = "/kodu"
lang: "et" lang = "et"
menu: ["et"] menu = ["et"]
menu_weight: 0 menu_weight = 0
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.

View file

@ -1,9 +1,9 @@
--- +++
title: "Alpha" title = "Alpha"
lang: "en" lang = "en"
groups: ["news"] groups = ["news"]
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.

View file

@ -1,9 +1,9 @@
--- +++
title: "Beta" title = "Beta"
lang: "en" lang = "en"
groups: ["news"] groups = ["news"]
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.

View file

@ -1,10 +1,10 @@
--- +++
title: "News" title = "News"
linktitle: "News" linktitle = "News"
url: /news url = "/news"
type: list
lang: "en" listing = true
menu: ["en"] lang = "en"
menu_weight: 10 menu = ["en"]
--- menu_weight = 10
+++

View file

@ -1,9 +1,9 @@
--- +++
title: "Alfa" title = "Alfa"
lang: "et" lang = "et"
groups: ["uudised"] groups = ["uudised"]
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.

View file

@ -1,9 +1,9 @@
--- +++
title: "Beeta" title = "Beeta"
lang: "et" lang = "et"
groups: ["uudised"] groups = ["uudised"]
--- +++
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.

View file

@ -1,10 +1,10 @@
--- +++
title: "Uudised" title = "Uudised"
linktitle: "Uudised" linktitle = "Uudised"
url: /uudised url = "/uudised"
type: list
lang: "et" listing = true
menu: ["et"] lang = "et"
menu_weight: 10 menu = ["et"]
--- menu_weight = 10
+++

View file

@ -1,4 +1,4 @@
{{ partial "head.html" . }} {{ partial "head.html" . }}
{{ partial "header.html" . }} {{ partial "header.html" . }}
{{ if .IsPage }}{{ .Content }}{{ end }} {{ .Content }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}

View file

@ -1,3 +1,3 @@
<footer>(Ↄ) 2013 Egon Elbre</footer> <footer>(Ↄ) 2015 example.com</footer>
</body> </body>
</html> </html>

View file

@ -1,7 +1,7 @@
<header> <header>
<nav class="menu language-menu"> <nav class="menu language-menu">
<ul> <ul>
<li><a href="/">English</a></li> <li><a href="/home">English</a></li>
<li><a href="/kodu">Eesti</a></li> <li><a href="/kodu">Eesti</a></li>
</ul> </ul>
<div class="clear"></div> <div class="clear"></div>
@ -15,7 +15,7 @@
<nav class="menu main-menu"> <nav class="menu main-menu">
<ul> <ul>
{{ range (index .Site.Indexes.menu .Params.lang).Pages }} {{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li> <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -1,15 +0,0 @@
{{ partial "head.html" . }}
{{ partial "header.html" . }}
{{ range .Site.Indexes.groups.news.Pages }}
<article class="post">
<header>
<h2><a href='{{ .Permalink }}'>{{ .Title }}</a> </h2>
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} Words</div>
</header>
{{ .Summary }}
<footer>
<a href='{{ .Permalink }}'><nobr>Read more →</nobr></a>
</footer>
</article>
{{ end }}
{{ partial "footer.html" . }}

View file

@ -1,15 +0,0 @@
{{ partial "head.html" . }}
{{ partial "header.html" . }}
{{ range .Site.Indexes.groups.uudised.Pages }}
<article class="post">
<header>
<h2><a href='{{ .Permalink }}'>{{ .Title }}</a> </h2>
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} sõna</div>
</header>
{{ .Summary }}
<footer>
<a href='{{ .Permalink }}'><nobr>Loe rohkem →</nobr></a>
</footer>
</article>
{{ end }}
{{ partial "footer.html" . }}

View file

@ -77,7 +77,7 @@ header {
clear: both; clear: both;
} }
footer { body > footer {
font-family: Georgia; font-family: Georgia;
background: #eee; background: #eee;
margin: 0; margin: 0;