From ed1a3e3cfaa5cbc042db41574d3c99ea63b1b261 Mon Sep 17 00:00:00 2001 From: Neil Brommer Date: Fri, 7 Jul 2023 21:10:03 -0700 Subject: [PATCH] Switch to Feather Icons for all icons --- .eleventy.js | 5 +- package-lock.json | 80 +++++++++++++----------- package.json | 3 +- src/_includes/layouts/layout.njk | 16 ++--- src/_sections/Colors.njk | 2 +- src/_sections/Contact.md | 2 +- src/_sections/Projects.njk | 2 +- src/css/Components/_bootstrap-icons.scss | 5 -- src/css/Components/_icons.scss | 10 +++ src/css/site.scss | 2 +- src/index.njk | 2 +- src/posts/index.njk | 2 +- src/resume.md | 2 +- 13 files changed, 71 insertions(+), 62 deletions(-) delete mode 100644 src/css/Components/_bootstrap-icons.scss create mode 100644 src/css/Components/_icons.scss diff --git a/.eleventy.js b/.eleventy.js index 98615b6..782bb7a 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -7,10 +7,7 @@ module.exports = function (eleventyConfig) { files: "./_site/css/**/*.css", }); eleventyConfig.addPassthroughCopy({ - "node_modules/bootstrap-icons/bootstrap-icons.svg": - "images/bootstrap-icons.svg", - "node_modules/@fortawesome/fontawesome-free/sprites": - "images/fontawesome", + "node_modules/feather-icons/dist/feather-sprite.svg": "images/feather-sprite.svg", "src/js/site.js": "js/site.js" }); eleventyConfig.addPlugin(eleventyNavigationPlugin); diff --git a/package-lock.json b/package-lock.json index f469e9f..12f2588 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@fortawesome/fontawesome-free": "^6.4.0", - "bootstrap-icons": "^1.10.5", + "feather-icons": "^4.29.0", "normalize.css": "^8.0.1" }, "devDependencies": { @@ -187,15 +186,6 @@ "node": ">=6.9.0" } }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.0.tgz", - "integrity": "sha512-0NyytTlPJwB/BF5LtRV8rrABDbe3TdTXqNB3PdZ+UUUZAEIrdOJdmABqKjt4AXwIoJNaRVVZEXxpNrqvE1GAYQ==", - "hasInstallScript": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", @@ -465,21 +455,6 @@ "node": ">=8" } }, - "node_modules/bootstrap-icons": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", - "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/twbs" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/bootstrap" - } - ] - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -567,6 +542,11 @@ "fsevents": "~2.3.2" } }, + "node_modules/classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -610,6 +590,16 @@ "@babel/types": "^7.6.1" } }, + "node_modules/core-js": { + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.1.tgz", + "integrity": "sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==", + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -878,6 +868,15 @@ "reusify": "^1.0.4" } }, + "node_modules/feather-icons": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/feather-icons/-/feather-icons-4.29.0.tgz", + "integrity": "sha512-Y7VqN9FYb8KdaSF0qD1081HCkm0v4Eq/fpfQYQnubpqi0hXx14k+gF9iqtRys1SIcTEi97xDi/fmsPFZ8xo0GQ==", + "dependencies": { + "classnames": "^2.2.5", + "core-js": "^3.1.3" + } + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -2551,11 +2550,6 @@ "to-fast-properties": "^2.0.0" } }, - "@fortawesome/fontawesome-free": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.0.tgz", - "integrity": "sha512-0NyytTlPJwB/BF5LtRV8rrABDbe3TdTXqNB3PdZ+UUUZAEIrdOJdmABqKjt4AXwIoJNaRVVZEXxpNrqvE1GAYQ==" - }, "@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", @@ -2758,11 +2752,6 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, - "bootstrap-icons": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.5.tgz", - "integrity": "sha512-oSX26F37V7QV7NCE53PPEL45d7EGXmBgHG3pDpZvcRaKVzWMqIRL9wcqJUyEha1esFtM3NJzvmxFXDxjJYD0jQ==" - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2827,6 +2816,11 @@ "readdirp": "~3.6.0" } }, + "classnames": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz", + "integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==" + }, "color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -2864,6 +2858,11 @@ "@babel/types": "^7.6.1" } }, + "core-js": { + "version": "3.31.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.31.1.tgz", + "integrity": "sha512-2sKLtfq1eFST7l7v62zaqXacPc7uG8ZAya8ogijLhTtaKNcpzpB4TMoTw2Si+8GYKRwFPMMtUT0263QFWFfqyQ==" + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3043,6 +3042,15 @@ "reusify": "^1.0.4" } }, + "feather-icons": { + "version": "4.29.0", + "resolved": "https://registry.npmjs.org/feather-icons/-/feather-icons-4.29.0.tgz", + "integrity": "sha512-Y7VqN9FYb8KdaSF0qD1081HCkm0v4Eq/fpfQYQnubpqi0hXx14k+gF9iqtRys1SIcTEi97xDi/fmsPFZ8xo0GQ==", + "requires": { + "classnames": "^2.2.5", + "core-js": "^3.1.3" + } + }, "filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", diff --git a/package.json b/package.json index 3104520..5d6bc5e 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "markdown-it-deflist": "^2.1.0" }, "dependencies": { - "@fortawesome/fontawesome-free": "^6.4.0", - "bootstrap-icons": "^1.10.5", + "feather-icons": "^4.29.0", "normalize.css": "^8.0.1" } } diff --git a/src/_includes/layouts/layout.njk b/src/_includes/layouts/layout.njk index e7e38b0..ca37873 100644 --- a/src/_includes/layouts/layout.njk +++ b/src/_includes/layouts/layout.njk @@ -24,8 +24,8 @@
  • {% if section.icon is defined %} - - + + {% endif %} {{ section.title }} @@ -44,8 +44,8 @@
  • {% if standalonePage.icon is defined %} - - + + {% endif %} @@ -60,8 +60,8 @@ {% for externalLink in socialLinks %}
  • - - + +
  • @@ -75,8 +75,8 @@ {{ title }} diff --git a/src/_sections/Colors.njk b/src/_sections/Colors.njk index 6a2fb67..70a4457 100644 --- a/src/_sections/Colors.njk +++ b/src/_sections/Colors.njk @@ -2,7 +2,7 @@ title: Colors eleventyNavigation: key: Colors - icon: eye-dropper + icon: droplet order: 3 tags: [ "MainPage" ] sectionOrder: 3 diff --git a/src/_sections/Contact.md b/src/_sections/Contact.md index a507fe5..cb5a613 100644 --- a/src/_sections/Contact.md +++ b/src/_sections/Contact.md @@ -2,7 +2,7 @@ title: Contact eleventyNavigation: key: Contact - icon: envelope + icon: mail order: 2 tags: [ "MainPage" ] sectionOrder: 2 diff --git a/src/_sections/Projects.njk b/src/_sections/Projects.njk index 2d1c15b..fb13932 100644 --- a/src/_sections/Projects.njk +++ b/src/_sections/Projects.njk @@ -2,7 +2,7 @@ title: Projects eleventyNavigation: key: Projects - icon: screwdriver-wrench + icon: tool order: 1 tags: [ "MainPage" ] sectionOrder: 1 diff --git a/src/css/Components/_bootstrap-icons.scss b/src/css/Components/_bootstrap-icons.scss deleted file mode 100644 index bb6d45d..0000000 --- a/src/css/Components/_bootstrap-icons.scss +++ /dev/null @@ -1,5 +0,0 @@ -// this allows changing the size using font-size -.bi { - width: 1em; - height: 1em; -} diff --git a/src/css/Components/_icons.scss b/src/css/Components/_icons.scss new file mode 100644 index 0000000..b631bef --- /dev/null +++ b/src/css/Components/_icons.scss @@ -0,0 +1,10 @@ +// this allows changing the size using font-size +.icon { + width: 1em; + height: 1em; + stroke: currentColor; + stroke-width: 2; + stroke-linecap: round; + stroke-linejoin: round; + fill: none; +} diff --git a/src/css/site.scss b/src/css/site.scss index 1c7aea3..f5cc95b 100644 --- a/src/css/site.scss +++ b/src/css/site.scss @@ -2,7 +2,7 @@ @use 'Components/_variables'; @use 'Components/_base'; -@use 'Components/_bootstrap-icons'; +@use 'Components/_icons'; @use 'Components/_columns'; @use 'Components/_navbar'; @use 'Components/_headings'; diff --git a/src/index.njk b/src/index.njk index 5a22631..70b79d7 100644 --- a/src/index.njk +++ b/src/index.njk @@ -2,7 +2,7 @@ title: Neil Brommer eleventyNavigation: key: Neil Brommer - icon: house + icon: home order: 0 tags: [ "MainPage" ] --- diff --git a/src/posts/index.njk b/src/posts/index.njk index fe6bb8e..db200ef 100644 --- a/src/posts/index.njk +++ b/src/posts/index.njk @@ -2,7 +2,7 @@ title: Posts eleventyNavigation: key: Posts - icon: pencil + icon: edit-2 order: 1 --- diff --git a/src/resume.md b/src/resume.md index b0d052a..94d500c 100644 --- a/src/resume.md +++ b/src/resume.md @@ -2,7 +2,7 @@ title: Resume eleventyNavigation: key: Resume - icon: file-lines + icon: file-text order: 2 ---