Skip to content

Commit 2a4bd3d

Browse files
Merge pull request #133 from prgrms-aibe-devcourse/refactor/#132-header-myMentoring
refactor: header 내 멘토링 nav에도 호버, 액티브 효과
2 parents a9f72b1 + 328b0fb commit 2a4bd3d

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

src/main/resources/templates/fragments/header.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@
2727
border-color: #4b5563;
2828
color: #fff;
2929
}
30-
.link-mentoring {
31-
display: inline-flex;
32-
align-items: center;
33-
gap: 0.4rem;
34-
color: #d1d5db;
35-
text-decoration: none;
36-
font-size: 0.9rem;
37-
font-weight: 500;
38-
transition: color 0.2s ease;
39-
}
40-
.link-mentoring:hover {
41-
color: #fff;
42-
}
4330
.header-divider {
4431
width: 1px;
4532
height: 14px;
@@ -128,7 +115,7 @@
128115
채팅
129116
</a>
130117

131-
<a th:href="@{/my/dashboard}" class="link-mentoring">
118+
<a th:href="@{/my/dashboard}" class="btn-chat-pill" id="nav-mentoring-btn">
132119
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
133120
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
134121
<circle cx="9" cy="7" r="4"></circle>
@@ -164,6 +151,13 @@
164151
chatBtn.classList.add('active');
165152
}
166153
}
154+
155+
if (window.location.pathname.startsWith('/my')) {
156+
const mentoringBtn = document.getElementById('nav-mentoring-btn');
157+
if (mentoringBtn) {
158+
mentoringBtn.classList.add('active');
159+
}
160+
}
167161
});
168162
</script>
169163
</header>

0 commit comments

Comments
 (0)