From b6ecb0485ebbd1bd1512cc6a087c403ad67683f0 Mon Sep 17 00:00:00 2001 From: mattkae Date: Wed, 24 Nov 2021 21:08:53 -0500 Subject: (mkosarek) Fixed up a bunch of styling, add new links, and made it a light theme --- index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'index.js') diff --git a/index.js b/index.js index 72fcc2e..fbe9ba9 100644 --- a/index.js +++ b/index.js @@ -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() { -- cgit v1.2.1