From 85e1d6afcedac6c369571cf77ab3b88cf81ef7e7 Mon Sep 17 00:00:00 2001 From: Sugaryy_ Date: Wed, 31 May 2023 12:29:31 +0200 Subject: [PATCH] Added dark/light mode switch --- src/index.html | 24 +++++++++++++++--------- src/light-mode.js | 5 +++++ src/lightmode.png | Bin 0 -> 3387 bytes src/style.css | 42 ++++++++++++++++++++++++++++++++++++++---- 4 files changed, 58 insertions(+), 13 deletions(-) create mode 100644 src/light-mode.js create mode 100644 src/lightmode.png diff --git a/src/index.html b/src/index.html index 15b11f3..100d0ea 100644 --- a/src/index.html +++ b/src/index.html @@ -16,6 +16,7 @@
+

Haii!~ Welcome to my lil place! :3

@@ -40,12 +41,12 @@ I'm a transfem catgirl from Poland!
I mostly do programming as a hobby :3
I go by she/her :3

- - Github - Gitea - Youtube - Twitch - + + Github + Gitea + Youtube + Twitch +

Projects

@@ -56,7 +57,7 @@

Links

@@ -74,11 +75,16 @@

+
+ +
- - + +

diff --git a/src/light-mode.js b/src/light-mode.js new file mode 100644 index 0000000..7785de7 --- /dev/null +++ b/src/light-mode.js @@ -0,0 +1,5 @@ +function themeToggle() { + var element = document.body; + element.classList.toggle("light-mode"); + +} \ No newline at end of file diff --git a/src/lightmode.png b/src/lightmode.png new file mode 100644 index 0000000000000000000000000000000000000000..ad3ae3b67d9c3c946533b1e6e55dbbcc0c2321d3 GIT binary patch literal 3387 zcma)9_fr$h7EMA&5{eY1NeM-%N(U8)l%O=}olvAV=>kHiB48-;fg;io!4Qg}Ml^^t z>AeI^8Eqt%{w!9@1EJYKio5SXU{%0HP#0+^D+Yf0I&gE$Bdf${tZTY z>RM}qDWWFY5SW1lBNZ`>?x|GH6a=>o0RS#s{5ODrg2GDx0L!9*j0!MUgeam%td%rhqm>WK*3ln;hqr3*xODXJ@9FY5Q1?mLZ|F4Jb@0( z-lX+RM7UbZ^2>#MkqEQ9_99;MKLU>D9G%Z2N_mb3cLobzs(msE9_PVnjKsY;i2fEn ze3^~?zaslcLnsuuAMcI7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