mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
rename data-theme to dark-theme
This commit is contained in:
parent
7f58d4b0e3
commit
90231ef84d
3 changed files with 4 additions and 8 deletions
|
@ -7,7 +7,7 @@
|
||||||
:to="{ name: 'home' }" :disabled="waiting"
|
:to="{ name: 'home' }" :disabled="waiting"
|
||||||
exact exact-active-class="active"
|
exact exact-active-class="active"
|
||||||
>
|
>
|
||||||
<span v-if="theme == true">
|
<span v-if="theme">
|
||||||
<img alt="Yunohost logo" src="./assets/logo_light.png" width="40">
|
<img alt="Yunohost logo" src="./assets/logo_light.png" width="40">
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
|
@ -160,7 +160,7 @@ export default {
|
||||||
this.$store.commit('SET_SPINNER', 'spookycat')
|
this.$store.commit('SET_SPINNER', 'spookycat')
|
||||||
}
|
}
|
||||||
|
|
||||||
document.documentElement.setAttribute('data-theme', localStorage.getItem('theme')) // updates the data-theme attribute
|
document.documentElement.setAttribute('dark-theme', localStorage.getItem('theme')) // updates the data-theme attribute
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -55,11 +55,9 @@ $font-weight-bold: 500;
|
||||||
--info: #0079c4;
|
--info: #0079c4;
|
||||||
--success: #81c926;
|
--success: #81c926;
|
||||||
--warning: #ffc107;
|
--warning: #ffc107;
|
||||||
|
|
||||||
--logo-src: "./assets/logo_dark.png";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="true"] {
|
[dark-theme="true"] {
|
||||||
/* Variables for dark mode */
|
/* Variables for dark mode */
|
||||||
--background-color: #222c3c;
|
--background-color: #222c3c;
|
||||||
--background-color-secondary: #273142;
|
--background-color-secondary: #273142;
|
||||||
|
@ -85,8 +83,6 @@ $font-weight-bold: 500;
|
||||||
--info: #0093ee;
|
--info: #0093ee;
|
||||||
--success: #96bf47;
|
--success: #96bf47;
|
||||||
--warning: #ffc02a;
|
--warning: #ffc02a;
|
||||||
|
|
||||||
--logo-src: "./assets/logo_light.png";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$purple: #9932cc;
|
$purple: #9932cc;
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default {
|
||||||
'SET_THEME' (state, boolean) {
|
'SET_THEME' (state, boolean) {
|
||||||
localStorage.setItem('theme', boolean)
|
localStorage.setItem('theme', boolean)
|
||||||
state.theme = boolean
|
state.theme = boolean
|
||||||
document.documentElement.setAttribute('data-theme', boolean)
|
document.documentElement.setAttribute('dark-theme', boolean)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue