diff --git a/about.html b/about.html index 3045fa8..64cfd1f 100644 --- a/about.html +++ b/about.html @@ -37,12 +37,19 @@ HOSTING
+
+
+ SERIF +
+

|

DARK
+

© 2022 - 2025 SATURN

ALL RIGHTS RESERVED

+ \ No newline at end of file diff --git a/assets/css/styles.css b/assets/css/styles.css index c3f30f1..281f059 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -10,7 +10,7 @@ @font-face { font-family: "RoboMono"; - src: url(assets/font/robotomono.woff2) format('woff2'); + src: url(../font/RobotoMono-Light.ttf); } :root { @@ -19,11 +19,26 @@ } * { - font-family: "DIN-light", sans-serif; background-color: var(--bg-color); color: var(--text-color); } +body { + font-family: "DIN-light", sans-serif; +} + +.mono-font { + font-family: "RoboMono", monospace !important; +} + +#fontToggleText.mono-text { + font-family: "RoboMono", monospace !important; +} + +#fontToggleText.serif-text { + font-family: "DIN-light", sans-serif !important; +} + .ascii-art { font-family: "RoboMono", monospace; white-space: pre; @@ -103,7 +118,6 @@ body { .navbar a { position: relative; - font-family: "DIN-light", sans-serif; font-size: 23px; text-decoration: none; color: var(--text-color); @@ -181,9 +195,17 @@ body { .theme-switch { cursor: pointer; - text-decoration: wavy; +} + +.font-switch { + cursor: pointer; } body.dark-mode .theme-switch { color: var(--text-color); } + +.switches { + display: flex; + gap: 15px; +} \ No newline at end of file diff --git a/assets/font/RobotoMono-Light.ttf b/assets/font/RobotoMono-Light.ttf new file mode 100644 index 0000000..63229b2 Binary files /dev/null and b/assets/font/RobotoMono-Light.ttf differ diff --git a/assets/js/font.js b/assets/js/font.js new file mode 100644 index 0000000..8f197b0 --- /dev/null +++ b/assets/js/font.js @@ -0,0 +1,34 @@ +document.addEventListener('DOMContentLoaded', () => { + const toggleText = document.getElementById('fontToggleText'); + const body = document.body; + + const savedFont = localStorage.getItem('font'); + + if (savedFont === 'mono') { + body.classList.add('mono-font'); + toggleText.textContent = 'SERIF'; + toggleText.classList.remove('serif-text'); + toggleText.classList.add('mono-text'); + } else { + body.classList.remove('mono-font'); + toggleText.textContent = 'MONO'; + toggleText.classList.remove('mono-text'); + toggleText.classList.add('serif-text'); + } + + toggleText.addEventListener('click', () => { + body.classList.toggle('mono-font'); + + if (body.classList.contains('mono-font')) { + toggleText.textContent = 'SERIF'; + toggleText.classList.remove('serif-text'); + toggleText.classList.add('mono-text'); + localStorage.setItem('font', 'mono'); + } else { + toggleText.textContent = 'MONO'; + toggleText.classList.remove('mono-text'); + toggleText.classList.add('serif-text'); + localStorage.setItem('font', 'serif'); + } + }); +}); diff --git a/index.html b/index.html index d227cf5..3d482e0 100644 --- a/index.html +++ b/index.html @@ -43,12 +43,19 @@
+
+
+ SERIF +
+

|

DARK
+

© 2022 - 2025 SATURN

ALL RIGHTS RESERVED

+ \ No newline at end of file diff --git a/projects.html b/projects.html index 11a13b3..b5fb5dc 100644 --- a/projects.html +++ b/projects.html @@ -23,13 +23,20 @@ PROJECTS HOSTING -
+
+
+
+ SERIF +
+

|

DARK
+

© 2022 - 2025 SATURN

ALL RIGHTS RESERVED

+ \ No newline at end of file