diff --git a/examples/multilingual/config.yaml b/examples/multilingual/config.yaml new file mode 100644 index 000000000..017a9b59e --- /dev/null +++ b/examples/multilingual/config.yaml @@ -0,0 +1,5 @@ +indexes: + tag: 'tags' + group: 'groups' + menu: 'menu' +baseurl: '' diff --git a/examples/multilingual/content/about.en.md b/examples/multilingual/content/about.en.md new file mode 100644 index 000000000..a47d1d923 --- /dev/null +++ b/examples/multilingual/content/about.en.md @@ -0,0 +1,17 @@ +--- +title: "About" +linktitle: "About" +url: /about + +lang: "en" +menu: ["en"] +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. + +Doloremque, veritatis qui impedit expedita quas distinctio temporibus repellendus dicta debitis iure molestias recusandae cum facere natus esse saepe inventore beatae ipsum soluta voluptas in quaerat nam culpa id autem! + +## History + +Sequi eum impedit distinctio facilis repudiandae provident iure illo quia autem optio. Ea, facilis, possimus dolor nobis explicabo recusandae numquam ducimus minus eum totam odio architecto nesciunt accusamus expedita natus. \ No newline at end of file diff --git a/examples/multilingual/content/about.et.md b/examples/multilingual/content/about.et.md new file mode 100644 index 000000000..fd129f8e8 --- /dev/null +++ b/examples/multilingual/content/about.et.md @@ -0,0 +1,17 @@ +--- +title: "Minust" +linktitle: "Minust" +url: /minust + +lang: "et" +menu: ["et"] +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. + +Doloremque, veritatis qui impedit expedita quas distinctio temporibus repellendus dicta debitis iure molestias recusandae cum facere natus esse saepe inventore beatae ipsum soluta voluptas in quaerat nam culpa id autem! + +## Ajalugu + +Sequi eum impedit distinctio facilis repudiandae provident iure illo quia autem optio. Ea, facilis, possimus dolor nobis explicabo recusandae numquam ducimus minus eum totam odio architecto nesciunt accusamus expedita natus. \ No newline at end of file diff --git a/examples/multilingual/content/index.en.md b/examples/multilingual/content/index.en.md new file mode 100644 index 000000000..7c769211a --- /dev/null +++ b/examples/multilingual/content/index.en.md @@ -0,0 +1,15 @@ +--- +title: "" +linktitle: "Home" +url: / + +lang: "en" +menu: ["en"] +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. + +Doloremque, veritatis qui impedit expedita quas distinctio temporibus repellendus dicta debitis iure molestias recusandae cum facere natus esse saepe inventore beatae ipsum soluta voluptas in quaerat nam culpa id autem! + +Sequi eum impedit distinctio facilis repudiandae provident iure illo quia autem optio. Ea, facilis, possimus dolor nobis explicabo recusandae numquam ducimus minus eum totam odio architecto nesciunt accusamus expedita natus. \ No newline at end of file diff --git a/examples/multilingual/content/index.et.md b/examples/multilingual/content/index.et.md new file mode 100644 index 000000000..fbcd70466 --- /dev/null +++ b/examples/multilingual/content/index.et.md @@ -0,0 +1,15 @@ +--- +title: "" +linktitle: "Kodu" +url: /kodu + +lang: "et" +menu: ["et"] +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. + +Doloremque, veritatis qui impedit expedita quas distinctio temporibus repellendus dicta debitis iure molestias recusandae cum facere natus esse saepe inventore beatae ipsum soluta voluptas in quaerat nam culpa id autem! + +Sequi eum impedit distinctio facilis repudiandae provident iure illo quia autem optio. Ea, facilis, possimus dolor nobis explicabo recusandae numquam ducimus minus eum totam odio architecto nesciunt accusamus expedita natus. \ No newline at end of file diff --git a/examples/multilingual/content/story/alpha.md b/examples/multilingual/content/story/alpha.md new file mode 100644 index 000000000..558a7571f --- /dev/null +++ b/examples/multilingual/content/story/alpha.md @@ -0,0 +1,16 @@ +--- +title: "Alpha" + +lang: "en" +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. + +Magni, maxime, eum, veniam nam iusto rem error id tenetur porro sed modi reprehenderit excepturi impedit saepe vero ducimus quae consequuntur cupiditate est aperiam in cumque sapiente. Ullam, ex, dolorum. + +Pariatur, mollitia dignissimos commodi nostrum dicta accusantium nisi doloremque ratione molestias ex similique a porro quibusdam harum incidunt veniam laborum ipsum facere impedit maiores quam ad vero in obcaecati molestiae. + +Nam, nisi minus voluptatum dolorem quia doloremque officia architecto facere laborum ullam doloribus voluptates dolores quaerat necessitatibus hic expedita reiciendis inventore tenetur aliquam ab! Aliquid odit veniam accusantium maxime necessitatibus. + +Eos ipsam iusto optio odit id et nisi corporis hic. Iusto, cum, facere officiis ad modi numquam quam recusandae soluta rem consequuntur esse tenetur tempore vel. Veritatis, labore et aliquid? \ No newline at end of file diff --git a/examples/multilingual/content/story/beta.md b/examples/multilingual/content/story/beta.md new file mode 100644 index 000000000..ece4463d4 --- /dev/null +++ b/examples/multilingual/content/story/beta.md @@ -0,0 +1,16 @@ +--- +title: "Beta" + +lang: "en" +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. + +Magni, maxime, eum, veniam nam iusto rem error id tenetur porro sed modi reprehenderit excepturi impedit saepe vero ducimus quae consequuntur cupiditate est aperiam in cumque sapiente. Ullam, ex, dolorum. + +Pariatur, mollitia dignissimos commodi nostrum dicta accusantium nisi doloremque ratione molestias ex similique a porro quibusdam harum incidunt veniam laborum ipsum facere impedit maiores quam ad vero in obcaecati molestiae. + +Nam, nisi minus voluptatum dolorem quia doloremque officia architecto facere laborum ullam doloribus voluptates dolores quaerat necessitatibus hic expedita reiciendis inventore tenetur aliquam ab! Aliquid odit veniam accusantium maxime necessitatibus. + +Eos ipsam iusto optio odit id et nisi corporis hic. Iusto, cum, facere officiis ad modi numquam quam recusandae soluta rem consequuntur esse tenetur tempore vel. Veritatis, labore et aliquid? \ No newline at end of file diff --git a/examples/multilingual/content/story/index.md b/examples/multilingual/content/story/index.md new file mode 100644 index 000000000..2d35b716b --- /dev/null +++ b/examples/multilingual/content/story/index.md @@ -0,0 +1,10 @@ +--- +title: "News" +linktitle: "News" +url: /news +type: list + +lang: "en" +menu: ["en"] +menu_weight: 10 +--- diff --git a/examples/multilingual/content/uudis/alfa.md b/examples/multilingual/content/uudis/alfa.md new file mode 100644 index 000000000..7243795ec --- /dev/null +++ b/examples/multilingual/content/uudis/alfa.md @@ -0,0 +1,16 @@ +--- +title: "Alfa" + +lang: "et" +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. + +Magni, maxime, eum, veniam nam iusto rem error id tenetur porro sed modi reprehenderit excepturi impedit saepe vero ducimus quae consequuntur cupiditate est aperiam in cumque sapiente. Ullam, ex, dolorum. + +Pariatur, mollitia dignissimos commodi nostrum dicta accusantium nisi doloremque ratione molestias ex similique a porro quibusdam harum incidunt veniam laborum ipsum facere impedit maiores quam ad vero in obcaecati molestiae. + +Nam, nisi minus voluptatum dolorem quia doloremque officia architecto facere laborum ullam doloribus voluptates dolores quaerat necessitatibus hic expedita reiciendis inventore tenetur aliquam ab! Aliquid odit veniam accusantium maxime necessitatibus. + +Eos ipsam iusto optio odit id et nisi corporis hic. Iusto, cum, facere officiis ad modi numquam quam recusandae soluta rem consequuntur esse tenetur tempore vel. Veritatis, labore et aliquid? \ No newline at end of file diff --git a/examples/multilingual/content/uudis/beeta.md b/examples/multilingual/content/uudis/beeta.md new file mode 100644 index 000000000..e90c3afd2 --- /dev/null +++ b/examples/multilingual/content/uudis/beeta.md @@ -0,0 +1,16 @@ +--- +title: "Beeta" + +lang: "et" +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. + +Magni, maxime, eum, veniam nam iusto rem error id tenetur porro sed modi reprehenderit excepturi impedit saepe vero ducimus quae consequuntur cupiditate est aperiam in cumque sapiente. Ullam, ex, dolorum. + +Pariatur, mollitia dignissimos commodi nostrum dicta accusantium nisi doloremque ratione molestias ex similique a porro quibusdam harum incidunt veniam laborum ipsum facere impedit maiores quam ad vero in obcaecati molestiae. + +Nam, nisi minus voluptatum dolorem quia doloremque officia architecto facere laborum ullam doloribus voluptates dolores quaerat necessitatibus hic expedita reiciendis inventore tenetur aliquam ab! Aliquid odit veniam accusantium maxime necessitatibus. + +Eos ipsam iusto optio odit id et nisi corporis hic. Iusto, cum, facere officiis ad modi numquam quam recusandae soluta rem consequuntur esse tenetur tempore vel. Veritatis, labore et aliquid? \ No newline at end of file diff --git a/examples/multilingual/content/uudis/index.md b/examples/multilingual/content/uudis/index.md new file mode 100644 index 000000000..c73b778ab --- /dev/null +++ b/examples/multilingual/content/uudis/index.md @@ -0,0 +1,10 @@ +--- +title: "Uudised" +linktitle: "Uudised" +url: /uudised +type: list + +lang: "et" +menu: ["et"] +menu_weight: 10 +--- diff --git a/examples/multilingual/layouts/_default/single.html b/examples/multilingual/layouts/_default/single.html new file mode 100644 index 000000000..da3640efe --- /dev/null +++ b/examples/multilingual/layouts/_default/single.html @@ -0,0 +1,4 @@ +{{ template "chrome/head.html" . }} +{{ template "chrome/header.html" . }} +{{ .Content }} +{{ template "chrome/footer.html" . }} \ No newline at end of file diff --git a/examples/multilingual/layouts/chrome/footer.html b/examples/multilingual/layouts/chrome/footer.html new file mode 100644 index 000000000..2630b2e32 --- /dev/null +++ b/examples/multilingual/layouts/chrome/footer.html @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/examples/multilingual/layouts/chrome/head.html b/examples/multilingual/layouts/chrome/head.html new file mode 100644 index 000000000..44d1d7362 --- /dev/null +++ b/examples/multilingual/layouts/chrome/head.html @@ -0,0 +1,15 @@ + + + + + {{ if .Title }} + {{ if (eq .Params.lang "et") }} + Mitmekeelne - {{ .Title }} + {{ else }} + Multilingual - {{ .Title }} + {{ end }} + {{ end }} + + + + \ No newline at end of file diff --git a/examples/multilingual/layouts/chrome/header.html b/examples/multilingual/layouts/chrome/header.html new file mode 100644 index 000000000..b99b2fbef --- /dev/null +++ b/examples/multilingual/layouts/chrome/header.html @@ -0,0 +1,25 @@ +
+ + + {{ if (eq .Params.lang "et") }} +

Minu mitmekeelne leht

+ {{ else }} +

My multilingual site

+ {{ end }} + + +
+ +

{{ .Title }}

\ No newline at end of file diff --git a/examples/multilingual/layouts/story/list.html b/examples/multilingual/layouts/story/list.html new file mode 100644 index 000000000..0173244f7 --- /dev/null +++ b/examples/multilingual/layouts/story/list.html @@ -0,0 +1,15 @@ +{{ template "chrome/head.html" . }} +{{ template "chrome/header.html" . }} +{{ range .Site.Indexes.groups.news.Pages }} +
+
+

{{ .Title }}

+ +
+ {{ .Summary }} + +
+{{ end }} +{{ template "chrome/footer.html" . }} \ No newline at end of file diff --git a/examples/multilingual/layouts/uudis/list.html b/examples/multilingual/layouts/uudis/list.html new file mode 100644 index 000000000..970a48bfb --- /dev/null +++ b/examples/multilingual/layouts/uudis/list.html @@ -0,0 +1,15 @@ +{{ template "chrome/head.html" . }} +{{ template "chrome/header.html" . }} +{{ range .Site.Indexes.groups.uudised.Pages }} +
+
+

{{ .Title }}

+ +
+ {{ .Summary }} + +
+{{ end }} +{{ template "chrome/footer.html" . }} \ No newline at end of file diff --git a/examples/multilingual/static/static/main.css b/examples/multilingual/static/static/main.css new file mode 100644 index 000000000..59ccaf8f0 --- /dev/null +++ b/examples/multilingual/static/static/main.css @@ -0,0 +1,89 @@ +* { + box-sizing: border-box; +} + +html, body { + margin: 0; + padding: 0; +} + +body { + max-width: 600px; + margin: 0 auto; + background: #fefefe; +} + +header { + padding: 0 30px; + padding-top: 10px; + border-bottom: 1px solid #999; +} + +.title { + clear: both; + font-family: Georgia; + text-align: center; +} + +.subtitle { + font-family: Georgia; + background: #eee; + margin: 0; + padding: 5px; + border-radius: 0 0 50px 50px; + text-align: center; + + margin-bottom: 10px; +} + +.menu a { + text-decoration: none; +} + +.language-menu { + float: right; +} + +.language-menu ul { + list-style: none; +} + +.language-menu ul li { + float: left; + padding-right: 10px; + border-right: 1px solid #ccc; + margin-right: 10px; +} + +.main-menu { + text-align: center; +} + +.main-menu ul { + list-style: none; +} + +.main-menu ul li { + display: inline-block; + padding: 5px 15px; + border-radius: 3px; +} + +.main-menu ul li:hover, .main-menu ul li:active { + background: #eef; +} + +.clear { + clear: both; +} + +footer { + font-family: Georgia; + background: #eee; + margin: 0; + padding: 10px; + padding-bottom: 20px; + border-radius: 50px 50px 0 0; + text-align: center; + border-bottom: 1px solid #999; +} \ No newline at end of file