Skip to content

Commit a76cbae

Browse files
committed
Enhance navigation styling with improved hover effects and active link indicators
1 parent b0e50c5 commit a76cbae

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/static/css/main.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,46 @@ debug, info, success, warning, error */
8989
}
9090

9191
.nav-pills {
92+
.nav-link {
93+
border-radius: 0;
94+
position: relative;
95+
transition: background-color 0.2s ease;
96+
}
97+
9298
.nav-link.active {
9399
background-color: transparent;
100+
101+
&::before {
102+
content: "";
103+
position: absolute;
104+
left: 0.25rem;
105+
top: 25%;
106+
height: 50%;
107+
width: 2px;
108+
background-color: white;
109+
}
110+
111+
&:hover {
112+
background-color: #2c3034;
113+
}
94114
}
95115

96116
.nav-link:not(.active) {
97117
color: hsl(0, 0%, 75%);
98118

119+
&::before {
120+
content: "";
121+
position: absolute;
122+
left: 0.25rem;
123+
top: 25%;
124+
height: 50%;
125+
width: 2px;
126+
background-color: transparent;
127+
}
128+
99129
&:hover {
100130
color: white;
131+
background-color: #2c3034; /* Slightly lighter than #212529 */
101132
}
102133
}
103134
}

src/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</a>
6262
<hr>
6363
<ul class="nav nav-pills flex-column mb-auto">
64-
<li class="nav-item">
64+
<li>
6565
<a href="{% url 'home' %}"
6666
class="nav-link {% if request.path == "/" %}active{% endif %}">
6767
<i class="bi bi-house-door me-2 align-middle"></i>

0 commit comments

Comments
 (0)