forked from devops0014/python-code-library-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase.html
More file actions
238 lines (215 loc) · 8.64 KB
/
Copy pathbase.html
File metadata and controls
238 lines (215 loc) · 8.64 KB
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Digital Library{% endblock %}</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet">
<style>
:root {
--primary-color: #4e73df;
--secondary-color: #f8f9fc;
--accent-color: #36b9cc;
--dark-color: #2e4374;
--light-color: #f8f9fc;
}
body {
font-family: 'Open Sans', sans-serif;
background-color: #f8f9fc;
color: #5a5c69;
background-image: url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80');
background-size: cover;
background-attachment: fixed;
background-position: center;
min-height: 100vh;
position: relative;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(248, 249, 252, 0.92);
z-index: -1;
}
.navbar {
background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%) !important;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
font-family: 'Merriweather', serif;
font-weight: 700;
font-size: 1.8rem;
}
.card {
border: none;
border-radius: 10px;
box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
transition: transform 0.3s, box-shadow 0.3s;
overflow: hidden;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}
.btn-primary {
background: linear-gradient(to right, var(--primary-color), var(--accent-color));
border: none;
border-radius: 30px;
padding: 10px 25px;
font-weight: 600;
transition: all 0.3s;
}
.btn-primary:hover {
background: linear-gradient(to right, var(--accent-color), var(--primary-color));
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Merriweather', serif;
color: var(--dark-color);
}
.page-container {
min-height: calc(100vh - 160px);
padding: 20px 0;
}
.footer {
background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
color: white;
padding: 20px 0;
margin-top: 40px;
}
.book-card {
height: 100%;
transition: all 0.3s;
}
.book-card .card-img-top {
height: 200px;
object-fit: cover;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
color: #999;
font-size: 4rem;
}
.form-control {
border-radius: 30px;
padding: 12px 20px;
border: 1px solid #ddd;
}
.form-control:focus {
box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
border-color: var(--primary-color);
}
.alert {
border-radius: 10px;
border: none;
}
.hero-section {
background: url('https://images.unsplash.com/photo-1481627834876-b7833e8f5570?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80') no-repeat center center;
background-size: cover;
padding: 100px 0;
border-radius: 10px;
margin-bottom: 30px;
color: white;
text-shadow: 0 2px 4px rgba(0,0,0,0.5);
position: relative;
}
.hero-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(46, 67, 116, 0.7);
border-radius: 10px;
}
.hero-content {
position: relative;
z-index: 1;
}
</style>
{% block extra_css %}{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark">
<div class="container">
<a class="navbar-brand" href="{{ url_for('books') }}">
<i class="fas fa-book-open me-2"></i>Digital Library
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
{% if session.get('user_id') %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('books') }}"><i class="fas fa-book me-1"></i> Browse Books</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('mybooks') }}"><i class="fas fa-bookmark me-1"></i> My Books</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('logout') }}"><i class="fas fa-sign-out-alt me-1"></i> Logout</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('signin') }}"><i class="fas fa-sign-in-alt me-1"></i> Login</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('signup') }}"><i class="fas fa-user-plus me-1"></i> Sign Up</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
<div class="container page-container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
<i class="fas fa-{% if category == 'success' %}check-circle{% elif category == 'danger' %}exclamation-circle{% elif category == 'warning' %}exclamation-triangle{% else %}info-circle{% endif %} me-2"></i>
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</div>
<footer class="footer text-center">
<div class="container">
<p>© 2023 Digital Library. All rights reserved.</p>
<div class="mt-2">
<a href="#" class="text-white me-3"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-white me-3"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-white"><i class="fab fa-instagram"></i></a>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Simple animation for page elements
document.addEventListener('DOMContentLoaded', function() {
const cards = document.querySelectorAll('.card');
cards.forEach((card, index) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
setTimeout(() => {
card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
card.style.opacity = '1';
card.style.transform = 'translateY(0)';
}, 100 + (index * 100));
});
});
</script>
{% block extra_js %}{% endblock %}
</body>
</html>