-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
173 lines (159 loc) · 5.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdn.tailwindcss.com"></script>
<title>Library Hub</title>
<style>
#results {
margin-top: 20px;
display: grid;
grid-template-columns: repeat(auto-fit,
minmax(250px, 1fr));
grid-gap: 20px;
}
.book-container {
border: 1px solid #ccc;
padding: 10px;
border-radius: 8px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
background-color: white;
overflow: hidden;
}
.book-image {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
.book-info {
margin-top: 10px;
}
.mobile-menu {
transform: translateX(-100%);
transition: transform 0.3s ease-in-out;
}
.mobile-menu.active {
transform: translateX(0);
}
</style>
</head>
<body class="m-0 p-0 bg-gradient-to-r from-purple-500 to-pink-500 min-h-screen flex flex-col">
<nav class="bg-gray-800 text-white relative">
<div class="container mx-auto flex items-center justify-between py-4">
<div class="flex items-center">
<span class="text-xl font-bold text-yellow-300"><a href="index.html">LibraryHub</a></span>
</div>
<div class="flex space-x-6">
<a href="index.html" class="hover:text-yellow-300">Home</a>
<a href="category.html" class="hover:text-yellow-300">Category</a>
<a href="about.html" class="hover:text-yellow-300">About</a>
<a href="contact.html" class="hover:text-yellow-300">Contact</a>
<a href="faq.html" class="hover:text-yellow-300">FAQ</a>
</div>
</div>
</nav>
<main class="flex-grow">
<section class="text-white text-center py-16 w-full">
<div class="container mx-auto">
<h1 class="text-3xl md:text-5xl font-bold mb-4">
Welcome to Library Hub
</h1>
<p class="text-lg md:text-xl mb-8">
Discover thousands of books at your fingertips
</p>
<a href="category.html"
class="bg-white text-blue-600 px-6 py-3 rounded-full font-semibold shadow-lg hover:bg-gray-200 transition">Browse
Books</a>
</div>
</section>
<div class="flex flex-col sm:flex-row items-center justify-center py-10 px-4 bg-gray-100">
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
<input type="text" id="searchInput" placeholder="Search"
class="w-full sm:w-96 px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-400" />
<button onclick="searchBooks()"
class="w-full sm:w-auto bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600 focus:ring-2 focus:ring-blue-400">
Search
</button>
</div>
</div>
<div id="results" class="container mx-auto px-4 mb-8 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6"></div>
</main>
<footer class="bg-gray-900 text-gray-400 py-8 mt-auto">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between">
<div class="mb-8 md:mb-0">
<h2 class="text-white font-bold mb-4 text-purple-500">About Us</h2>
<p>
Discover our world of broadcasting and entertainment through books
</p>
</div>
<div class="mb-8 md:mb-0">
<h2 class="text-white font-bold mb-4 text-orange-500">
Quick Links
</h2>
<ul>
<li>
<a href="index.html" class="text-gray-400 hover:text-gray-200">Home</a>
</li>
<li>
<a href="category.html" class="text-gray-400 hover:text-gray-200">Explore</a>
</li>
<li>
<a href="about.html" class="text-gray-400 hover:text-gray-200">About</a>
</li>
<li>
<a href="contact.html" class="text-gray-400 hover:text-gray-200">Contact</a>
</li>
</ul>
</div>
<div class="mb-8 md:mb-0">
<h2 class="text-white font-bold mb-4 text-green-500">
Contact Info
</h2>
<p>
<span class="text-gray-400">Address:</span><br />123 Main Street,
Anytown, CA 12345
</p>
<p><span class="text-gray-400">Phone:</span><br />(123) 456-7890</p>
</div>
<div>
<h2 class="text-white font-bold mb-4 text-red-500">Newsletter</h2>
<form>
<input type="email" placeholder="Enter your email" class="border border-gray-500 rounded-md p-2 mb-4" />
<button type="submit" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
Subscribe
</button>
</form>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-4">
<p class="text-center text-gray-500">
2024 Library Hub. All rights reserved.
</p>
</div>
</div>
</footer>
<script src="index.js"></script>
<script>
// Mobile menu functionality
const mobileMenuButton = document.getElementById('mobile-menu-button');
const closeMenuButton = document.getElementById('close-menu');
const mobileMenu = document.getElementById('mobile-menu');
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.add('active');
});
closeMenuButton.addEventListener('click', () => {
mobileMenu.classList.remove('active');
});
document.addEventListener('click', (e) => {
if (mobileMenu.classList.contains('active') &&
!mobileMenu.contains(e.target) &&
!mobileMenuButton.contains(e.target)) {
mobileMenu.classList.remove('active');
}
});
</script>
</body>
</html>