chore: dry up nav + icon links

This commit is contained in:
Cory Dransfeldt 2023-08-13 19:51:28 -07:00
parent 9ddd1459d3
commit 314367c1b1
No known key found for this signature in database
21 changed files with 62 additions and 116 deletions

33
src/_data/nav.js Normal file
View file

@ -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' },
],
}
}

View file

@ -1,7 +1,7 @@
---
layout: main
---
{% render "partials/header.liquid", site: site, page: page %}
{% render "partials/header.liquid", site: site, page: page, nav: nav %}
<div class="pt-8 prose dark:prose-invert hover:prose-a:text-blue-500 max-w-full">
{{ content }}
</div>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://savvycal.com/coryd/quick-call"
rel="me"
title="SavvyCal">
{% tablericon "calendar-plus" "SavvyCal" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://www.buymeacoffee.com/cory"
rel="me"
title="Buy Me a Coffee">
{% tablericon "cup" "Buy Me a Coffee" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="mailto:coryd@hey.com"
rel="me"
title="Email">
{% tablericon "at" "Email" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://github.com/cdransf"
rel="me"
title="GitHub">
{% tablericon "brand-github" "GitHub" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://www.goodreads.com/cdransf"
rel="me"
title="Goodreads">
{% tablericon "books" "Goodreads" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://www.last.fm/user/cdrn_"
rel="me"
title="Last.fm">
{% tablericon "brand-lastfm" "Last.fm" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://letterboxd.com/cdme"
rel="me"
title="Letterboxd">
{% tablericon "brand-letterboxd" "Letterboxd" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://www.linkedin.com/in/cdransf/"
rel="me"
title="LinkedIn">
{% tablericon "brand-linkedin" "LinkedIn" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://social.lol/@cory"
rel="me"
title="Mastodon">
{% tablericon "brand-mastodon" "Mastodon" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://open.spotify.com/user/mdh0acvmvfsbunzt6ywnq2tg3"
rel="me"
title="Spotify">
{% tablericon "brand-spotify" "Spotify" %}
</a>

View file

@ -1,7 +0,0 @@
<a
class="link--icon icon--24"
href="https://trakt.tv/users/cdransf"
rel="me"
title="Trakt">
{% tablericon "device-tv" "Trakt" %}
</a>

View file

@ -6,5 +6,5 @@ layout: base
<main class="flex-1 w-10/12 max-w-screen-sm md:max-w-screen-md mx-auto">
{{ content }}
</main>
{% render "partials/footer.liquid", page: page %}
{% render "partials/footer.liquid", page: page, nav: nav %}
</div>

View file

@ -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 %}

View file

@ -1,17 +1,13 @@
<footer>
<div class="mt-8 pt-8 pb-4 flex gap-2 md:gap-3 justify-center w-full">
{% render "icons/email.liquid" %}
{% render "icons/github.liquid" %}
{% render "icons/mastodon.liquid" %}
{% render "icons/lastfm.liquid" %}
{% render "icons/spotify.liquid" %}
{% render "icons/letterboxd.liquid" %}
{% render "icons/trakt.liquid" %}
{% render "icons/goodreads.liquid" %}
{% render "icons/coffee.liquid" %}
{% for link in nav.social %}
{% render "partials/linked-icon.liquid", name: link.name, link: link.url, icon: link.icon %}
{% endfor %}
</div>
<div class="text-sm text-gray-500 dark:text-gray-100 pb-8 text-center">
{% render "partials/nav/link.liquid", page: page, link: "Uses" %} •
{% render "partials/nav/link.liquid", page: page, link: "Referrals" %}
<div class="flex justify-center text-sm text-gray-500 dark:text-gray-100 pb-8 text-center">
{% for link in nav.footer %}
{% render "partials/nav/link.liquid", page: page, link: link.name, icon: link.icon %}
{% if not forloop.last %}<span class="mx-1">•</span>{% endif %}
{% endfor %}
</div>
</footer>

View file

@ -2,5 +2,5 @@
<h1 class="text-2xl md:text-3xl font-black leading-tight pb-5 md:pb-0">
<a class="text-gray-700 dark:text-gray-200" href="/">{{ site.title }}</a>
</h1>
{% render "partials/nav/menu.liquid", page: page %}
{% render "partials/nav/menu.liquid", page: page, nav: nav %}
</div>

View file

@ -0,0 +1,7 @@
<a
class="link--icon icon--24"
href="{{ link }}"
rel="me"
title="{{ name }}">
{% tablericon icon name %}
</a>

View file

@ -1,22 +1,9 @@
<nav>
<ul class="flex">
<li class="mr-6">
{% render "partials/nav/link.liquid", page: page, link: "Now" %}
</li>
<li class="mr-6">
{% render "partials/nav/link.liquid", page: page, link: "About" %}
</li>
<li class="mr-6">
{% render "partials/nav/link.liquid", page: page, link: "Tags", icon: "tag" %}
</li>
<li class="mr-6 client-side">
{% render "partials/nav/link.liquid", page: page, link: "Search", icon: "search" %}
</li>
<li class="mr-6">
{% render "partials/nav/link.liquid", page: page, link: "Feeds", icon: "rss" %}
</li>
<li>
{% render "partials/nav/link.liquid", page: page, link: "Webrings", icon: "heart-handshake" %}
</li>
{% for link in nav.menu %}
<li class="mr-6">
{% render "partials/nav/link.liquid", page: page, link: link.name, icon: link.icon %}
</li>
{% endfor %}
</ul>
</nav>

View file

@ -1,7 +1,7 @@
---
layout: main
---
{% render "partials/header.liquid", site: site, page: page %}
{% render "partials/header.liquid", site: site, page: page, nav: nav %}
<article class="h-entry" data-pagefind-body>
<h2 class="p-name text-xl md:text-2xl font-black leading-tight dark:text-gray-200 pt-8" data-pagefind-meta="title">{{ title }}</h2>
<span class="p-author h-card hidden">{{ site.title }}</span>

View file

@ -19,10 +19,10 @@ meta:
---
Software engineer with a wide range of experience covering frontend and mobile application development.
<div class="flex gap-3">
{% render "icons/github.liquid" %}
{% render "icons/linkedin.liquid" %}
{% render "icons/calendar.liquid" %}
<div class="flex gap-3 not-prose">
{% for link in nav.resume %}
{% render "partials/linked-icon.liquid", name: link.name, link: link.url, icon: link.icon %}
{% endfor %}
</div>
### Experience