Compare commits
3 commits
5dff188fa4
...
c8e5dfa8f0
Author | SHA1 | Date | |
---|---|---|---|
Lyn Fugmann | c8e5dfa8f0 | ||
Lyn Fugmann | 9011b604d2 | ||
Lyn Fugmann | 61415ce5a7 |
|
@ -1,8 +1,15 @@
|
|||
<footer>
|
||||
<div>
|
||||
<div>[language switcher]</div>
|
||||
{% set otherLang = page.url | locale_links | first %}
|
||||
<a href="{{otherLang.url}}" lang="{{otherLang.lang}}" hreflang="{{otherLang.lang}}">
|
||||
{% if otherLang.lang == "de" %}
|
||||
Deutsche Version 🇩🇪
|
||||
{% else %}
|
||||
English Version 🇬🇧/🇺🇸
|
||||
{% endif %}
|
||||
</a>
|
||||
<nav>
|
||||
{{ collections.footerNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||
{{ collections.footerNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||
</nav>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<header>
|
||||
<a href="/" title="home">ESE Logo</a>
|
||||
<a href="{{ "/" | locale_url }}" title="home">ESE Logo</a>
|
||||
<nav>
|
||||
{{ collections.mainNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||
{{ collections.mainNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||
</nav>
|
||||
</header>
|
||||
|
|
6
content/de/accessibility.md
Normal file
6
content/de/accessibility.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Barrierefreiheit
|
||||
tags: footerNav
|
||||
---
|
||||
# Barrierefreiheit
|
7
content/de/campus.md
Normal file
7
content/de/campus.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Campus & Fakultät
|
||||
tags: mainNav
|
||||
---
|
||||
# Campus & Fakultät
|
||||
|
3
content/de/de.json
Normal file
3
content/de/de.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"lang": "de"
|
||||
}
|
6
content/de/faq.md
Normal file
6
content/de/faq.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: FAQ
|
||||
tags: mainNav
|
||||
---
|
||||
# Häufig gestellte Fragen
|
7
content/de/first-steps.md
Normal file
7
content/de/first-steps.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Erste Schritte
|
||||
tags: mainNav
|
||||
---
|
||||
# Erste Schritte
|
||||
|
6
content/de/guidelines.md
Normal file
6
content/de/guidelines.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Community-Leitlinien
|
||||
tags: footerNav
|
||||
---
|
||||
# Community-Leitlinien
|
6
content/de/imprint.md
Normal file
6
content/de/imprint.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Impressum
|
||||
tags: footerNav
|
||||
---
|
||||
# Impressum
|
4
content/de/index.md
Normal file
4
content/de/index.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
layout: page.njk
|
||||
---
|
||||
# Hallo Welt :)
|
6
content/de/privacy.md
Normal file
6
content/de/privacy.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Datenschutz
|
||||
tags: footerNav
|
||||
---
|
||||
# Datenschutz
|
6
content/de/program.md
Normal file
6
content/de/program.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: page.njk
|
||||
title: Programm
|
||||
tags: mainNav
|
||||
---
|
||||
# Programm
|
3
content/en/en.json
Normal file
3
content/en/en.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"lang": "en"
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
||||
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
|
||||
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
||||
const fs = require('fs');
|
||||
|
||||
// update this :)
|
||||
const year = 2024;
|
||||
|
@ -7,9 +8,28 @@ const year = 2024;
|
|||
module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
||||
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
||||
eleventyConfig.addPlugin(EleventyI18nPlugin, {
|
||||
defaultLanguage: "de",
|
||||
});
|
||||
|
||||
eleventyConfig.addGlobalData("year", year);
|
||||
|
||||
eleventyConfig.addFilter("pageLang", function(value) {
|
||||
return value.filter(item => item.page.lang === this.page.lang)
|
||||
});
|
||||
|
||||
// copy german start page to root url
|
||||
eleventyConfig.on(
|
||||
"eleventy.after",
|
||||
async ({ dir, runMode, outputMode }) => {
|
||||
if (outputMode === "fs") {
|
||||
fs.copyFile(`${dir.output}/de/index.html`, `${dir.output}/index.html`, (err) => {
|
||||
if (err) console.log(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: "content",
|
||||
|
|
Loading…
Reference in a new issue