Compare commits

...

2 commits

Author SHA1 Message Date
ca43d25e0f add header, navigation, pages 2024-09-13 17:18:41 +02:00
c0b8c33ddb add basic page layout 2024-09-13 17:04:16 +02:00
10 changed files with 73 additions and 2 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>

15
_layouts/page.njk Normal file
View file

@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if title %}{{ title }} | {% endif %}ESE {{ year }}</title>
</head>
<body>
{% 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

View file

@ -1 +1,4 @@
---
layout: page.njk
---
# Hello World :)

6
content/program.md Normal file
View file

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

View file

@ -1,16 +1,21 @@
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);
return {
dir: {
input: "content",
includes: "../_includes",
layouts: "../_layouts",
data: "../_data",
},
pathPrefix: `/${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"
}
}