-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12c4f96
commit a39bdb8
Showing
4 changed files
with
293 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const tutorialButton = document.getElementById("tutorial-button"); | ||
const videoOverlay = document.getElementById("video-overlay"); | ||
|
||
|
||
// Function to show video overlay | ||
function showVideo() { | ||
tutorialButton.style.display = "none"; | ||
videoOverlay.style.display = "flex"; | ||
} | ||
|
||
// Function to close video overlay | ||
function closeVideo() { | ||
tutorialButton.style.display = "block"; | ||
videoOverlay.style.display = "none"; | ||
} | ||
|
||
// Show the video overlay on the first visit | ||
document.addEventListener("DOMContentLoaded", function() { | ||
const alreadyVisited = localStorage.getItem("visited"); | ||
if (!alreadyVisited) { | ||
showVideo(); | ||
localStorage.setItem("visited", true); | ||
} | ||
}); | ||
|
||
// Get input fields and the "Add Link" button | ||
const newLinkInput = document.getElementById("new-link"); | ||
const newNameInput = document.getElementById("new-name"); | ||
const newCategoryInput = document.getElementById("new-category"); | ||
const addButton = document.getElementById("add-button"); | ||
|
||
// Add input event listeners to check when all fields are filled | ||
newLinkInput.addEventListener("input", checkFields); | ||
newNameInput.addEventListener("input", checkFields); | ||
newCategoryInput.addEventListener("input", checkFields); | ||
|
||
// Function to check if all fields are filled and apply glow effect to the "Add Link" button | ||
function checkFields() { | ||
if (newLinkInput.value.trim() !== "" && newNameInput.value.trim() !== "" && newCategoryInput.value.trim() !== "") { | ||
addButton.classList.add("glow"); | ||
} else { | ||
addButton.classList.remove("glow"); | ||
} | ||
} | ||
|
||
addButton.addEventListener("click", function() { | ||
addButton.classList.remove("glow"); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.