Compare commits
No commits in common. "c8e5dfa8f0638bb3b204a47fdac25c936273e5a3" and "5dff188fa49457aa972ec3b0569dfcc13b0600b9" have entirely different histories.
c8e5dfa8f0
...
5dff188fa4
|
@ -1,15 +1,8 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
{% set otherLang = page.url | locale_links | first %}
|
<div>[language switcher]</div>
|
||||||
<a href="{{otherLang.url}}" lang="{{otherLang.lang}}" hreflang="{{otherLang.lang}}">
|
|
||||||
{% if otherLang.lang == "de" %}
|
|
||||||
Deutsche Version 🇩🇪
|
|
||||||
{% else %}
|
|
||||||
English Version 🇬🇧/🇺🇸
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
|
||||||
<nav>
|
<nav>
|
||||||
{{ collections.footerNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
{{ collections.footerNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<header>
|
<header>
|
||||||
<a href="{{ "/" | locale_url }}" title="home">ESE Logo</a>
|
<a href="/" title="home">ESE Logo</a>
|
||||||
<nav>
|
<nav>
|
||||||
{{ collections.mainNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
{{ collections.mainNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Barrierefreiheit
|
|
||||||
tags: footerNav
|
|
||||||
---
|
|
||||||
# Barrierefreiheit
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Campus & Fakultät
|
|
||||||
tags: mainNav
|
|
||||||
---
|
|
||||||
# Campus & Fakultät
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"lang": "de"
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: FAQ
|
|
||||||
tags: mainNav
|
|
||||||
---
|
|
||||||
# Häufig gestellte Fragen
|
|
|
@ -1,7 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Erste Schritte
|
|
||||||
tags: mainNav
|
|
||||||
---
|
|
||||||
# Erste Schritte
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Community-Leitlinien
|
|
||||||
tags: footerNav
|
|
||||||
---
|
|
||||||
# Community-Leitlinien
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Impressum
|
|
||||||
tags: footerNav
|
|
||||||
---
|
|
||||||
# Impressum
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
---
|
|
||||||
# Hallo Welt :)
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Datenschutz
|
|
||||||
tags: footerNav
|
|
||||||
---
|
|
||||||
# Datenschutz
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
layout: page.njk
|
|
||||||
title: Programm
|
|
||||||
tags: mainNav
|
|
||||||
---
|
|
||||||
# Programm
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"lang": "en"
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
|
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
||||||
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
|
||||||
const fs = require('fs');
|
|
||||||
|
|
||||||
// update this :)
|
// update this :)
|
||||||
const year = 2024;
|
const year = 2024;
|
||||||
|
@ -8,28 +7,9 @@ const year = 2024;
|
||||||
module.exports = function(eleventyConfig) {
|
module.exports = function(eleventyConfig) {
|
||||||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
||||||
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
eleventyConfig.addPlugin(eleventyNavigationPlugin);
|
||||||
eleventyConfig.addPlugin(EleventyI18nPlugin, {
|
|
||||||
defaultLanguage: "de",
|
|
||||||
});
|
|
||||||
|
|
||||||
eleventyConfig.addGlobalData("year", year);
|
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 {
|
return {
|
||||||
dir: {
|
dir: {
|
||||||
input: "content",
|
input: "content",
|
||||||
|
|
Loading…
Reference in a new issue