Revise website navigation bar to improve user experience and accessibility

Update static/css/styles.css and templates/base.html to refactor the navigation bar structure and styling, changing CSS selectors from 'nav' and 'nav-container' to '.navbar' and '.navbar-inner', and restructuring the HTML in base.html to accommodate the new class names and layout.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 5e584ab0-c340-4432-97ef-1972582b60e9
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 050566e5-f5ef-4500-9a02-b484207b4148
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d0a1d46d-d203-4308-bc6a-312ac7c0243b/5e584ab0-c340-4432-97ef-1972582b60e9/vPN8Klq
This commit is contained in:
abhiramtx
2025-11-08 23:58:57 +00:00
parent 35a2e1ab85
commit 3a472bd46c
3 changed files with 36 additions and 49 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

View File

@@ -52,35 +52,47 @@ body::after {
66% { transform: translate(-2%, 2%) rotate(-1deg); }
}
nav {
.navbar {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 1000;
z-index: 99999;
width: calc(100% - 40px);
max-width: 1200px;
}
.nav-container {
.navbar-inner {
display: flex;
justify-content: space-between;
align-items: center;
list-style: none;
gap: 8px;
padding: 10px 20px;
background: rgba(0, 0, 0, 0.4);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.05);
padding: 12px 24px;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
}
.nav-container li {
list-style: none;
.navbar-logo {
display: flex;
align-items: center;
padding-right: 20px;
border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-container li a {
color: var(--gray-300);
.navbar-logo img {
height: 36px;
display: block;
}
.navbar-links {
display: flex;
gap: 8px;
align-items: center;
}
.navbar-links a {
color: #d1d5db;
text-decoration: none;
font-family: var(--font-body);
font-weight: 500;
@@ -88,25 +100,11 @@ nav {
padding: 8px 16px;
border-radius: 8px;
transition: all 0.2s ease;
display: block;
}
.nav-item-center:hover a,
.nav-item-left:hover a {
color: var(--white);
background: var(--gray-700);
}
.nav-item-center.active a,
.nav-item-left.active a {
color: #3b82f6;
}
#logo {
height: 36px;
padding-right: 16px;
border-right: 1px solid var(--gray-700);
margin-right: 8px;
.navbar-links a:hover {
color: #ffffff;
background: rgba(255, 255, 255, 0.1);
}
.menu-button {

View File

@@ -15,31 +15,20 @@
</head>
<body>
<nav>
<ul class="nav-container">
<li class="nav-item-left">
<a href="/"><img id="logo" src="{{ url_for('static', filename='images/logo2.png') }}"></a>
</li>
<li class="nav-item-center">
<nav class="navbar">
<div class="navbar-inner">
<a href="/" class="navbar-logo">
<img src="{{ url_for('static', filename='images/logo2.png') }}" alt="Logo">
</a>
<div class="navbar-links">
<a href="/">Home</a>
</li>
<li class="nav-item-center">
<a href="/contributors">Contributors</a>
</li>
<li class="nav-item-center">
<a href="/competitions">Competitions</a>
</li>
<li class="nav-item-center">
<a href="/sponsors">Sponsors</a>
</li>
<li class="nav-item-center">
<a href="/contact">Contact</a>
</li>
<li class="nav-item-center">
<a href="https://hcb.hackclub.com/donations/start/technicalturbulence" target="_blank">Donate</a>
</li>
</ul>
</div>
</div>
</nav>
<button class="menu-button"></button>
<div class="nav-side">