Skip to content

Commit 6e0be58

Browse files
authored
[chore] simplify about dropdown (#96)
1 parent 0e28eb1 commit 6e0be58

File tree

38 files changed

+188
-344
lines changed

38 files changed

+188
-344
lines changed

_config.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,8 @@ projects: # Projects dropdown links (external)
2727
- {name: 'Walk in the Parquet', link: 'https://www.walkintheparquet.com/'}
2828

2929
about_links: # About dropdown links
30-
- name: 'General'
31-
link: '/about/'
32-
- name: 'Interactive'
33-
items:
34-
- name: 'Timeline Explorer'
35-
link: '/assets/html/larkin-mcp/john-larkin-timeline.html'
36-
- name: 'Full Profile'
37-
link: '/assets/html/larkin-mcp/john-larkin-profile.html'
30+
- {name: 'General', link: '/about/'}
31+
- {name: 'Timeline', link: '/assets/html/larkin-mcp/john-larkin-timeline.html'}
3832

3933
tagline: >
4034
My personal coding blog and thought journal.

_sass/layout/_nav.scss

Lines changed: 15 additions & 161 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
// ============================================
2-
// Mobile Menu Staggered Reveal Animation
3-
// ============================================
4-
@keyframes menuItemReveal {
5-
from {
6-
opacity: 0;
7-
transform: translateY(-12px);
8-
}
9-
to {
10-
opacity: 1;
11-
transform: translateY(0);
12-
}
13-
}
14-
151
.header {
162
background-color: $dark-bg;
173
color: $dark-text;
@@ -84,173 +70,67 @@
8470
width: 100%;
8571
height: auto;
8672
background: $dark-bg;
87-
88-
// Staggered reveal - only during initial opening animation
89-
// Uses a separate class to avoid re-triggering on accordion toggle
90-
&.js--animating {
91-
.header__link,
92-
.header__dropdown {
93-
opacity: 0;
94-
animation: menuItemReveal 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
95-
96-
// Staggered delays for each menu item
97-
@for $i from 1 through 8 {
98-
&:nth-child(#{$i}) {
99-
animation-delay: #{0.03 + ($i * 0.05)}s;
100-
}
101-
}
102-
}
103-
}
10473
}
10574

10675
.header__link {
10776
color: $dark-text;
108-
padding: 1rem 0;
109-
border-top: 1px solid rgba($dark-border, 0.6);
110-
font-size: 1.05rem;
111-
letter-spacing: 0.01em;
112-
transition: background-color 0.15s ease;
113-
114-
// First item has no top border
115-
&:first-child {
116-
border-top: none;
117-
}
118-
119-
// Subtle active/tap state for mobile
120-
&:active {
121-
background-color: rgba(255, 255, 255, 0.04);
122-
}
77+
padding: .938rem 0;
78+
border-top: 1px solid $dark-border;
12379

12480
// Reset button styles when Contact is a button
12581
&[type="button"],
12682
&:is(button) {
12783
background: none;
12884
border: none;
129-
border-top: 1px solid rgba($dark-border, 0.6);
85+
border-top: 1px solid $dark-border;
13086
font-family: inherit;
131-
font-size: 1.05rem;
87+
font-size: inherit;
13288
cursor: pointer;
13389
display: flex;
13490
align-items: center;
135-
width: 100%;
136-
text-align: left;
13791
}
13892
}
13993

140-
// Projects Dropdown - Mobile Styles (Collapsible Accordion)
94+
// Projects Dropdown - Mobile Styles
14195
.header__dropdown {
142-
border-top: 1px solid rgba($dark-border, 0.6);
143-
144-
// Accordion open state
145-
&.is-open {
146-
.header__dropdown-chevron {
147-
transform: rotate(180deg);
148-
}
149-
150-
.header__dropdown-menu {
151-
max-height: 250px;
152-
opacity: 1;
153-
}
154-
}
96+
border-top: 1px solid $dark-border;
15597
}
15698

15799
.header__dropdown-trigger {
158100
display: flex;
159101
align-items: center;
160102
gap: 0.5rem;
161103
cursor: pointer;
162-
padding: 1rem 0;
163-
width: 100%;
164-
font-size: 1.05rem;
165-
letter-spacing: 0.01em;
166-
transition: background-color 0.15s ease;
167-
color: $dark-text;
168-
// Reset button styles
169-
background: none;
170-
border: none;
171-
font-family: inherit;
172-
text-align: left;
173-
174-
&:active {
175-
background-color: rgba(255, 255, 255, 0.04);
176-
}
177104
}
178105

179106
.header__dropdown-chevron {
180-
transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
181-
margin-left: auto;
107+
transition: transform 0.2s ease-in-out;
182108
}
183109

184110
.header__dropdown-menu {
185111
display: flex;
186112
flex-direction: column;
187113
padding-left: 1rem;
188-
// Collapsed by default on mobile
189-
max-height: 0;
190-
overflow: hidden;
191-
opacity: 0;
192-
transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
193-
opacity 0.25s ease;
194114
}
195115

196116
.header__dropdown-item {
197117
display: flex;
198118
align-items: center;
199119
justify-content: space-between;
200120
color: $dark-text;
201-
padding: 0.85rem 0;
202-
border-top: 1px solid rgba($dark-border, 0.4);
203-
font-size: 0.95rem;
204-
transition: color 0.15s ease, background-color 0.15s ease;
205-
206-
&:first-child {
207-
border-top: none;
208-
}
121+
padding: 0.75rem 0;
122+
border-top: 1px solid $dark-border;
123+
font-size: 0.9rem;
209124

210-
&:active {
211-
background-color: rgba(255, 255, 255, 0.04);
125+
&:hover {
212126
color: $link-color;
213127
}
214128
}
215129

216130
.header__external-icon {
217-
opacity: 0.5;
131+
opacity: 0.6;
218132
flex-shrink: 0;
219133
margin-left: 0.5rem;
220-
transition: opacity 0.15s ease;
221-
222-
.header__dropdown-item:active & {
223-
opacity: 0.8;
224-
}
225-
}
226-
227-
// Nested dropdown submenu (for About > Timeline)
228-
.header__dropdown-submenu {
229-
display: flex;
230-
flex-direction: column;
231-
border-top: 1px solid rgba($dark-border, 0.4);
232-
padding-top: 0.5rem;
233-
margin-top: 0.25rem;
234-
235-
&:first-child {
236-
border-top: none;
237-
padding-top: 0;
238-
margin-top: 0;
239-
}
240-
}
241-
242-
.header__dropdown-label {
243-
color: rgba($dark-text, 0.5);
244-
font-size: 0.75rem;
245-
font-weight: 600;
246-
text-transform: uppercase;
247-
letter-spacing: 0.08em;
248-
padding: 0.5rem 0;
249-
}
250-
251-
.header__dropdown-item--nested {
252-
padding-left: 0.75rem;
253-
font-size: 0.9rem;
254134
}
255135

256136
.header__toggle {
@@ -303,15 +183,13 @@
303183
width: 0;
304184
height: 0;
305185
opacity: 0;
306-
background-color: rgba(0, 0, 0, 0.55);
307-
backdrop-filter: blur(6px);
308-
-webkit-backdrop-filter: blur(6px);
186+
background-color: rgba(0, 0 , 0, .75);
309187
z-index: 2;
310-
transition: opacity 0.4s ease;
188+
transition: opacity 1s ease 0.1s;
311189

312190
&.--open {
313191
width: 100%;
314-
height: 100%;
192+
height: 120%;
315193
opacity: 1;
316194
}
317195
}
@@ -429,9 +307,6 @@
429307
}
430308

431309
.header__dropdown-menu {
432-
// Reset mobile accordion styles for desktop
433-
max-height: none;
434-
overflow: visible;
435310
position: absolute;
436311
top: 100%;
437312
left: 0;
@@ -459,27 +334,6 @@
459334
}
460335
}
461336

462-
// Desktop nested submenu styles
463-
.header__dropdown-submenu {
464-
border-top: 1px solid rgba($dark-border, 0.3);
465-
margin: 0.25rem 0;
466-
padding: 0.25rem 0;
467-
468-
&:first-child {
469-
border-top: none;
470-
margin-top: 0;
471-
padding-top: 0;
472-
}
473-
}
474-
475-
.header__dropdown-label {
476-
padding: 0.5rem 1rem 0.25rem;
477-
}
478-
479-
.header__dropdown-item--nested {
480-
padding-left: 1.5rem;
481-
font-size: 0.875rem;
482-
}
483337
}
484338

485339
// Keyboard shortcut badges in nav

_site/2016/helpful-vim-commands/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2016/particle-filter/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2016/self-selecting-terrorists/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2016/setting-up-blog/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

_site/2016/sudoku-solver/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2016/three-square-theorem/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2017/comp-neuro/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

_site/2017/crypto-notifications/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)