Skip to content

Instantly share code, notes, and snippets.

View magbanum's full-sized avatar
:octocat:
Refactoring

Shantanu Nighot magbanum

:octocat:
Refactoring
View GitHub Profile
@magbanum
magbanum / pattern_printing_python.ipynb
Last active April 22, 2021 17:07
pattern_printing_python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@magbanum
magbanum / script.js
Last active April 20, 2021 18:14
Javascript for the dark/light theme switcher
const btn = document.querySelector(".switch__label");
btn.addEventListener("click", function () {
document.body.classList.toggle("dark-theme");
});
@magbanum
magbanum / style.css
Last active April 20, 2021 18:16
Stylesheet for the dark/light theme switcher
.switch {
display: inline-block;
position: relative;
}
.switch__input {
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
@magbanum
magbanum / index.html
Last active April 20, 2021 18:16
HTML code for the dark/light theme switcher
<div class="switch">
<input type="checkbox" class="switch__input" id="Switch">
<label class="switch__label" for="Switch">
<span class="switch__indicator"></span>
<span class="switch__decoration"></span>
</label>
</div>