diff --git a/posts/nyaa_menu/index.html b/posts/nyaa_menu/index.html deleted file mode 100644 index e6edb8f..0000000 --- a/posts/nyaa_menu/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - -
- - - - -
-
-

nyaa_menu

-
-
- #technology - - - #projects - - - #anime - - - #manga - -
-
-
-
- -
nyaa_menu scraping nyaa.si for "Chainsaw Man" english translaged manga from most to least seeded.
-
-
-

I got quite bored a few days ago, and instead of staring at my 24 inch lightbulb I channeled a bit of my creative juices into making something… while staring at my 24 inch lightbulb. So, I enjoy south east asian media from time to time, I also like dmenu, and I don’t like using my browser if I can avoid it; there often is an easier way of doing things if you’re creative enough. Somewhat inspired by Bugswriter’s notflix project, I whipped up a shell script that scrapes anime and manga magnet links from nyaa.si based on user search terms and flags. By default, the magnet link gets copied to your clipboard, or if you have your own transmission server you can also send the magnet link there automatically. If this utility sounds interesting to you go check it out!

- -
- - -
- - - - -
- - - diff --git a/themes/jugo/static/js/themes.js b/themes/jugo/static/js/themes.js deleted file mode 100644 index c9b0ed6..0000000 --- a/themes/jugo/static/js/themes.js +++ /dev/null @@ -1,65 +0,0 @@ -/* - -How to handle dark mode with CSS and JavaScript? (with SVG toggle button) - -Tutorial: https://youtu.be/GUSUA72t7p0 - -Follow me on 𝕏 for more: https://twitter.com/HunorBorbely - -*/ - -const lightIcon = document.getElementById("light-icon"); -const darkIcon = document.getElementById("dark-icon"); - -// Check if dark mode is preferred -const darkModeMediaQuery = window.matchMedia("(prefers-color-scheme: dark)"); - -// Get dark-mode from localStorage or use the value from the media query -let darkMode = localStorage.getItem("dark-mode") ?? darkModeMediaQuery.matches; - -// Set dark-mode class on body if darkMode is true and set icon -if (darkMode) { - document.body.classList.add("dark-mode"); - darkIcon.setAttribute("display", "none"); -} else { - lightIcon.setAttribute("display", "none"); -} - -// Update on OS dark mode change -darkModeMediaQuery.addEventListener("change", (e) => { - if (e.matches) { - darkMode = true; - } else { - darkMode = false; - } - document.body.classList.toggle("dark-mode"); - - if (darkMode) { - lightIcon.setAttribute("display", "block"); - darkIcon.setAttribute("display", "none"); - } else { - lightIcon.setAttribute("display", "none"); - darkIcon.setAttribute("display", "block"); - } -}); - -// Toggle dark mode on button click -function toggleDarkMode() { - // Toggle darkMode variable - darkMode = !darkMode; - - // Store darkMode variable in localStorage - localStorage.setItem("dark-mode", darkMode); - - // Toggle dark-mode class on body - document.body.classList.toggle("dark-mode"); - - // Toggle light and dark icons - if (darkMode) { - lightIcon.setAttribute("display", "block"); - darkIcon.setAttribute("display", "none"); - } else { - lightIcon.setAttribute("display", "none"); - darkIcon.setAttribute("display", "block"); - } -}