From 314367c1b1ce8bf675efefd79c6bd00bfda3fd4a Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 13 Aug 2023 19:51:28 -0700 Subject: [PATCH] chore: dry up nav + icon links --- src/_data/nav.js | 33 +++++++++++++++++++++++ src/_includes/default.liquid | 2 +- src/_includes/icons/calendar.liquid | 7 ----- src/_includes/icons/coffee.liquid | 7 ----- src/_includes/icons/email.liquid | 7 ----- src/_includes/icons/github.liquid | 7 ----- src/_includes/icons/goodreads.liquid | 7 ----- src/_includes/icons/lastfm.liquid | 7 ----- src/_includes/icons/letterboxd.liquid | 7 ----- src/_includes/icons/linkedin.liquid | 7 ----- src/_includes/icons/mastodon.liquid | 7 ----- src/_includes/icons/spotify.liquid | 7 ----- src/_includes/icons/trakt.liquid | 7 ----- src/_includes/main.liquid | 2 +- src/_includes/now.liquid | 2 +- src/_includes/partials/footer.liquid | 20 ++++++-------- src/_includes/partials/header.liquid | 2 +- src/_includes/partials/linked-icon.liquid | 7 +++++ src/_includes/partials/nav/menu.liquid | 23 ++++------------ src/_includes/post.liquid | 2 +- src/resume.md | 8 +++--- 21 files changed, 62 insertions(+), 116 deletions(-) create mode 100644 src/_data/nav.js delete mode 100644 src/_includes/icons/calendar.liquid delete mode 100644 src/_includes/icons/coffee.liquid delete mode 100644 src/_includes/icons/email.liquid delete mode 100644 src/_includes/icons/github.liquid delete mode 100644 src/_includes/icons/goodreads.liquid delete mode 100644 src/_includes/icons/lastfm.liquid delete mode 100644 src/_includes/icons/letterboxd.liquid delete mode 100644 src/_includes/icons/linkedin.liquid delete mode 100644 src/_includes/icons/mastodon.liquid delete mode 100644 src/_includes/icons/spotify.liquid delete mode 100644 src/_includes/icons/trakt.liquid create mode 100644 src/_includes/partials/linked-icon.liquid diff --git a/src/_data/nav.js b/src/_data/nav.js new file mode 100644 index 00000000..1965824d --- /dev/null +++ b/src/_data/nav.js @@ -0,0 +1,33 @@ +module.exports = async function () { + return { + footer: [{ name: 'Uses' }, { name: 'Referrals' }], + menu: [ + { name: 'Now' }, + { name: 'About' }, + { name: 'Tags', icon: 'tags' }, + { name: 'Search', icon: 'search' }, + { name: 'Feeds', icon: 'rss' }, + { name: 'Webrings', icon: 'heart-handshake' }, + ], + social: [ + { name: 'Email', url: 'mailto:hi@coryd.dev', icon: 'at' }, + { name: 'GitHub', url: 'https://github.com/cdransf', icon: 'brand-github' }, + { name: 'Mastodon', url: 'https://social.lol/@cory', icon: 'brand-mastodon' }, + { name: 'Last.fm', url: 'https://www.last.fm/user/cdrn_', icon: 'brand-lastfm' }, + { + name: 'Spotify', + url: 'https://open.spotify.com/user/mdh0acvmvfsbunzt6ywnq2tg3', + icon: 'brand-spotify', + }, + { name: 'Letterboxd', url: 'https://letterboxd.com/cdme', icon: 'brand-letterboxd' }, + { name: 'Trakt', url: 'https://trakt.tv/users/cdransf', icon: 'device-tv' }, + { name: 'Goodreads', url: 'https://www.goodreads.com/cdransf', icon: 'books' }, + { name: 'Buy Me a Coffee', url: 'https://www.buymeacoffee.com/cory', icon: 'cup' }, + ], + resume: [ + { name: 'GitHub', url: 'https://github.com/cdransf', icon: 'brand-github' }, + { name: 'LinkedIn', url: 'https://www.linkedin.com/in/cdransf/', icon: 'brand-linkedin' }, + { name: 'SavvyCal', url: 'https://savvycal.com/coryd/quick-call', icon: 'calendar-plus' }, + ], + } +} diff --git a/src/_includes/default.liquid b/src/_includes/default.liquid index 85b56bd9..fff9a115 100644 --- a/src/_includes/default.liquid +++ b/src/_includes/default.liquid @@ -1,7 +1,7 @@ --- layout: main --- -{% render "partials/header.liquid", site: site, page: page %} +{% render "partials/header.liquid", site: site, page: page, nav: nav %}
{{ content }}
\ No newline at end of file diff --git a/src/_includes/icons/calendar.liquid b/src/_includes/icons/calendar.liquid deleted file mode 100644 index a991f90e..00000000 --- a/src/_includes/icons/calendar.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "calendar-plus" "SavvyCal" %} - \ No newline at end of file diff --git a/src/_includes/icons/coffee.liquid b/src/_includes/icons/coffee.liquid deleted file mode 100644 index 56f4ac77..00000000 --- a/src/_includes/icons/coffee.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "cup" "Buy Me a Coffee" %} - \ No newline at end of file diff --git a/src/_includes/icons/email.liquid b/src/_includes/icons/email.liquid deleted file mode 100644 index 9526b2f4..00000000 --- a/src/_includes/icons/email.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "at" "Email" %} - \ No newline at end of file diff --git a/src/_includes/icons/github.liquid b/src/_includes/icons/github.liquid deleted file mode 100644 index 97ebdb51..00000000 --- a/src/_includes/icons/github.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-github" "GitHub" %} - \ No newline at end of file diff --git a/src/_includes/icons/goodreads.liquid b/src/_includes/icons/goodreads.liquid deleted file mode 100644 index a50394fc..00000000 --- a/src/_includes/icons/goodreads.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "books" "Goodreads" %} - \ No newline at end of file diff --git a/src/_includes/icons/lastfm.liquid b/src/_includes/icons/lastfm.liquid deleted file mode 100644 index 815deeed..00000000 --- a/src/_includes/icons/lastfm.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-lastfm" "Last.fm" %} - \ No newline at end of file diff --git a/src/_includes/icons/letterboxd.liquid b/src/_includes/icons/letterboxd.liquid deleted file mode 100644 index 416bb848..00000000 --- a/src/_includes/icons/letterboxd.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-letterboxd" "Letterboxd" %} - \ No newline at end of file diff --git a/src/_includes/icons/linkedin.liquid b/src/_includes/icons/linkedin.liquid deleted file mode 100644 index e4fae74f..00000000 --- a/src/_includes/icons/linkedin.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-linkedin" "LinkedIn" %} - \ No newline at end of file diff --git a/src/_includes/icons/mastodon.liquid b/src/_includes/icons/mastodon.liquid deleted file mode 100644 index 34902d13..00000000 --- a/src/_includes/icons/mastodon.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-mastodon" "Mastodon" %} - \ No newline at end of file diff --git a/src/_includes/icons/spotify.liquid b/src/_includes/icons/spotify.liquid deleted file mode 100644 index 57c54285..00000000 --- a/src/_includes/icons/spotify.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "brand-spotify" "Spotify" %} - \ No newline at end of file diff --git a/src/_includes/icons/trakt.liquid b/src/_includes/icons/trakt.liquid deleted file mode 100644 index f63630e3..00000000 --- a/src/_includes/icons/trakt.liquid +++ /dev/null @@ -1,7 +0,0 @@ - - {% tablericon "device-tv" "Trakt" %} - \ No newline at end of file diff --git a/src/_includes/main.liquid b/src/_includes/main.liquid index 3a76e6bd..f5d2c8be 100644 --- a/src/_includes/main.liquid +++ b/src/_includes/main.liquid @@ -6,5 +6,5 @@ layout: base
{{ content }}
- {% render "partials/footer.liquid", page: page %} + {% render "partials/footer.liquid", page: page, nav: nav %} \ No newline at end of file diff --git a/src/_includes/now.liquid b/src/_includes/now.liquid index 5dc998e6..581255c5 100644 --- a/src/_includes/now.liquid +++ b/src/_includes/now.liquid @@ -1,7 +1,7 @@ --- layout: main --- -{% render "partials/header.liquid", site: site, page: page %} +{% render "partials/header.liquid", site: site, page: page, nav: nav %} {{ content }} {% render "partials/now/artists.liquid", music:artists %} {% render "partials/now/albums.liquid", music:albums %} diff --git a/src/_includes/partials/footer.liquid b/src/_includes/partials/footer.liquid index a8531c89..d36adc10 100644 --- a/src/_includes/partials/footer.liquid +++ b/src/_includes/partials/footer.liquid @@ -1,17 +1,13 @@ diff --git a/src/_includes/partials/header.liquid b/src/_includes/partials/header.liquid index 1772edb5..5e1b4960 100644 --- a/src/_includes/partials/header.liquid +++ b/src/_includes/partials/header.liquid @@ -2,5 +2,5 @@

{{ site.title }}

- {% render "partials/nav/menu.liquid", page: page %} + {% render "partials/nav/menu.liquid", page: page, nav: nav %} \ No newline at end of file diff --git a/src/_includes/partials/linked-icon.liquid b/src/_includes/partials/linked-icon.liquid new file mode 100644 index 00000000..b6f6b95b --- /dev/null +++ b/src/_includes/partials/linked-icon.liquid @@ -0,0 +1,7 @@ + + {% tablericon icon name %} + \ No newline at end of file diff --git a/src/_includes/partials/nav/menu.liquid b/src/_includes/partials/nav/menu.liquid index 9f9a8fef..8ecffd9b 100644 --- a/src/_includes/partials/nav/menu.liquid +++ b/src/_includes/partials/nav/menu.liquid @@ -1,22 +1,9 @@ \ No newline at end of file diff --git a/src/_includes/post.liquid b/src/_includes/post.liquid index dcaaff73..86123f00 100644 --- a/src/_includes/post.liquid +++ b/src/_includes/post.liquid @@ -1,7 +1,7 @@ --- layout: main --- -{% render "partials/header.liquid", site: site, page: page %} +{% render "partials/header.liquid", site: site, page: page, nav: nav %}

{{ title }}

diff --git a/src/resume.md b/src/resume.md index 9c63447a..9598487f 100644 --- a/src/resume.md +++ b/src/resume.md @@ -19,10 +19,10 @@ meta: --- Software engineer with a wide range of experience covering frontend and mobile application development. -
- {% render "icons/github.liquid" %} - {% render "icons/linkedin.liquid" %} - {% render "icons/calendar.liquid" %} +
+ {% for link in nav.resume %} + {% render "partials/linked-icon.liquid", name: link.name, link: link.url, icon: link.icon %} + {% endfor %}
### Experience