Skip to content

Commit

Permalink
Merge pull request #7 from shaikshahid98/main
Browse files Browse the repository at this point in the history
Banner appearing in both Light and Dark Mode.
  • Loading branch information
LakinduK authored Oct 19, 2022
2 parents 4a1b2cd + eb57f13 commit f1a7b05
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contributors/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body {
padding-bottom: 10vh;

}
.bg-img {
.bg-img,#bg-img {
/* The image used */
background-image: url("src/H22/H22-Banners-Dark.png");

Expand Down
2 changes: 1 addition & 1 deletion contributors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<img src = "src/flower-frame.svg" alt="Right Flower" style="float:right"/>
</div> -->

<section class="bg-dark text-light p-5 text-center bg-img">
<section class="bg-dark text-light p-5 text-center bg-img" id="bg-img">
<div class="container text-light p-3">
<h1 style="font-family: 'Poppins', sans-serif">
Open-Source <span class="text-warning">Contributors 👨‍💻</span>
Expand Down
Binary file added contributors/src/banner-blank-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion contributors/src/dark-mode-switch.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function initTheme() {
else {
document.body.removeAttribute("data-theme");
document.getElementById("H22-image").src = "src/H22/H22-logo-light.png";

}
}

Expand All @@ -24,12 +23,15 @@ function resetTheme() {
localStorage.setItem("darkSwitch", "dark"))
text.innerHTML = "Light Theme 🌤️";
document.getElementById("H22-image").src = "src/H22/H22-logo-dark.png";
document.getElementById("bg-img").style.backgroundImage = "url('src/H22/H22-Banners-Dark.png')";
}
else {
(document.body.removeAttribute("data-theme"),
localStorage.removeItem("darkSwitch"));
text.innerHTML = 'Dark Theme 🌚';
document.getElementById("H22-image").src = "src/H22/H22-logo-light.png";
document.getElementById("bg-img").style.backgroundImage = "url('src/H22/H22-Banners-Light.png')";

}

}
Expand Down

0 comments on commit f1a7b05

Please sign in to comment.