mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-09 08:59:39 +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>
|
||||
<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>
|
||||
|
||||
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