Skip to content

Commit

Permalink
Merge pull request #82 from YakeDev/main
Browse files Browse the repository at this point in the history
Redesign Footer Section
  • Loading branch information
Ctoic authored Oct 14, 2024
2 parents 2f6d534 + 4fda469 commit 7af11ab
Show file tree
Hide file tree
Showing 11 changed files with 253 additions and 284 deletions.
20 changes: 2 additions & 18 deletions about.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@
/>
Lisbook
</a>
>>>>>>> c3e3653 (Redesign Footer for Enhanced Visual Appeal)

<body class="dark-theme bg-gray-900 text-gray-300">
<!-- Navbar -->
<nav class="sticky top-0 z-20 bg-gray-800 p-4">
<div class="container mx-auto flex justify-between items-center">
<!-- Logo -->
<a class="text-green-500 text-2xl font-bold" href="./index.html"
>Lisbook</a
>

<!-- Menu Links and Theme Toggle -->
<div
Expand Down Expand Up @@ -81,19 +71,13 @@
<a href="./about.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<a href="./contact.html" class="text-gray-300 hover:text-green-500"
>Contact</a
>
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
>About</a
>FAQs</a
>

<!-- <a href="./index.html" class="text-gray-300 hover:text-green-500"
>Previous</a
>
<a href="./pbd.html" class="text-gray-300 hover:text-green-500"
>Next</a
> -->
<button
id="theme-toggle"
class="text-gray-300 hover:text-green-500"
Expand Down
19 changes: 11 additions & 8 deletions adventures.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,13 @@
<a href="./about.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<a href="./contact.html" class="text-gray-300 hover:text-green-500"
>Contact</a
>
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
>About</a
>FAQs</a
>

<!-- <a href="./index.html" class="text-gray-300 hover:text-green-500"
>Previous</a
>
<a href="./pbd.html" class="text-gray-300 hover:text-green-500"
>Next</a
> -->
<button
id="theme-toggle"
class="text-gray-300 hover:text-green-500"
Expand Down Expand Up @@ -185,6 +179,15 @@ <h1 class="modal-title fs-5" id="exampleModalToggleLabel">
</a>
</div>
</div>
<!-- <div class="modal-footer">
<button
class="btn btn-primary"
data-bs-target="#exampleModalToggle2"
data-bs-toggle="modal"
>
Open second modal
</button>
</div> -->
</div>
</div>
</div>
Expand Down
124 changes: 62 additions & 62 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
document.addEventListener("DOMContentLoaded", function () {
const audioPlayer = document.getElementById("audio-player");
const playlistItems = document.querySelectorAll("#playlist li");
const playPauseBtn = document.getElementById('playPauseBtn'); // Play/Pause button
const audioPlayer = document.getElementById("audio-player");
const playlistItems = document.querySelectorAll("#playlist li");
const playPauseBtn = document.getElementById("playPauseBtn"); // Play/Pause button

// Playlist functionality: Play the clicked audio
playlistItems.forEach((item) => {
item.addEventListener("click", function () {
const audioSource = this.getAttribute("data-src");
audioPlayer.src = audioSource;
audioPlayer.play();
playPauseBtn.classList.remove('play'); // Update the button to pause when playing
playPauseBtn.classList.add('pause');
});
// Playlist functionality: Play the clicked audio
playlistItems.forEach((item) => {
item.addEventListener("click", function () {
const audioSource = this.getAttribute("data-src");
audioPlayer.src = audioSource;
audioPlayer.play();
playPauseBtn.classList.remove("play"); // Update the button to pause when playing
playPauseBtn.classList.add("pause");
});
});

// Play/Pause button functionality
playPauseBtn.addEventListener('click', () => {
if (audioPlayer.paused) {
audioPlayer.play();
playPauseBtn.classList.remove('play');
playPauseBtn.classList.add('pause');
} else {
audioPlayer.pause();
playPauseBtn.classList.remove('pause');
playPauseBtn.classList.add('play');
}
});
// Play/Pause button functionality
playPauseBtn.addEventListener("click", () => {
if (audioPlayer.paused) {
audioPlayer.play();
playPauseBtn.classList.remove("play");
playPauseBtn.classList.add("pause");
} else {
audioPlayer.pause();
playPauseBtn.classList.remove("pause");
playPauseBtn.classList.add("play");
}
});

// Comment submission functionality
const commentForm = document.getElementById("comment-form");
const commentsList = document.getElementById("comments-list");
// Comment submission functionality
const commentForm = document.getElementById("comment-form");
const commentsList = document.getElementById("comments-list");

commentForm.addEventListener("submit", function (e) {
e.preventDefault();
commentForm.addEventListener("submit", function (e) {
e.preventDefault();

const username = document.getElementById("username").value;
const commentText = document.getElementById("comment").value;
const username = document.getElementById("username").value;
const commentText = document.getElementById("comment").value;

if (username && commentText) {
const commentElement = document.createElement("div");
commentElement.classList.add("comment");
commentElement.innerHTML = `<strong>${username}:</strong><p>${commentText}</p>`;
commentsList.appendChild(commentElement);
if (username && commentText) {
const commentElement = document.createElement("div");
commentElement.classList.add("comment");
commentElement.innerHTML = `<strong>${username}:</strong><p>${commentText}</p>`;
commentsList.appendChild(commentElement);

// Clear the form
commentForm.reset();
}
});
// Clear the form
commentForm.reset();
}
});

// Page navigation buttons functionality
const prevBtn = document.getElementById("prev-btn");
const nextBtn = document.getElementById("next-btn");
// Page navigation buttons functionality
const prevBtn = document.getElementById("prev-btn");
const nextBtn = document.getElementById("next-btn");

// Define the pages for navigation
const pages = ['index.html', 'genres.html', 'about.html'];
let currentPageIndex = pages.indexOf(window.location.pathname);
// Define the pages for navigation
const pages = ["index.html", "genres.html", "about.html"];
let currentPageIndex = pages.indexOf(window.location.pathname);

// Function to navigate to the next page
function nextPage() {
if (currentPageIndex < pages.length - 1) {
currentPageIndex++;
window.location.href = pages[currentPageIndex];
}
// Function to navigate to the next page
function nextPage() {
if (currentPageIndex < pages.length - 1) {
currentPageIndex++;
window.location.href = pages[currentPageIndex];
}
}

// Function to navigate to the previous page
function prevPage() {
if (currentPageIndex > 0) {
currentPageIndex--;
window.location.href = pages[currentPageIndex];
}
// Function to navigate to the previous page
function prevPage() {
if (currentPageIndex > 0) {
currentPageIndex--;
window.location.href = pages[currentPageIndex];
}
}

// Event listener for "Next" button
if (nextBtn) nextBtn.addEventListener("click", nextPage);
// Event listener for "Next" button
if (nextBtn) nextBtn.addEventListener("click", nextPage);

// Event listener for "Previous" button
if (prevBtn) prevBtn.addEventListener("click", prevPage);
// Event listener for "Previous" button
if (prevBtn) prevBtn.addEventListener("click", prevPage);
});
6 changes: 5 additions & 1 deletion faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@
/>
<title>My Favorite Books Music App</title>
</head>

<body
class="dark-theme bg-gray-900 text-gray-300 d-flex flex-column min-vh-100"
>
<!-- Navbar -->
<div id="header-placeholder" class="sticky top-0 z-20"></div>
<main>

<!-- Main -->
<main class="container my-5">
<h1>FAQs</h1>
</main>
<!-- Footer -->
<div id="footer-placeholder" class="mt-auto"></div>

<!-- JavaScript -->
<script src="./script.js"></script>
<script
Expand Down
10 changes: 2 additions & 8 deletions fs.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,13 @@
<a href="./about.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<a href="./contact.html" class="text-gray-300 hover:text-green-500"
>Contact</a
>
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
>About</a
>FAQs</a
>

<!-- <a href="./index.html" class="text-gray-300 hover:text-green-500"
>Previous</a
>
<a href="./pbd.html" class="text-gray-300 hover:text-green-500"
>Next</a
> -->
<button
id="theme-toggle"
class="text-gray-300 hover:text-green-500"
Expand Down
10 changes: 2 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,13 @@
<a href="./about.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<a href="./contact.html" class="text-gray-300 hover:text-green-500"
>Contact</a
>
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
>About</a
>FAQs</a
>

<!-- <a href="./index.html" class="text-gray-300 hover:text-green-500"
>Previous</a
>
<a href="./pbd.html" class="text-gray-300 hover:text-green-500"
>Next</a
> -->
<button
id="theme-toggle"
class="text-gray-300 hover:text-green-500"
Expand Down
12 changes: 2 additions & 10 deletions pages/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,11 @@
<a href="./about.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<a href="./contact.html" class="text-gray-300 hover:text-green-500"
>Contact</a
>
<a href="./faq.html" class="text-gray-300 hover:text-green-500"
>About</a
>

<!-- <a href="./index.html" class="text-gray-300 hover:text-green-500"
>Previous</a
>
<a href="./pbd.html" class="text-gray-300 hover:text-green-500"
>Next</a
> -->
<a href="./faq.html" class="text-gray-300 hover:text-green-500">FAQs</a>
<button id="theme-toggle" class="text-gray-300 hover:text-green-500">
<svg
xmlns="http://www.w3.org/2000/svg"
Expand Down
Loading

0 comments on commit 7af11ab

Please sign in to comment.