Skip to content

Commit

Permalink
fixed-light-mode-text-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PANAKAR committed Oct 7, 2023
1 parent ed81bb1 commit ba8c307
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1 class="col">Dev Profiles</h1>
</div>

<button class="add-col"
onclick='window.open("https://github.com/oyepriyansh/DevProfiles","_blank")'"><span>Add your Profile &nbsp;</span><i class="
onclick='window.open("https://github.com/oyepriyansh/DevProfiles","_blank")'"><span >Add your Profile &nbsp;</span><i class="
fa-sharp fa-solid fa-user-plus"></i> </button>
<div id="no-profile"> No Profile Found </div>

Expand Down
8 changes: 8 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ function filterProfiles() {
const colorSwitch = document.getElementById("input-toggle-button");
colorSwitch.addEventListener("click", checkMode);

const btn = document.querySelector('.add-col');

function checkMode() {
console.log("checking...");
if (colorSwitch.checked) {
console.log("dark on");
darkModeOn();
btn.addEventListener('mouseover', () => {
btn.style.color = "white";
})
btn.addEventListener('mouseout', () => {
btn.style.color = "black";
})
} else {
console.log("dark off");
darkModeOff();
Expand Down

0 comments on commit ba8c307

Please sign in to comment.