main #8
2 changed files with 28 additions and 6 deletions
|
@ -1,5 +1,26 @@
|
||||||
function onload() {
|
function onload() {
|
||||||
sdocument.getElementById("body").style.fontFamily = "terminess-nf, system-ui";
|
if (!localStorage.getItem('sgaEnabled')) {
|
||||||
|
disableSGA()
|
||||||
|
}
|
||||||
|
if (localStorage.getItem('sgaEnabled', true)) {
|
||||||
|
enableSGA()
|
||||||
|
}
|
||||||
|
if (localStorage.getItem('sgaEnabled', false)) {
|
||||||
|
disableSGA();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function enableSGA() {
|
||||||
|
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
|
||||||
|
document.getElementById("body").style.fontWeight = "lighter";
|
||||||
|
localStorage.setItem( 'sgaEnabled', true );
|
||||||
|
console.debug(localStorage.getItem('sgaEnabled'))
|
||||||
|
}
|
||||||
|
|
||||||
|
function disableSGA() {
|
||||||
|
document.getElementById("body").style.fontFamily = " terminess-nf, system-ui";
|
||||||
|
localStorage.setItem( 'sgaEnabled', false );
|
||||||
|
console.debug(localStorage.getItem('sgaEnabled'))
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleTheme() {
|
function toggleTheme() {
|
||||||
|
@ -7,9 +28,9 @@ function toggleTheme() {
|
||||||
// elements.
|
// elements.
|
||||||
// Select your element using indexing.
|
// Select your element using indexing.
|
||||||
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
|
if (document.getElementById("body").style.fontFamily !== "standardGalactic, system-ui") {
|
||||||
document.getElementById("body").style.fontFamily = "standardGalactic, system-ui";
|
disableSGA()
|
||||||
document.getElementById("body").style.fontWeight = "lighter";
|
}
|
||||||
} else {
|
else {
|
||||||
document.getElementById("body").style.fontFamily = " terminess-nf, system-ui";
|
enableSGA()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,8 @@ const { title } = Astro.props;
|
||||||
<slot />
|
<slot />
|
||||||
<Footer />
|
<Footer />
|
||||||
<NormalScripts />
|
<NormalScripts />
|
||||||
<script is:inline src="/scripts/fuckchrome.js"></script>
|
<!--
|
||||||
|
<script is:inline src="/scripts/fuckchrome.js"></script>-->
|
||||||
<audio
|
<audio
|
||||||
id="clickSound"
|
id="clickSound"
|
||||||
src="/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3">
|
src="/assets/sounds/ui/zapsplat_multimedia_button_click_004_68776.mp3">
|
||||||
|
|
Loading…
Reference in a new issue