chore: refactor nav

This commit is contained in:
Cory Dransfeldt 2023-08-13 18:05:58 -07:00
parent 5428e3f563
commit 9ddd1459d3
No known key found for this signature in database
11 changed files with 47 additions and 46 deletions

View file

@ -0,0 +1,19 @@
{%- capture pageUrl %}/{{ link | downcase }}/{% endcapture -%}
{% if page.url != pageUrl %}
<a class="text-gray-700 hover:text-pink-500 dark:text-gray-200 dark:hover:text-pink-500 !no-underline" href="/{{ link | downcase }}">
{% if icon %}
{% tablericon icon link %}
{% else %}
{{ link }}
{% endif %}
</a>
{% endif %}
{% if page.url == pageUrl %}
<span class="cursor-not-allowed active">
{% if icon %}
{% tablericon icon link %}
{% else %}
{{ link }}
{% endif %}
</span>
{% endif %}

View file

@ -0,0 +1,22 @@
<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>
</ul>
</nav>