mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-07-07 21:45:08 +00:00
Add seasonal theme support
This commit is contained in:
9
client/web/assets/seasonal/autumn.css
Normal file
9
client/web/assets/seasonal/autumn.css
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
.autumn {
|
||||||
|
background-image: url("autumn.jpg");
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-dark {
|
||||||
|
background-color: #343a40eb!important;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
BIN
client/web/assets/seasonal/autumn.jpg
Normal file
BIN
client/web/assets/seasonal/autumn.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 MiB |
3022
client/web/assets/seasonal/logo-autumn.svg
Normal file
3022
client/web/assets/seasonal/logo-autumn.svg
Normal file
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 165 KiB |
@@ -9,9 +9,9 @@
|
|||||||
</head>
|
</head>
|
||||||
<body class="bg-dark text-white">
|
<body class="bg-dark text-white">
|
||||||
<div class="container py-5">
|
<div class="container py-5">
|
||||||
<div class="row justify-content-center">
|
<div class="justify-content-center">
|
||||||
<div class="col-md-6">
|
<img id="logotype" src="assets/logo.svg" alt="Logo" class="col-md-6 img-fluid mx-auto d-block mb-5">
|
||||||
<img src="assets/logo.svg" alt="Logo" class="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">
|
<form id="uploadForm" enctype="multipart/form-data" class="mb-4 dropzone dz-clickable">
|
||||||
<h3>Upload a sound</h3>
|
<h3>Upload a sound</h3>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@@ -32,6 +32,8 @@
|
|||||||
Endpoint not loading!?
|
Endpoint not loading!?
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr class="my-4">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h3>Avoid list</h3>
|
<h3>Avoid list</h3>
|
||||||
<p>A list of users the bot should never be around</p>
|
<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/file-list.js" type="module"></script>
|
||||||
<script src="scripts/index.js" type="module"></script>
|
<script src="scripts/index.js" type="module"></script>
|
||||||
<script src="scripts/join.js" type="module"></script>
|
<script src="scripts/join.js" type="module"></script>
|
||||||
|
<script src="scripts/seasonal-theme.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
11
client/web/scripts/seasonal-theme.js
Normal file
11
client/web/scripts/seasonal-theme.js
Normal 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"/>';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user