add header, navigation, pages

This commit is contained in:
Lyn Fugmann 2024-09-13 17:18:41 +02:00
parent c0b8c33ddb
commit ca43d25e0f
9 changed files with 57 additions and 3 deletions

6
_includes/header.njk Normal file
View file

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

View file

@ -6,6 +6,10 @@
<title>{% if title %}{{ title }} | {% endif %}ESE {{ year }}</title>
</head>
<body>
{{ content | safe }}
{% include 'header.njk' %}
<main>
{{ content | safe }}
</main>
</body>
</html>

7
content/campus.md Normal file
View file

@ -0,0 +1,7 @@
---
layout: page.njk
eleventyNavigation:
key: Campus & Faculty
---
# Campus & Faculty

6
content/faq.md Normal file
View file

@ -0,0 +1,6 @@
---
layout: page.njk
eleventyNavigation:
key: FAQ
---
# Frequently Asked Questions

7
content/first-steps.md Normal file
View file

@ -0,0 +1,7 @@
---
layout: page.njk
eleventyNavigation:
key: First Steps
---
# First Steps

6
content/program.md Normal file
View file

@ -0,0 +1,6 @@
---
layout: page.njk
eleventyNavigation:
key: Program
---
# Program

View file

@ -1,10 +1,12 @@
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
const eleventyNavigationPlugin = require("@11ty/eleventy-navigation");
// update this :)
const year = 2024;
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
eleventyConfig.addPlugin(eleventyNavigationPlugin);
eleventyConfig.addGlobalData("year", year);

17
package-lock.json generated
View file

@ -9,7 +9,8 @@
"version": "2.0.0",
"license": "MIT",
"devDependencies": {
"@11ty/eleventy": "^2.0.1"
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-navigation": "^0.3.5"
}
},
"node_modules/@11ty/dependency-tree": {
@ -106,6 +107,20 @@
"url": "https://opencollective.com/11ty"
}
},
"node_modules/@11ty/eleventy-navigation": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@11ty/eleventy-navigation/-/eleventy-navigation-0.3.5.tgz",
"integrity": "sha512-4aKW5aIQDFed8xs1G1pWcEiFPcDSwZtA4IH1eERtoJ+Xy+/fsoe0pzbDmw84bHZ9ACny5jblENhfZhcCxklqQw==",
"dev": true,
"license": "MIT",
"dependencies": {
"dependency-graph": "^0.11.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/11ty"
}
},
"node_modules/@11ty/eleventy-utils": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@11ty/eleventy-utils/-/eleventy-utils-1.0.3.tgz",

View file

@ -10,6 +10,7 @@
"author": "FSR Informatik TU Dresden",
"license": "MIT",
"devDependencies": {
"@11ty/eleventy": "^2.0.1"
"@11ty/eleventy": "^2.0.1",
"@11ty/eleventy-navigation": "^0.3.5"
}
}