forked from SnowScriptWinterOfCode/SociallyGram
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0b76a44
commit c0909d5
Showing
4 changed files
with
62 additions
and
0 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,3 @@ | ||
{ | ||
"liveServer.settings.port": 5501 | ||
} |
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,15 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="styles.css"> <!-- Add your styles if necessary --> | ||
<title>Your App</title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<button id="storyButton" class="story-button">Add Story</button> | ||
</div> | ||
<script src="script.js"></script> <!-- Add your JavaScript file --> | ||
</body> | ||
</html> |
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,27 @@ | ||
document.addEventListener('DOMContentLoaded', function () { | ||
const storyButton = document.getElementById('storyButton'); | ||
|
||
storyButton.addEventListener('click', function () { | ||
// Toggle the 'active' class to change the button appearance | ||
storyButton.classList.toggle('active'); | ||
|
||
// Add your logic to handle the story creation or navigation | ||
if (storyButton.classList.contains('active')) { | ||
// The button is active, handle story creation or navigation | ||
handleStoryClick(); | ||
} else { | ||
// The button is not active, handle closing the story or other actions | ||
handleStoryClose(); | ||
} | ||
}); | ||
}); | ||
|
||
function handleStoryClick() { | ||
// Add your logic for story creation or navigation when the button is clicked | ||
console.log('Story button clicked - handle story creation or navigation.'); | ||
} | ||
|
||
function handleStoryClose() { | ||
// Add your logic for closing the story or other actions when the button is not active | ||
console.log('Story button closed - handle closing the story or other actions.'); | ||
} |
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,17 @@ | ||
/* Add your styles here */ | ||
.container { | ||
padding: 20px; | ||
} | ||
|
||
.story-button { | ||
padding: 10px 20px; | ||
background-color: #3498db; | ||
color: #fff; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
.story-button.active { | ||
background-color: #e74c3c; /* Change the color when active */ | ||
} |
c0909d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADDED A STORY BUTTON TO AD A STORY
SnowScriptWinterOfCode#8