Skip to content

Commit 6095658

Browse files
committed
Navbar bugs
1 parent 99f8cce commit 6095658

13 files changed

+208
-343
lines changed

about.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ line-height: 1.6;
4747
background: #8B0000;
4848
}
4949

50-
.header{
50+
.header2{
5151
background-color: #fde74c40;
5252
}
5353
.header1 {

about.html

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<meta property="twitter:title" content="About The Cawnpore Magazine - Our Mission and Vision">
2020
<meta property="twitter:description" content="Learn about our mission to document and preserve Kanpur's historical narratives and cultural heritage.">
2121
<meta property="twitter:image" content="https://thecawnporemag.github.io/assets/images/about-og-image.jpg">
22+
<link rel="stylesheet" href="style.css">
2223
<link rel = "stylesheet" href="about.css">
2324
<link rel="icon" href="assets/favicon.ico" type="image/x-icon">
2425
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -151,15 +152,15 @@
151152
<div class="progress-container">
152153
<div class="progress-bar" id="progressBar"></div>
153154
</div>
154-
<section class="header">
155+
<section class="header2">
155156
<nav role="navigation" aria-label="Main Menu">
156157
<!-- Logo on the left -->
157-
<a href="index.html">
158-
<img src="assets/favicon.ico" alt="Logo" class="navbar-logo" />
159-
</a>
160-
161-
<div class = "nav-links" id="navLinks">
162-
<i class="fa fa-times" onclick="hideMenu()"></i>
158+
<a href="index.html">
159+
<img src="assets/favicon.ico" alt="Logo" class="navbar-logo" />
160+
</a>
161+
162+
<div class="nav-links" id="navLinks">
163+
<i class="fa fa-times" onclick="hideMenu()"></i>
163164
<ul>
164165

165166
<li><a href="index.html">HOME</a></li>
@@ -176,9 +177,11 @@
176177
<li><a href="login.html" class="btn">LOGIN</a></li>
177178
<li><a href="signup.html" class="btn">REGISTER</a></li>
178179
</ul>
179-
</div>
180-
<i class="fa fa-bars" onclick="showMenu()"></i>
181-
</nav>
180+
</div>
181+
182+
<i class="fa fa-bars" id="menuIcon" onclick="showMenu()"></i>
183+
184+
</nav>
182185

183186
</section>
184187
<section class="header1">
@@ -334,6 +337,15 @@ <h2>Kanpur Zoological Park</h2>
334337
</div>
335338
<script>
336339
// template gallery slider
340+
function showMenu() {
341+
document.getElementById("navLinks").style.right = "0";
342+
document.body.style.overflow = "hidden";
343+
}
344+
345+
function hideMenu() {
346+
document.getElementById("navLinks").style.right = "-200px";
347+
document.body.style.overflow = "auto";
348+
}
337349
const template_slider = document.querySelector(".template-slider");
338350
const template_slides = template_slider.querySelectorAll("li");
339351
const slideCount = template_slides.length;

gallery.css

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,31 @@ h1::after {
3838

3939
/* Navbar Styles */
4040
nav {
41-
display: flex;
42-
justify-content: space-between;
43-
align-items: center;
44-
padding: 0.75rem 5%;
45-
margin-right: 6px;
46-
background: linear-gradient(135deg,
47-
rgb(99, 0, 0),
48-
rgba(218, 67, 67, 0.665),
49-
rgb(71, 22, 22),
50-
rgba(17, 16, 16, 0.3)
51-
52-
);
53-
background-size: 400% 400%; /* make the gradient larger to animate */
54-
animation: gradientMove 5s linear infinite;
55-
56-
backdrop-filter: blur(8px);
57-
border: 1px solid rgba(255, 255, 255, 0.3);
58-
border-bottom: 1px solid rgba(179, 177, 177, 0.2);
59-
position: fixed;
60-
top: 0;
61-
height: 70px;
62-
width: 100%;
63-
z-index: 999;
41+
display: flex;
42+
justify-content: space-between;
43+
align-items: center;
44+
padding: 0.75rem 5%;
45+
margin-right: 6px;
46+
background: linear-gradient(
47+
135deg,
48+
rgb(99, 0, 0),
49+
rgba(218, 67, 67, 0.665),
50+
rgb(71, 22, 22),
51+
rgba(17, 16, 16, 0.3)
52+
);
53+
background-size: 400% 400%;
54+
animation: gradientMove 5s linear infinite;
55+
backdrop-filter: blur(8px);
56+
border: 1px solid rgba(255, 255, 255, 0.3);
57+
border-bottom: 1px solid rgba(179, 177, 177, 0.2);
58+
position: fixed;
59+
top: 0;
60+
height: 70px;
61+
width: 100%;
62+
z-index: 999;
6463
}
6564

65+
6666
/* Animation Keyframes */
6767
@keyframes gradientMove {
6868
0% {
@@ -389,4 +389,4 @@ button:hover {
389389
.circle {
390390
display: none !important;
391391
}
392-
}
392+
}

gallery.html

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@
1818
<meta property="twitter:url" content="https://thecawnporemag.github.io/gallery.html">
1919
<meta property="twitter:title" content="Historical Gallery - The Cawnpore Magazine | Visual Archive of Kanpur">
2020
<meta property="twitter:description" content="Explore our visual archive of historical photographs, maps, and documents related to Kanpur's rich heritage.">
21-
<meta property="twitter:image" content="https://thecawnporemag.github.io/assets/images/gallery-og.jpg">
21+
<link rel="stylesheet" href="style.css">
2222
<link rel="stylesheet" href="gallery.css" />
23-
<link rel="stylesheet" href="style.css" />
23+
<meta property="twitter:image" content="https://thecawnporemag.github.io/assets/images/gallery-og.jpg">
2424
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
2525
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
2626
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
2727
/>
2828
<link rel="icon" href="assets/favicon.ico" type="image/x-icon" />
2929
</head>
3030
<body>
31-
<nav role="navigation" aria-label="Main Menu">
32-
<!-- Logo on the left -->
33-
<a href="index.html">
34-
<img src="assets/favicon.ico" alt="Logo" class="navbar-logo" />
35-
</a>
36-
37-
<div class="nav-links" id="navLinks">
38-
<i class="fa fa-times" onclick="hideMenu()"></i>
31+
<nav role="navigation" aria-label="Main Menu">
32+
<!-- Logo on the left -->
33+
<a href="index.html">
34+
<img src="assets/favicon.ico" alt="Logo" class="navbar-logo" />
35+
</a>
36+
37+
<div class="nav-links" id="navLinks">
38+
<i class="fa fa-times" onclick="hideMenu()"></i>
3939
<ul>
4040

4141
<li><a href="index.html">HOME</a></li>
@@ -52,11 +52,11 @@
5252
<li><a href="login.html" class="btn">LOGIN</a></li>
5353
<li><a href="signup.html" class="btn">REGISTER</a></li>
5454
</ul>
55-
</div>
55+
</div>
5656

57-
<i class="fa fa-bars" onclick="showMenu()"></i>
58-
</nav>
57+
<i class="fa fa-bars" onclick="showMenu()"></i>
5958

59+
</nav>
6060
<button
6161
onclick="history.back()"
6262
style="
@@ -351,6 +351,15 @@ <h3>Subscribe to our Newsletter</h3>
351351
}
352352

353353
animateCircles();
354+
function showMenu() {
355+
document.getElementById("navLinks").style.right = "0";
356+
document.body.style.overflow = "hidden";
357+
}
358+
359+
function hideMenu() {
360+
document.getElementById("navLinks").style.right = "-200px";
361+
document.body.style.overflow = "auto";
362+
}
354363
</script>
355364
</body>
356365
</html>

issue.css

Lines changed: 3 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ nav {
117117
border-bottom: 1px solid rgba(179, 177, 177, 0.2);
118118
position: fixed;
119119
top: 0;
120-
height: 45px;
120+
height: 10vh;
121121
width: 100%;
122122
z-index: 999;
123123
}
@@ -135,11 +135,6 @@ nav {
135135
}
136136
}
137137

138-
.navbar-logo {
139-
height: 40px;
140-
margin-right: 16px;
141-
vertical-align: middle;
142-
}
143138

144139
.header1 {
145140
background-color: #780000;
@@ -174,46 +169,16 @@ nav {
174169
font-size: 20px;
175170
}
176171

177-
.nav-links {
172+
.-links {
178173
flex: 1;
179174
text-align: center;
180175
position: relative;
181176
z-index: 10;
182177
align-items: center;
183178
}
184179

185-
.nav-links ul li {
186-
list-style: none;
187-
display: inline-block;
188-
position: relative;
189-
}
190180

191-
.nav-links ul li a {
192-
color: #fdf0d5;
193-
text-decoration: none;
194-
font-family: serif;
195-
font-size: 13px;
196-
padding: 12px 16px;
197-
display: block;
198-
border-radius: 6px;
199-
}
200-
.nav-links ul li a:hover {
201-
text-decoration: none; /* REMOVE underline */
202-
}
203181

204-
.nav-links ul li::after {
205-
content: "";
206-
width: 0%;
207-
height: 2px;
208-
background: #fdf0d5;
209-
display: block;
210-
margin: auto;
211-
transition: 0.5s;
212-
}
213-
214-
.nav-links ul li:hover::after {
215-
width: 100%;
216-
}
217182
.btn{
218183
background-color: #9e7916;
219184
}
@@ -228,51 +193,15 @@ nav {
228193
box-shadow: 0 0 15px rgba(216, 165, 46, 0.922);
229194
}
230195

231-
nav .fa {
232-
display: none;
233-
}
234196
@media (max-width: 700px) {
235197
.text-box h1 {
236198
margin-top: 15px;
237199
font-weight: 700;
238200
font-style: italic;
239201
font-size: 40px;
240202
}
241-
.nav-links ul li {
242-
display: block;
243-
}
244-
.nav-links {
245-
position: fixed;
246-
background: linear-gradient(135deg, #d24848, #7a0000, #cea8bc);
247-
height: 100vh;
248-
width: 200px;
249-
top: 0;
250-
right: -100%;
251-
text-align: left;
252-
z-index: 2;
253-
box-shadow: -8px 0 20px rgba(0, 0, 0, 0.5);
254-
transition: right 0.4s ease-in-out;
255-
}
256203

257-
nav .fa {
258-
display: block;
259-
color: #663346;
260-
margin: 10px;
261-
font-size: 22px;
262-
cursor: pointer;
263-
z-index: 10;
264-
background: linear-gradient(
265-
135deg,
266-
#fdfbfb,
267-
#ebedee
268-
); /* soft gradient backdrop */
269-
padding: 10px;
270-
border-radius: 12px;
271-
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
272-
}
273-
.nav-links ul {
274-
padding: 30px;
275-
}
204+
276205
.btn{
277206
background: linear-gradient(90deg, #f3b200, #dcceaea1);
278207
font-weight: 600;

issue.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta charset="UTF-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>ISSUES</title>
8+
<link rel="stylesheet" href="style.css">
89
<link rel="stylesheet" href="issue.css" />
910
<link rel="icon" href="assets/favicon.ico" type="image/x-icon" />
1011
<link rel="preconnect" href="https://fonts.googleapis.com" />
@@ -309,6 +310,17 @@ <h3>Subscribe to our Newsletter</h3>
309310
<p>&copy; <span id="year"></span> THE CAWNPORE — ALL RIGHTS RESERVED</p>
310311
</div>
311312
</footer>
313+
<script>
314+
function showMenu() {
315+
document.getElementById("navLinks").style.right = "0";
316+
document.body.style.overflow = "hidden";
317+
}
318+
319+
function hideMenu() {
320+
document.getElementById("navLinks").style.right = "-200px";
321+
document.body.style.overflow = "auto";
322+
}
323+
</script>
312324
<script src="index.js"></script>
313325
</body>
314326
</html>

0 commit comments

Comments
 (0)