Add dark mode support

This commit is contained in:
Oliver Davies 2021-06-30 08:00:00 +01:00
parent 9cc4952c6d
commit 534a38a63c
5 changed files with 7 additions and 7 deletions

View file

@ -5,7 +5,7 @@
<a href="/">
<svg
aria-hidden="true"
class="w-16 h-16 text-blue-700 fill-current md:w-18 md:h-18"
class="w-16 h-16 text-blue-700 fill-current dark:text-blue-400 md:w-18 md:h-18"
viewBox="0 0 706 504"
xmlns="http://www.w3.org/2000/svg"
>
@ -21,7 +21,7 @@
<nav class="flex flex-col items-center mt-4 md:mt-0 md:flex-row md:space-x-4">
{% for item in site.menus.main %}
{% set is_active = page.url matches '#' ~ item.is_active ~ '#' %}
<a class="text-black border-b-3 py-2 {{ is_active ? 'border-blue-700' : 'border-transparent' }}" href="{{ item.href }}">{{ item.title }}</a>
<a class="text-black dark:text-white border-b-3 py-2 {{ is_active ? 'border-blue-700 dark:border-blue-400' : 'border-transparent' }}" href="{{ item.href }}">{{ item.title }}</a>
{% endfor %}
</nav>
</div>