Skip to content

Commit 51f2cf1

Browse files
committed
Fix mobile view navbar and add company logo
1 parent d389707 commit 51f2cf1

4 files changed

Lines changed: 90 additions & 12 deletions

File tree

src/assets/postman.svg

Lines changed: 1 addition & 0 deletions
Loading

src/assets/quizizz.png

6.9 KB
Loading

src/layouts/Layout.astro

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,77 @@ import { ClientRouter } from 'astro:transitions';
123123
))}
124124
</div>
125125

126-
<!-- Mobile Simple Menu Button Placeholder -->
127-
<div class="md:hidden">
128-
<button class="p-2 text-text-secondary">
129-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu"><line x1="3" x2="21" y1="12" y2="12"/><line x1="3" x2="21" y1="6" y2="6"/><line x1="3" x2="21" y1="18" y2="18"/></button>
126+
<!-- Mobile Simple Menu Button -->
127+
<div class="md:hidden flex items-center">
128+
<button id="mobile-menu-btn" class="p-2 text-text-secondary hover:text-text-primary transition-colors" aria-label="Toggle menu">
129+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-menu"><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></button>
130130
</button>
131131
</div>
132132
</div>
133+
134+
<!-- Mobile Menu Overlay -->
135+
<div id="mobile-menu" class="hidden absolute top-16 left-0 w-full bg-zinc-900/95 backdrop-blur-xl border-b border-zinc-800/50 p-4 shadow-2xl md:hidden">
136+
<div class="flex flex-col space-y-2">
137+
{navLinks.map(link => (
138+
<a
139+
href={link.href}
140+
class={`px-4 py-3 rounded-lg text-sm font-medium transition-colors ${
141+
currentPath === link.href
142+
? "bg-white/10 text-white"
143+
: "text-text-secondary hover:text-white hover:bg-white/5"
144+
}`}
145+
>
146+
{link.label}
147+
</a>
148+
))}
149+
</div>
150+
</div>
133151
</nav>
134152
</div>
153+
154+
<script>
155+
function setupMobileMenu() {
156+
const btn = document.getElementById('mobile-menu-btn');
157+
const menu = document.getElementById('mobile-menu');
158+
159+
// Remove existing listeners if any (by cloning the node)
160+
// OR simply check if we already attached them.
161+
// Since the element is persisted, the cleanest way is to check a data attribute.
162+
163+
if (btn && menu && !btn.hasAttribute('data-menu-initialized')) {
164+
btn.addEventListener('click', (e) => {
165+
e.stopPropagation();
166+
const isHidden = menu.classList.contains('hidden');
167+
if (isHidden) {
168+
menu.classList.remove('hidden');
169+
} else {
170+
menu.classList.add('hidden');
171+
}
172+
});
173+
174+
// Close menu when clicking outside
175+
document.addEventListener('click', (e) => {
176+
if (!menu.contains(e.target as Node) && !btn.contains(e.target as Node)) {
177+
menu.classList.add('hidden');
178+
}
179+
});
180+
181+
// Close menu when clicking a link
182+
const links = menu.querySelectorAll('a');
183+
links.forEach(link => {
184+
link.addEventListener('click', () => {
185+
menu.classList.add('hidden');
186+
});
187+
});
188+
189+
// Mark as initialized
190+
btn.setAttribute('data-menu-initialized', 'true');
191+
}
192+
}
193+
194+
// Run on view transitions (and initial load)
195+
document.addEventListener('astro:page-load', setupMobileMenu);
196+
</script>
135197

136198
<div class="pt-24"> <!-- Spacer for floating nav -->
137199
<main>

src/pages/experience.astro

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
import Layout from '../layouts/Layout.astro';
3+
import { Image } from 'astro:assets';
4+
import postmanLogo from '../assets/postman.svg';
5+
import quizizzLogo from '../assets/quizizz.png';
36
47
const experiences = [
58
{
@@ -8,6 +11,7 @@ const experiences = [
811
period: 'Nov 2023 - Present',
912
location: 'Bengaluru, India',
1013
description: 'Building scalable EdTech systems serving millions of students and educators worldwide.',
14+
logo: quizizzLogo,
1115
highlights: [
1216
'Developed multiple frontend features using Vue.js, including Corporate AI Studio and Interactive Videos.',
1317
'Transitioned to backend-focused role in Common Assessment, a district-wide high-scale test delivery platform, working in Golang.',
@@ -21,6 +25,7 @@ const experiences = [
2125
period: 'July 2021 - Nov 2023',
2226
location: 'Bengaluru, India',
2327
description: 'Full-stack developer on Public and Private API Networks.',
28+
logo: postmanLogo,
2429
highlights: [
2530
'Built critical features for developer collaboration platform using React, Node.js (Sails JS), and AWS.',
2631
'Improved API discovery and collaboration tools for millions of developers.'
@@ -30,7 +35,8 @@ const experiences = [
3035
company: 'Postman',
3136
role: 'Software Engineer Intern',
3237
period: 'Feb 2021 - June 2021',
33-
description: 'Gained hands-on experience with full-stack development and industry best practices.'
38+
description: 'Gained hands-on experience with full-stack development and industry best practices.',
39+
logo: postmanLogo
3440
}
3541
];
3642
@@ -75,14 +81,23 @@ const education = [
7581
<div class={`absolute -left-[5px] top-3 w-[9px] h-[9px] rounded-full ring-4 ${exp.current ? 'bg-accent ring-accent/20' : 'bg-zinc-700 ring-bg-primary'}`}></div>
7682

7783
<div class="space-y-6">
78-
<div class="space-y-1">
79-
<div class="md:hidden mb-2">
80-
<span class="text-xs font-bold uppercase tracking-widest text-accent">{exp.period}</span>
84+
<div class="flex justify-between items-start gap-4">
85+
<div class="space-y-1 flex-1">
86+
<div class="md:hidden mb-2">
87+
<span class="text-xs font-bold uppercase tracking-widest text-accent">{exp.period}</span>
88+
</div>
89+
<h3 class="text-2xl font-bold text-text-primary tracking-tight group-hover:text-accent transition-colors">
90+
{exp.company}
91+
</h3>
92+
<p class="text-lg font-medium text-text-secondary">{exp.role}</p>
8193
</div>
82-
<h3 class="text-2xl font-bold text-text-primary tracking-tight group-hover:text-accent transition-colors">
83-
{exp.company}
84-
</h3>
85-
<p class="text-lg font-medium text-text-secondary">{exp.role}</p>
94+
{exp.logo && (
95+
<Image
96+
src={exp.logo}
97+
alt={`${exp.company} logo`}
98+
class="w-12 h-12 object-contain rounded-md bg-zinc-800/50 p-2 ring-1 ring-white/10"
99+
/>
100+
)}
86101
</div>
87102

88103
<p class="text-text-tertiary leading-relaxed max-w-2xl">

0 commit comments

Comments
 (0)