Skip to content

Commit bb75e2b

Browse files
aymuos15claude
andcommitted
feat: mobile dropdown nav, fixed footer, social links in header
- Add hamburger menu dropdown for nav on mobile - Fix footer to bottom of viewport so it's always visible - Move social icons from footer to header - Footer simplified to centered text line Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cbdca59 commit bb75e2b

4 files changed

Lines changed: 105 additions & 52 deletions

File tree

index.html

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@
1919
<path d="M12 3a9 9 0 109 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 01-4.4 2.26 5.403 5.403 0 01-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"/>
2020
</svg>
2121
</button>
22+
<div class="social-links">
23+
<a href="https://github.com/aymuos15" target="_blank" aria-label="GitHub">
24+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
25+
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
26+
</svg>
27+
</a>
28+
<a href="https://scholar.google.com/citations?user=WmHtKBYAAAAJ&hl=en" target="_blank" aria-label="Google Scholar">
29+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
30+
<path d="M5.242 13.769L0 9.5 12 0l12 9.5-5.242 4.269C17.548 11.249 14.978 9.5 12 9.5c-2.977 0-5.548 1.748-6.758 4.269zM12 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14z"/>
31+
</svg>
32+
</a>
33+
<a href="https://www.linkedin.com/in/soumyaskundu/" target="_blank" aria-label="LinkedIn">
34+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
35+
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
36+
</svg>
37+
</a>
38+
<a href="https://discuss.pytorch.org/u/soumya_kundu/summary" target="_blank" aria-label="PyTorch Forum">
39+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
40+
<path d="M12.005 0L4.952 7.053a9.865 9.865 0 000 14.022 9.866 9.866 0 0014.022 0c3.984-3.9 3.986-10.205.085-14.023l-1.744 1.743c2.904 2.905 2.904 7.634 0 10.538s-7.634 2.904-10.538 0-2.904-7.634 0-10.538l4.647-4.646.582-.665zm3.568 4.142a1.467 1.467 0 10-.001 2.935 1.467 1.467 0 00.001-2.935z"/>
41+
</svg>
42+
</a>
43+
</div>
44+
<button class="nav-toggle" aria-label="Menu">
45+
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
46+
<path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/>
47+
</svg>
48+
</button>
2249
<div class="nav-links">
2350
<a href="#home" class="active">Home</a>
2451
<a href="#about">About</a>
@@ -77,31 +104,7 @@ <h1 class="name-link">Soumya Snigdha Kundu</h1>
77104
</main>
78105

79106
<footer class="footer">
80-
<div class="footer-row">
81-
<div class="social-links">
82-
<a href="https://github.com/aymuos15" target="_blank" aria-label="GitHub">
83-
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
84-
<path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/>
85-
</svg>
86-
</a>
87-
<a href="https://scholar.google.com/citations?user=WmHtKBYAAAAJ&hl=en" target="_blank" aria-label="Google Scholar">
88-
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
89-
<path d="M5.242 13.769L0 9.5 12 0l12 9.5-5.242 4.269C17.548 11.249 14.978 9.5 12 9.5c-2.977 0-5.548 1.748-6.758 4.269zM12 10a7 7 0 1 0 0 14 7 7 0 0 0 0-14z"/>
90-
</svg>
91-
</a>
92-
<a href="https://www.linkedin.com/in/soumyaskundu/" target="_blank" aria-label="LinkedIn">
93-
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
94-
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
95-
</svg>
96-
</a>
97-
<a href="https://discuss.pytorch.org/u/soumya_kundu/summary" target="_blank" aria-label="PyTorch Forum">
98-
<svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
99-
<path d="M12.005 0L4.952 7.053a9.865 9.865 0 000 14.022 9.866 9.866 0 0014.022 0c3.984-3.9 3.986-10.205.085-14.023l-1.744 1.743c2.904 2.905 2.904 7.634 0 10.538s-7.634 2.904-10.538 0-2.904-7.634 0-10.538l4.647-4.646.582-.665zm3.568 4.142a1.467 1.467 0 10-.001 2.935 1.467 1.467 0 00.001-2.935z"/>
100-
</svg>
101-
</a>
102-
</div>
103-
<span class="footer-info">namma Chennai | London | soumya_snigdha.kundu-at-kcl.ac.uk</span>
104-
</div>
107+
<span class="footer-info">namma Chennai | London | soumya_snigdha.kundu-at-kcl.ac.uk</span>
105108
</footer>
106109

107110
<script src="script.js"></script>

script.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,23 @@ document.addEventListener('DOMContentLoaded', () => {
1616
});
1717

1818
// Cached DOM references
19+
const navLinksContainer = document.querySelector('.nav-links');
1920
const navLinks = document.querySelectorAll('.nav-links a');
21+
const navToggle = document.querySelector('.nav-toggle');
2022
const updatesList = document.getElementById('updates-list');
2123
const tabs = document.querySelectorAll('.tab');
2224

25+
// Mobile nav dropdown
26+
navToggle.addEventListener('click', () => {
27+
navLinksContainer.classList.toggle('open');
28+
});
29+
30+
document.addEventListener('click', (e) => {
31+
if (!navLinksContainer.contains(e.target) && !navToggle.contains(e.target)) {
32+
navLinksContainer.classList.remove('open');
33+
}
34+
});
35+
2336
// Pastel rainbow link colors
2437
const pastelColors = [
2538
'#e8a0bf', '#f0b8a8', '#f2cc8f', '#b5d99c',
@@ -69,6 +82,7 @@ function switchSection(targetId) {
6982
navLinks.forEach(link => {
7083
link.addEventListener('click', (e) => {
7184
e.preventDefault();
85+
navLinksContainer.classList.remove('open');
7286
const targetId = link.getAttribute('href').slice(1);
7387
switchSection(targetId);
7488
});

styles/components/footer.css

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
11
/* Footer */
22
.footer {
3+
position: fixed;
4+
bottom: 0;
5+
left: 0;
6+
right: 0;
37
max-width: var(--content-max-width);
4-
width: 100%;
58
margin: 0 auto;
6-
padding: 0 2rem 1.5rem;
9+
padding: 0.8rem 2rem;
710
font-size: 0.8rem;
811
color: var(--text-secondary);
9-
}
10-
11-
.footer-row {
12-
display: flex;
13-
align-items: center;
14-
justify-content: space-between;
15-
}
16-
17-
.social-links {
18-
display: flex;
19-
gap: 1rem;
20-
}
21-
22-
.social-links a {
23-
color: var(--text-secondary);
24-
text-decoration: none;
25-
transition: color 0.2s ease;
26-
}
27-
28-
.social-links a:hover {
29-
color: var(--text);
30-
text-decoration: none;
12+
text-align: center;
3113
}
3214

3315
@media (max-width: 768px) {

styles/components/header.css

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@
1414
transition: color 0.4s ease;
1515
}
1616

17+
.social-links {
18+
display: flex;
19+
gap: 1rem;
20+
}
21+
22+
.social-links a {
23+
color: var(--text-secondary);
24+
text-decoration: none;
25+
transition: color 0.2s ease;
26+
}
27+
28+
.social-links a:hover {
29+
color: var(--text);
30+
text-decoration: none;
31+
}
32+
33+
.nav-toggle {
34+
display: none;
35+
}
36+
1737
.nav-links {
1838
display: flex;
1939
gap: 2.5rem;
@@ -40,14 +60,48 @@
4060

4161
@media (max-width: 768px) {
4262
.header {
43-
padding: 1rem 1.5rem;
63+
padding: 1rem 1rem 1rem 1.5rem;
64+
}
65+
66+
.nav-toggle {
67+
display: flex;
68+
align-items: center;
69+
justify-content: center;
70+
background: none;
71+
border: none;
72+
padding: 0;
73+
cursor: pointer;
74+
color: var(--text-secondary);
75+
transition: color 0.2s ease;
76+
}
77+
78+
.nav-toggle:hover {
79+
color: var(--text);
4480
}
4581

4682
.nav-links {
47-
gap: 1.5rem;
83+
position: absolute;
84+
top: 100%;
85+
right: 0;
86+
flex-direction: column;
87+
gap: 0;
88+
background: var(--bg);
89+
padding: 0.5rem 1rem;
90+
opacity: 0;
91+
pointer-events: none;
92+
transform: translateY(-4px);
93+
transition: opacity 0.2s ease, transform 0.2s ease;
94+
}
95+
96+
.nav-links.open {
97+
opacity: 1;
98+
pointer-events: auto;
99+
transform: translateY(0);
48100
}
49101

50102
.nav-links a {
51-
font-size: 0.7rem;
103+
font-size: 0.65rem;
104+
padding: 0.4rem 0;
105+
text-align: right;
52106
}
53107
}

0 commit comments

Comments
 (0)