Skip to content

Commit

Permalink
fix: dark mode theme switch color
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasvinclav committed May 20, 2023
1 parent bf5000d commit 0e152b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/unfold/static/unfold/css/styles.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/unfold/templates/unfold/helpers/userlinks.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-40 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400" x-cloak x-show="openTheme" @click.outside="openTheme = false">
<a class="cursor-pointer flex flex-row leading-none mx-1 px-3 py-1.5 rounded hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-200"
x-on:click="adminTheme = 'dark'"
x-bind:class="adminTheme == 'dark' && 'text-primary-600 hover:!text-primary-600'">
x-bind:class="adminTheme == 'dark' && 'text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600'">
<span class="material-symbols-outlined mr-2">dark_mode</span>
<span class="leading-none self-center">{% trans "Dark" %}</span>
</a>

<a class="cursor-pointer flex flex-row mx-1 px-3 py-1.5 rounded hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-200"
x-on:click="adminTheme = 'light'"
x-bind:class="adminTheme == 'light' && 'text-primary-600 hover:!text-primary-600'">
x-bind:class="adminTheme == 'light' && 'text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600'">
<span class="material-symbols-outlined mr-2">light_mode</span>
<span class="leading-none self-center">{% trans "Light" %}</span>
</a>

<a class="cursor-pointer flex flex-row mx-1 px-3 py-1.5 rounded hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-200"
x-on:click="adminTheme = 'auto'"
x-bind:class="adminTheme == 'auto' && 'text-primary-600 hover:!text-primary-600'">
x-bind:class="adminTheme == 'auto' && 'text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600'">
<span class="material-symbols-outlined mr-2">computer</span>
<span class="leading-none self-center">{% trans "System" %}</span>
</a>
Expand Down

0 comments on commit 0e152b9

Please sign in to comment.