Skip to content

Commit

Permalink
Redesign Footer Section
Browse files Browse the repository at this point in the history
- Added social media icons with hover effects.
- Made the footer sticky at the bottom of the page.
- Improved typography and layout for better readability.
  • Loading branch information
YakeDev committed Oct 14, 2024
1 parent d00ab29 commit 107bb4f
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 215 deletions.
16 changes: 0 additions & 16 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,12 +71,6 @@
<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
Expand Down
15 changes: 9 additions & 6 deletions adventures.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@
<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
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);
});
38 changes: 0 additions & 38 deletions faq.html
Original file line number Diff line number Diff line change
@@ -1,38 +0,0 @@
<!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="style.css" />
<script src="https://cdn.tailwindcss.com"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"
/>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH"
crossorigin="anonymous"
/>
<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>
<h1>FAQs</h1>
</main>
<!-- Footer -->
<div id="footer-placeholder" class="mt-auto"></div>
<!-- JavaScript -->
<script src="./script.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"
></script>
</body>
</html>
6 changes: 0 additions & 6 deletions fs.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@
<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
Expand Down
6 changes: 0 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@
<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
Expand Down
16 changes: 5 additions & 11 deletions pages/header.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<header class="sticky top-0 z-20 bg-gray-800 p-4 shadow-sm">
<nav class="">
<header>
<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="logo-text h3 font-bold d-inline-flex"
class="text-green-500 h3 font-bold d-flex"
href="./index.html"
class="navbar-brand"
>
<img
src="./Images/lisbook-logo-1.png"
src="./Images/lisbook-logo.png"
alt="Logo"
width="40"
width="35"
height="auto"
class="align-text-center me-2"
/>
Expand Down Expand Up @@ -47,12 +47,6 @@
<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
Expand Down
Loading

0 comments on commit 107bb4f

Please sign in to comment.