Link hover and focus styling

This commit is contained in:
Oliver Davies 2021-06-30 08:00:00 +01:00
parent 907248b05b
commit a91b413e4a
3 changed files with 11 additions and 5 deletions

View file

@ -21,7 +21,7 @@
<nav class="flex items-center mt-4 space-x-6 md:mt-0 md:flex-row">
{% for item in site.menus.main %}
{% set is_active = page.url matches '#' ~ item.is_active ~ '#' %}
<a class="text-black dark:text-white border-b-3 py-2 {{ is_active ? 'border-blue-800 dark:border-blue-400' : 'border-transparent' }}" href="{{ item.href }}">{{ item.title }}</a>
<a class="text-black dark:text-white border-b-3 py-2 hover:border-gray-300 {{ is_active ? 'border-blue-800 dark:border-blue-400' : 'border-transparent' }}" href="{{ item.href }}">{{ item.title }}</a>
{% endfor %}
</nav>
</div>