From ca43d25e0f8fedc87fe469a78f6a02286c7734cf Mon Sep 17 00:00:00 2001 From: Lyn Fugmann Date: Fri, 13 Sep 2024 17:18:41 +0200 Subject: [PATCH] add header, navigation, pages --- _includes/header.njk | 6 ++++++ _layouts/page.njk | 6 +++++- content/campus.md | 7 +++++++ content/faq.md | 6 ++++++ content/first-steps.md | 7 +++++++ content/program.md | 6 ++++++ eleventy.config.js | 2 ++ package-lock.json | 17 ++++++++++++++++- package.json | 3 ++- 9 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 _includes/header.njk create mode 100644 content/campus.md create mode 100644 content/faq.md create mode 100644 content/first-steps.md create mode 100644 content/program.md diff --git a/_includes/header.njk b/_includes/header.njk new file mode 100644 index 0000000..5ef7c10 --- /dev/null +++ b/_includes/header.njk @@ -0,0 +1,6 @@ +
+ ESE Logo + +
diff --git a/_layouts/page.njk b/_layouts/page.njk index 83e842a..1c85b47 100644 --- a/_layouts/page.njk +++ b/_layouts/page.njk @@ -6,6 +6,10 @@ {% if title %}{{ title }} | {% endif %}ESE {{ year }} - {{ content | safe }} + {% include 'header.njk' %} + +
+ {{ content | safe }} +
diff --git a/content/campus.md b/content/campus.md new file mode 100644 index 0000000..93a337b --- /dev/null +++ b/content/campus.md @@ -0,0 +1,7 @@ +--- +layout: page.njk +eleventyNavigation: + key: Campus & Faculty +--- +# Campus & Faculty + diff --git a/content/faq.md b/content/faq.md new file mode 100644 index 0000000..baea635 --- /dev/null +++ b/content/faq.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +eleventyNavigation: + key: FAQ +--- +# Frequently Asked Questions diff --git a/content/first-steps.md b/content/first-steps.md new file mode 100644 index 0000000..dcd6f43 --- /dev/null +++ b/content/first-steps.md @@ -0,0 +1,7 @@ +--- +layout: page.njk +eleventyNavigation: + key: First Steps +--- +# First Steps + diff --git a/content/program.md b/content/program.md new file mode 100644 index 0000000..5ac9f9c --- /dev/null +++ b/content/program.md @@ -0,0 +1,6 @@ +--- +layout: page.njk +eleventyNavigation: + key: Program +--- +# Program diff --git a/eleventy.config.js b/eleventy.config.js index 0e49782..d750560 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -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); diff --git a/package-lock.json b/package-lock.json index 8429f74..d3bb57e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 688dbb7..acf74cb 100644 --- a/package.json +++ b/package.json @@ -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" } }