From cf58231160149313a96729ee7681cd5948ecde61 Mon Sep 17 00:00:00 2001 From: madrilene Date: Sun, 30 Oct 2022 13:52:28 +0100 Subject: [PATCH] nav and social, instructions --- readme.md | 14 +++++++---- src/_data/navigation.js | 22 ++++++++++++++++++ src/_data/navigation.json | 12 ---------- src/_data/social.json | 12 ++++++++++ src/_includes/icons/social-github.svg | 18 +++++++++++++++ src/_includes/icons/social-twitter.svg | 15 ++++++++++++ src/_includes/partials/footer.njk | 32 +++++++++++++++++++++++--- src/_includes/partials/menu.njk | 2 +- src/assets/css/blocks/site-foot.css | 4 ++-- 9 files changed, 108 insertions(+), 23 deletions(-) create mode 100644 src/_data/navigation.js delete mode 100644 src/_data/navigation.json create mode 100644 src/_data/social.json create mode 100644 src/_includes/icons/social-github.svg create mode 100644 src/_includes/icons/social-twitter.svg diff --git a/readme.md b/readme.md index b04680c..b207054 100644 --- a/readme.md +++ b/readme.md @@ -5,7 +5,8 @@ Very opiniated Eleventy starter based on the workflow suggested by Andy Bell's < - [Eleventy starter](#eleventy-starter) - [Preview](#preview) - [Features](#features) - - [Using this](#using-this) + - [First steps](#first-steps) + - [Development](#development) - [Install dependencies](#install-dependencies) - [Working locally](#working-locally) - [Creating a production build](#creating-a-production-build) @@ -23,21 +24,22 @@ https://eleventy-excellent.netlify.app/ This eleventy starter already includes: -- accessible site navigation, editable in \_data/navigation.js +- Accessible site navigation, editable in \_data/navigation.js - Image optimisation with Eleventy-img - SEO (XML-sitemap, metadata) - dayjs handling dates & times - Many filters and shortcodes - The whole CSS workflow as suggested by buildexcellentwebsit.es - 301 redirects for netlify -- all kind of markdown handling -- bundling via esbuild +- All kind of markdown handling +- Bundling via esbuild -## Using this +## First steps - Search and replace 'eleventy-excellent.netlify.app' with your own domain. - Set your icons in assets/images/favicon - edit meta data in \_data/meta.js +- edit your social media in \_data/social.js and \_includes/icons. Icons must be prefixed with "social-". - delete \_data/github.js and pages/github.njk, as they are just an example - changed routes: @@ -45,6 +47,8 @@ This eleventy starter already includes: redirectFrom: ['/old-route/', '/optionally-another-old-route/'] ``` +## Development + ### Install dependencies ``` diff --git a/src/_data/navigation.js b/src/_data/navigation.js new file mode 100644 index 0000000..e08454a --- /dev/null +++ b/src/_data/navigation.js @@ -0,0 +1,22 @@ +module.exports = { + top: [ + { + text: 'Markdown', + url: '/markdown/' + }, + { + text: 'Github Fetch', + url: '/github/' + } + ], + bottom: [ + { + text: 'Imprint', + url: '/imprint/' + }, + { + text: 'Privacy', + url: '/privacy/' + } + ] +}; diff --git a/src/_data/navigation.json b/src/_data/navigation.json deleted file mode 100644 index 44d8ae4..0000000 --- a/src/_data/navigation.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "items": [ - { - "text": "Markdown", - "url": "/markdown/" - }, - { - "text": "Github Fetch", - "url": "/github/" - } - ] -} diff --git a/src/_data/social.json b/src/_data/social.json new file mode 100644 index 0000000..a875b9d --- /dev/null +++ b/src/_data/social.json @@ -0,0 +1,12 @@ +[ + { + "platform": "github", + "url": "https://github.com/madrilene/eleventy-excellent", + "icon": "github.svg" + }, + { + "platform": "twitter", + "url": "https://twitter.com/lenesaile", + "icon": "twitter.svg" + } +] diff --git a/src/_includes/icons/social-github.svg b/src/_includes/icons/social-github.svg new file mode 100644 index 0000000..15b5f1b --- /dev/null +++ b/src/_includes/icons/social-github.svg @@ -0,0 +1,18 @@ + diff --git a/src/_includes/icons/social-twitter.svg b/src/_includes/icons/social-twitter.svg new file mode 100644 index 0000000..ef6139b --- /dev/null +++ b/src/_includes/icons/social-twitter.svg @@ -0,0 +1,15 @@ + diff --git a/src/_includes/partials/footer.njk b/src/_includes/partials/footer.njk index c015518..ba14add 100644 --- a/src/_includes/partials/footer.njk +++ b/src/_includes/partials/footer.njk @@ -1,10 +1,36 @@ diff --git a/src/_includes/partials/menu.njk b/src/_includes/partials/menu.njk index 0497e39..189f6c2 100644 --- a/src/_includes/partials/menu.njk +++ b/src/_includes/partials/menu.njk @@ -2,7 +2,7 @@