Add theme toggle to login screen
This commit is contained in:
@@ -7,10 +7,24 @@
|
||||
html, body { height: 100%; overflow: hidden; }
|
||||
body {
|
||||
background-color: #161210;
|
||||
background-image: linear-gradient(90deg, transparent 49.5%, rgb(228 98 44 / 7%) 50%, transparent 50.5%), linear-gradient(rgb(228 98 44 / 5%) 1px, transparent 1px);
|
||||
background-size: 70px 70px, 7px 7px;
|
||||
background-image: url(images/logo.svg), linear-gradient(90deg, transparent 49.5%, rgb(228 98 44 / 7%) 50%, transparent 50.5%), linear-gradient(rgb(228 98 44 / 5%) 1px, transparent 1px);
|
||||
background-position: center, 0 0, 0 0;
|
||||
background-repeat: no-repeat, repeat, repeat;
|
||||
background-size: 30%, 70px 70px, 7px 7px;
|
||||
}
|
||||
|
||||
html[data-theme="light"] body {
|
||||
background-color: #f1f1e9;
|
||||
background-image: url(images/logo.svg), linear-gradient(90deg, transparent 49.5%, rgb(17 33 43 / 5%) 50%, transparent 50.5%), linear-gradient(rgb(17 33 43 / 4%) 1px, transparent 1px);
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
try {
|
||||
if (document.cookie.indexOf('colorMode=light') > -1) {
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
}
|
||||
} catch (error) { }
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user