Compare commits

..

No commits in common. "c8e5dfa8f0638bb3b204a47fdac25c936273e5a3" and "5dff188fa49457aa972ec3b0569dfcc13b0600b9" have entirely different histories.

23 changed files with 5 additions and 92 deletions

View file

@ -1,15 +1,8 @@
<footer>
<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>
<div>[language switcher]</div>
<nav>
{{ collections.footerNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
{{ collections.footerNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
</nav>
</div>
<div>

View file

@ -1,6 +1,6 @@
<header>
<a href="{{ "/" | locale_url }}" title="home">ESE Logo</a>
<a href="/" title="home">ESE Logo</a>
<nav>
{{ collections.mainNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
{{ collections.mainNav | eleventyNavigation | eleventyNavigationToHtml | safe }}
</nav>
</header>

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: Barrierefreiheit
tags: footerNav
---
# Barrierefreiheit

View file

@ -1,7 +0,0 @@
---
layout: page.njk
title: Campus & Fakultät
tags: mainNav
---
# Campus & Fakultät

View file

@ -1,3 +0,0 @@
{
"lang": "de"
}

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: FAQ
tags: mainNav
---
# Häufig gestellte Fragen

View file

@ -1,7 +0,0 @@
---
layout: page.njk
title: Erste Schritte
tags: mainNav
---
# Erste Schritte

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: Community-Leitlinien
tags: footerNav
---
# Community-Leitlinien

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: Impressum
tags: footerNav
---
# Impressum

View file

@ -1,4 +0,0 @@
---
layout: page.njk
---
# Hallo Welt :)

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: Datenschutz
tags: footerNav
---
# Datenschutz

View file

@ -1,6 +0,0 @@
---
layout: page.njk
title: Programm
tags: mainNav
---
# Programm

View file

@ -1,3 +0,0 @@
{
"lang": "en"
}

View file

@ -1,6 +1,5 @@
const { EleventyHtmlBasePlugin, EleventyI18nPlugin } = require("@11ty/eleventy");
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
const fs = require('fs');
// update this :)
const year = 2024;
@ -8,28 +7,9 @@ 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",