chore: refactor nav
This commit is contained in:
parent
5428e3f563
commit
9ddd1459d3
11 changed files with 47 additions and 46 deletions
19
src/_includes/partials/nav/link.liquid
Normal file
19
src/_includes/partials/nav/link.liquid
Normal 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 %}
|
Reference in a new issue