Skip to content

Commit 092fbca

Browse files
authored
Merge pull request #179 from My-Mation/landing-page-hero
Add hero section to landing page for better user engagement
2 parents e641240 + 1466ff9 commit 092fbca

2 files changed

Lines changed: 154 additions & 0 deletions

File tree

index.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,45 @@ <h1 class="modal-title fs-5" id="exampleModalToggleLabel">
209209
</div>
210210
<!-- Social Share Modal end -->
211211

212+
<!-- Hero Section -->
213+
<section class="hero-section bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900 text-center py-20 px-4 relative overflow-hidden">
214+
<!-- Animated Background Elements -->
215+
<div class="hero-bg-element hero-book-icon absolute top-10 left-10 opacity-20 animate-float">
216+
📚
217+
</div>
218+
<div class="hero-bg-element hero-headphone-icon absolute top-20 right-20 opacity-20 animate-float-delayed">
219+
🎧
220+
</div>
221+
<div class="hero-bg-element hero-star-icon absolute bottom-20 left-20 opacity-20 animate-float">
222+
223+
</div>
224+
<div class="hero-bg-element hero-music-icon absolute bottom-10 right-10 opacity-20 animate-float-delayed">
225+
🎵
226+
</div>
227+
228+
<div class="container mx-auto max-w-4xl relative z-10">
229+
<h1 class="text-5xl md:text-6xl font-bold text-white mb-6 animate-fade-in-up">
230+
Welcome to <span class="text-green-400 animate-pulse">Lisbook</span>
231+
</h1>
232+
<div class="text-xl md:text-2xl text-gray-300 mb-8 max-w-2xl mx-auto animate-fade-in-up-delayed">
233+
<span id="typed-text"></span>
234+
</div>
235+
<div class="animate-fade-in-up-delayed-2">
236+
<a href="./explore-books.html" class="inline-block bg-green-500 hover:bg-green-600 text-white font-semibold py-3 px-8 rounded-full transition duration-300 ease-in-out transform hover:scale-105 hover:shadow-lg focus:outline-none focus:ring-4 focus:ring-green-300 animate-bounce-subtle">
237+
Explore Books
238+
</a>
239+
<p class="text-sm text-gray-400 mt-4 animate-fade-in">Discover amazing stories and knowledge</p>
240+
</div>
241+
</div>
242+
243+
<!-- Scroll Indicator -->
244+
<div class="absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce">
245+
<svg class="w-6 h-6 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
246+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 14l-7 7m0 0l-7-7m7 7V3"></path>
247+
</svg>
248+
</div>
249+
</section>
250+
212251
<main class="container my-5">
213252
<!-- Top audio book -->
214253
<section class="rounded-5 p-5 my-5">
@@ -328,6 +367,27 @@ <h2 class="display-5 page-title fw-semibold mb-6 text-center" id="share">
328367
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
329368
crossorigin="anonymous"></script>
330369

370+
<!-- Hero Section Animations -->
371+
<script>
372+
// Typing effect for hero description
373+
document.addEventListener('DOMContentLoaded', function() {
374+
const typedTextElement = document.getElementById('typed-text');
375+
const text = "Discover and enjoy amazing audio books from around the world. Immerse yourself in captivating stories and knowledge at your fingertips.";
376+
377+
let index = 0;
378+
function typeWriter() {
379+
if (index < text.length) {
380+
typedTextElement.innerHTML += text.charAt(index);
381+
index++;
382+
setTimeout(typeWriter, 50);
383+
}
384+
}
385+
386+
// Start typing after a short delay
387+
setTimeout(typeWriter, 1000);
388+
});
389+
</script>
390+
=======
331391

332392

333393

style.css

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,100 @@ button:hover {
12301230
padding: 5px;
12311231
}
12321232

1233+
/* Hero Section Animations */
1234+
@keyframes float {
1235+
0%, 100% {
1236+
transform: translateY(0px);
1237+
}
1238+
50% {
1239+
transform: translateY(-20px);
1240+
}
1241+
}
1242+
1243+
@keyframes fade-in-up {
1244+
from {
1245+
opacity: 0;
1246+
transform: translateY(30px);
1247+
}
1248+
to {
1249+
opacity: 1;
1250+
transform: translateY(0);
1251+
}
1252+
}
1253+
1254+
@keyframes bounce-subtle {
1255+
0%, 100% {
1256+
transform: translateY(0);
1257+
}
1258+
50% {
1259+
transform: translateY(-5px);
1260+
}
1261+
}
1262+
1263+
.animate-float {
1264+
animation: float 6s ease-in-out infinite;
1265+
}
1266+
1267+
.animate-float-delayed {
1268+
animation: float 6s ease-in-out infinite;
1269+
animation-delay: 2s;
1270+
}
1271+
1272+
.animate-fade-in-up {
1273+
animation: fade-in-up 1s ease-out;
1274+
}
1275+
1276+
.animate-fade-in-up-delayed {
1277+
animation: fade-in-up 1s ease-out;
1278+
animation-delay: 0.5s;
1279+
opacity: 0;
1280+
animation-fill-mode: forwards;
1281+
}
1282+
1283+
.animate-fade-in-up-delayed-2 {
1284+
animation: fade-in-up 1s ease-out;
1285+
animation-delay: 1s;
1286+
opacity: 0;
1287+
animation-fill-mode: forwards;
1288+
}
1289+
1290+
.animate-fade-in {
1291+
animation: fade-in-up 1s ease-out;
1292+
animation-delay: 1.5s;
1293+
opacity: 0;
1294+
animation-fill-mode: forwards;
1295+
}
1296+
1297+
.animate-bounce-subtle {
1298+
animation: bounce-subtle 2s infinite;
1299+
}
1300+
1301+
.hero-bg-element {
1302+
font-size: 3rem;
1303+
user-select: none;
1304+
pointer-events: none;
1305+
}
1306+
1307+
.hero-section {
1308+
position: relative;
1309+
min-height: 80vh;
1310+
display: flex;
1311+
align-items: center;
1312+
justify-content: center;
1313+
}
1314+
1315+
/* Responsive adjustments for hero */
1316+
@media (max-width: 768px) {
1317+
.hero-bg-element {
1318+
font-size: 2rem;
1319+
}
1320+
1321+
.hero-section {
1322+
min-height: 70vh;
1323+
padding: 4rem 1rem;
1324+
}
1325+
}
1326+
=======
12331327

12341328
body {
12351329
margin: 0;

0 commit comments

Comments
 (0)