diff options
author | mattkae <mattkae@protonmail.com> | 2021-11-24 21:08:53 -0500 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2021-11-24 21:08:53 -0500 |
commit | b6ecb0485ebbd1bd1512cc6a087c403ad67683f0 (patch) | |
tree | f73ae28c37e7589244385cf4d91cf4e8efb02a10 /index.js | |
parent | ac9c187740797c5f8105b052bc057d274edc4be1 (diff) |
(mkosarek) Fixed up a bunch of styling, add new links, and made it a light theme
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -2,6 +2,22 @@ function main() { runCarousel(); runPosts(); + + // -- Note! We require a black background to properly see the WebGL, so we handle that here. + var bodyElement = document.querySelector('body'); + var themeButtonList = document.querySelectorAll('#theme_selector > button'); + themeButtonList.forEach(function(themeButton) { + if (themeButton.id !== 'theme_button_default') { + themeButton.addEventListener('click', function() { + bodyElement.style.background = 'black'; + }); + } + else { + themeButton.addEventListener('click', function() { + bodyElement.style.background = 'white'; + }); + } + }) } function runCarousel() { |