Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
belomaxorka committed Apr 4, 2024
1 parent 9c79492 commit d98b541
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
19 changes: 19 additions & 0 deletions assets/Cookie.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ a {
text-decoration: underline !important;
}

.darkMode {
.whiteTheme {
background-color: var(--main-font-color) !important;
color: var(--main-bg-color) !important;
}
Expand Down
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
<link href="assets/modern-normalize.min.css" rel="stylesheet">
<link href="assets/styles.css" rel="stylesheet">
<script type="text/javascript" src="assets/scripts.js"></script>
<script type="text/javascript" src="assets/Cookie.min.js"></script>
<script type="text/javascript">
// Set white theme
if (Cookie.exists('whiteTheme')) {
document.body.classList.toggle('whiteTheme');
}
</script>
</head>
<body>
<main>
Expand Down Expand Up @@ -100,7 +107,13 @@
case 'belomaxorka misc':
case 'belomaxorka miscellaneous':
case 'belomaxorka social':
document.body.classList.toggle('darkMode');
if (Cookie.exists('whiteTheme')) {
Cookie.remove('whiteTheme');
} else {
Cookie.set('whiteTheme', 1, {
sameSite: 'Strict'
});
}
break;
default:
enteredCommand = enteredCommand.split(' ')[0];
Expand Down

0 comments on commit d98b541

Please sign in to comment.