Add seasonal theme support

This commit is contained in:
Myx
2023-10-28 05:28:31 +02:00
parent 54f1c5234b
commit 5edc2eacd6
5 changed files with 3048 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
.autumn {
background-image: url("autumn.jpg");
background-size: cover;
}
.bg-dark {
background-color: #343a40eb!important;
border-radius: 4px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 165 KiB

View File

@@ -9,9 +9,9 @@
</head>
<body class="bg-dark text-white">
<div class="container py-5">
<div class="row justify-content-center">
<div class="col-md-6">
<img src="assets/logo.svg" alt="Logo" class="img-fluid mx-auto d-block mb-5">
<div class="justify-content-center">
<img id="logotype" src="assets/logo.svg" alt="Logo" class="col-md-6 img-fluid mx-auto d-block mb-5">
<div class="col-md-6 bg-dark pt-3 mx-auto">
<form id="uploadForm" enctype="multipart/form-data" class="mb-4 dropzone dz-clickable">
<h3>Upload a sound</h3>
<div class="form-group">
@@ -32,6 +32,8 @@
Endpoint not loading!?
</div>
<hr class="my-4">
<div>
<h3>Avoid list</h3>
<p>A list of users the bot should never be around</p>
@@ -68,5 +70,6 @@
<script src="scripts/file-list.js" type="module"></script>
<script src="scripts/index.js" type="module"></script>
<script src="scripts/join.js" type="module"></script>
<script src="scripts/seasonal-theme.js"></script>
</body>
</html>

View File

@@ -0,0 +1,11 @@
var logo = document.getElementById('logotype');
var body = document.getElementsByTagName('body')[0];
var today = new Date();
var month = today.getMonth();
if (month == 9) {
logo.src = 'assets/seasonal/logo-autumn.svg';
body.className += ' autumn';
document.head.innerHTML += '<link rel="stylesheet" href="assets/seasonal/autumn.css" type="text/css"/>';
}