chore: restore theme button

This commit is contained in:
Cory Dransfeldt 2024-02-15 12:36:17 -08:00
parent b9c7905dee
commit cbb71f017b
No known key found for this signature in database
7 changed files with 79 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{%- capture pageUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if pageUrl contains page.fileSlug and page.fileSlug %}
<span class="active" aria-current="page">
<span class="active {{ class }}" aria-current="page">
{% if icon %}
{% tablericon icon link %}
{% else %}
@ -9,7 +9,7 @@
</span>
{% else %}
{% if icon %}
<a class="{{ icon | downcase }}" href="/{{ link | downcase }}">
<a class="{{ icon | downcase }} {{ class }}" href="/{{ link | downcase }}">
{% tablericon icon link %}
</a>
{% else %}

View file

@ -2,8 +2,9 @@
<ul class="flex--centered">
{% for link in nav.menu %}
<li>
{% render "partials/nav/link.liquid", page: page, link: link.name, icon: link.icon %}
{% render "partials/nav/link.liquid", page: page, link: link.name, icon: link.icon, class: link.class %}
</li>
{% endfor %}
{% render "partials/nav/theme.liquid" %}
</ul>
</nav>

View file

@ -0,0 +1,8 @@
<li class="theme__toggle client-side">
<span class="light">
{% tablericon "sun" "Toggle light theme" %}
</span>
<span class="dark">
{% tablericon "moon" "Toggle dark theme" %}
</span>
</li>