Skip to content

Commit 160160a

Browse files
authored
improved menu and translation alignment
1 parent a0f5128 commit 160160a

File tree

5 files changed

+69
-34
lines changed

5 files changed

+69
-34
lines changed

portfolio/file_converter.lottie

20.7 KB
Binary file not shown.

portfolio/index.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,20 @@
5050

5151
<main id="main-content">
5252

53+
<div id="mobile-menu-overlay" class="mobile-menu-overlay" aria-hidden="true"></div>
54+
5355

5456
<div id="mobile-menu" class="mobile-menu bg-white bg-opacity-70 backdrop-blur-md" role="dialog" aria-modal="true" aria-label="Navigation menu">
5557
<div class="mobile-menu-header">
5658
<h2 class="text-xl font-bold" data-i18n="nav.menu">Menu</h2>
5759
<button id="mobile-menu-close" class="mobile-menu-close" type="button" aria-label="Close menu">&times;</button>
5860
</div>
5961
<div class="mobile-menu-items">
60-
<a href="#home" data-i18n="nav.home">Home</a>
61-
<a href="#about" data-i18n="nav.about">About</a>
62-
<a href="#skills" data-i18n="nav.skills">Skills</a>
63-
<a href="#projects" data-i18n="nav.projects">Projects</a>
64-
<a href="#contact" data-i18n="nav.contact">Contact</a>
62+
<a href="#home"><span class="menu-emoji" aria-hidden="true">🏠</span><span data-i18n="nav.home">Home</span></a>
63+
<a href="#about"><span class="menu-emoji" aria-hidden="true">👤</span><span data-i18n="nav.about">About</span></a>
64+
<a href="#skills"><span class="menu-emoji" aria-hidden="true">🛠️</span><span data-i18n="nav.skills">Skills</span></a>
65+
<a href="#projects"><span class="menu-emoji" aria-hidden="true">🧩</span><span data-i18n="nav.projects">Projects</span></a>
66+
<a href="#contact"><span class="menu-emoji" aria-hidden="true">✉️</span><span data-i18n="nav.contact">Contact</span></a>
6567
</div>
6668
</div>
6769

portfolio/script/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,25 @@ gsap.from("#projects .project-card", {
9292
const mobileMenuToggle = document.getElementById("mobile-menu-toggle");
9393
const mobileMenu = document.getElementById("mobile-menu");
9494
const mobileMenuClose = document.getElementById("mobile-menu-close");
95+
const mobileMenuOverlay = document.getElementById("mobile-menu-overlay");
9596

9697
function openMobileMenu() {
9798
mobileMenu.classList.add("active");
99+
mobileMenuOverlay?.classList.add("active");
98100
document.body.style.overflow = "hidden";
99101
mobileMenuToggle.setAttribute("aria-expanded", "true");
100102
}
101103

102104
function closeMobileMenu() {
103105
mobileMenu.classList.remove("active");
106+
mobileMenuOverlay?.classList.remove("active");
104107
document.body.style.overflow = "";
105108
mobileMenuToggle.setAttribute("aria-expanded", "false");
106109
}
107110

108111
mobileMenuToggle.addEventListener("click", openMobileMenu);
109112
mobileMenuClose.addEventListener("click", closeMobileMenu);
113+
mobileMenuOverlay?.addEventListener("click", closeMobileMenu);
110114

111115
document.querySelectorAll('a[href^="#"]').forEach((anchor) => {
112116
anchor.addEventListener("click", function (e) {

portfolio/style/style.css

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -226,64 +226,77 @@ h3 {
226226
.mobile-menu {
227227
position: fixed;
228228
top: 0;
229-
left: -100%;
229+
left: 0;
230230
width: 100%;
231231
height: 100%;
232-
background-color: rgba(0, 0, 0, 0.9);
232+
padding: 2.75rem 1.75rem 2.25rem;
233+
background: linear-gradient(145deg, rgba(239, 224, 197, 0.98), rgba(241, 236, 226, 0.96));
234+
backdrop-filter: blur(14px);
233235
z-index: 999;
234-
transition: left 0.3s ease;
235236
display: flex;
236237
flex-direction: column;
237238
align-items: center;
238-
justify-content: center;
239+
justify-content: flex-start;
240+
gap: 2rem;
241+
transform: translateY(-6%);
242+
opacity: 0;
243+
visibility: hidden;
244+
transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
239245
}
240246

241247
.mobile-menu.active {
242-
left: 0;
248+
transform: translateY(0);
249+
opacity: 1;
250+
visibility: visible;
243251
}
244252

245253
.mobile-menu-header {
246-
position: absolute;
247-
top: 1rem;
248-
right: 1rem;
254+
width: 100%;
255+
display: flex;
256+
align-items: center;
257+
justify-content: space-between;
249258
}
250259

251260
.mobile-menu-close {
252-
font-size: 2.5rem;
253-
color: white;
261+
font-size: 2.2rem;
262+
color: var(--primary-color);
254263
cursor: pointer;
255264
}
256265

257266
.mobile-menu-items {
267+
width: min(440px, 100%);
258268
display: flex;
259269
flex-direction: column;
260-
align-items: center;
261-
justify-content: center;
270+
gap: 1rem;
262271
}
263272

264273
.mobile-menu-items a {
265-
font-size: 2rem;
266-
color: white;
267-
margin: 1.5rem 0;
274+
display: flex;
275+
align-items: center;
276+
gap: 0.65rem;
277+
width: 100%;
268278
text-decoration: none;
269-
transition: color 0.3s ease;
270-
position: relative;
279+
background: rgba(9, 167, 224, 0.12);
280+
color: var(--primary-color);
281+
font-size: 1.35rem;
282+
font-weight: 700;
283+
padding: 0.95rem 1.1rem;
284+
border-radius: 16px;
285+
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
286+
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
271287
}
272288

273-
.mobile-menu-items a:after {
274-
content: '';
275-
position: absolute;
276-
width: 0;
277-
height: 2px;
278-
bottom: -5px;
279-
left: 50%;
280-
transform: translateX(-50%);
281-
background-color: white;
282-
transition: width 0.3s ease;
289+
.mobile-menu-items .menu-emoji {
290+
font-size: 1.25rem;
291+
display: inline-block;
292+
width: 1.4rem;
293+
text-align: center;
283294
}
284295

285-
.mobile-menu-items a:hover:after {
286-
width: 100%;
296+
.mobile-menu-items a:hover {
297+
transform: translateY(-2px);
298+
box-shadow: 0 16px 28px rgba(0, 0, 0, 0.12);
299+
background: rgba(9, 167, 224, 0.18);
287300
}
288301

289302
.bento-grid {

style.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,22 @@ body {
125125
z-index: 20;
126126
}
127127

128+
@media (max-width: 480px) {
129+
.language-switch {
130+
top: 10px;
131+
right: 10px;
132+
}
133+
134+
.language-switch button {
135+
padding: 6px 11px;
136+
font-size: 0.9rem;
137+
}
138+
139+
body {
140+
padding-top: 18px;
141+
}
142+
}
143+
128144
.language-switch button {
129145
background: linear-gradient(135deg, var(--button-bg), var(--accent-color));
130146
color: white;

0 commit comments

Comments
 (0)