mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-12-26 16:48:51 +01:00
title attribute that display current theme
This commit is contained in:
parent
4a1e8717e9
commit
c0044cc765
@ -4,7 +4,7 @@
|
|||||||
aria-label="Toggle dark mode"
|
aria-label="Toggle dark mode"
|
||||||
class="navbar-item is-inline-block-mobile"
|
class="navbar-item is-inline-block-mobile"
|
||||||
>
|
>
|
||||||
<i :class="`${faClasses[mode]}`" class="fa-fw"></i>
|
<i :class="`${faClasses[mode]}`" class="fa-fw" :title="`${titles[mode]}`"></i>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,11 +15,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isDark: null,
|
isDark: null,
|
||||||
faClasses: null,
|
faClasses: null,
|
||||||
|
titles: null,
|
||||||
mode: null,
|
mode: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
this.faClasses = ["fas fa-adjust", "fas fa-circle", "far fa-circle"];
|
this.faClasses = ["fas fa-adjust", "fas fa-circle", "far fa-circle"];
|
||||||
|
this.titles = ["Auto-switch", "Light theme", "Dark theme"]
|
||||||
this.mode = 0;
|
this.mode = 0;
|
||||||
if ("overrideDark" in localStorage) {
|
if ("overrideDark" in localStorage) {
|
||||||
// Light theme is 1 and Dark theme is 2
|
// Light theme is 1 and Dark theme is 2
|
||||||
|
Loading…
Reference in New Issue
Block a user