Skip to content

Commit 0fdd6ae

Browse files
committed
mobile: add tailwind, rewrite nav with responsive classes, fix contact overflow
1 parent 817d475 commit 0fdd6ae

8 files changed

Lines changed: 152 additions & 235 deletions

File tree

bun.lock

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
"check": "oxlint src/ && prettier --check 'src/**/*.{js,jsx,css}'"
1313
},
1414
"devDependencies": {
15+
"@tailwindcss/vite": "^4.3.0",
1516
"@vitejs/plugin-react": "^6.0.1",
1617
"oxlint": "^1.62.0",
1718
"prettier": "^3.8.3",
1819
"sharp": "^0.34.5",
1920
"svgo": "^4.0.1",
21+
"tailwindcss": "^4.3.0",
2022
"vite": "^8.0.10",
2123
"vite-plugin-image-optimizer": "^2.0.3"
2224
},

src/components/Nav.css

Lines changed: 14 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,23 @@
1-
/* ============================================================
2-
Shared nav
3-
============================================================ */
1+
/* view-transition-name and ::view-transition-* have no Tailwind equivalent */
42

5-
.nx-nav {
6-
position: sticky;
7-
top: 0;
8-
z-index: 50;
9-
backdrop-filter: blur(14px) saturate(140%);
10-
-webkit-backdrop-filter: blur(14px) saturate(140%);
11-
background: color-mix(in oklch, var(--navy-050) 78%, transparent);
12-
border-bottom: 1px solid color-mix(in oklch, var(--navy-300) 50%, transparent);
13-
}
14-
.nx-nav-inner {
15-
max-width: var(--max);
16-
margin: 0 auto;
17-
padding: 18px var(--gutter);
18-
display: flex;
19-
align-items: center;
20-
gap: 32px;
21-
}
22-
.nx-logo {
23-
display: flex;
24-
align-items: center;
25-
}
26-
.nx-logo-img {
27-
height: 24px;
28-
width: auto;
29-
display: block;
30-
}
31-
.nx-footer-logo {
32-
width: 144px;
33-
height: auto;
34-
display: block;
35-
margin-bottom: 18px;
36-
transition: filter 0.18s ease;
37-
}
38-
.nx-footer-logo:hover {
39-
filter: brightness(1.1);
40-
}
41-
42-
.nx-toggle {
43-
position: relative;
44-
margin-left: auto;
45-
display: flex;
46-
background: var(--navy-200);
47-
padding: 3px;
48-
border-radius: 999px;
49-
font-size: 13px;
50-
font-weight: 500;
51-
isolation: isolate;
52-
}
533
.nx-toggle-thumb {
54-
position: absolute;
55-
top: 3px;
56-
left: 3px;
57-
bottom: 3px;
58-
width: calc(50% - 3px);
59-
background: var(--navy-1000);
60-
border-radius: 999px;
61-
transform: translate3d(0, 0, 0);
62-
transition: transform 0.42s cubic-bezier(0.5, 1.4, 0.55, 1);
63-
z-index: 0;
644
view-transition-name: nx-toggle-thumb;
655
}
66-
.nx-toggle[data-active="talent"] .nx-toggle-thumb {
67-
transform: translate3d(100%, 0, 0);
68-
}
69-
.nx-toggle a {
70-
position: relative;
71-
z-index: 1;
72-
flex: 1 1 0;
73-
text-align: center;
74-
padding: 7px 18px;
75-
border-radius: 999px;
76-
color: var(--navy-600);
77-
transition: color 0.22s ease;
78-
white-space: nowrap;
79-
}
80-
.nx-toggle a.active {
81-
color: white;
82-
}
83-
.nx-toggle a:hover:not(.active) {
84-
color: var(--navy-1000);
85-
}
86-
87-
.nx-nav-links {
88-
display: flex;
89-
gap: 28px;
90-
font-size: 14px;
91-
color: var(--navy-600);
92-
}
93-
.nx-nav-links a:hover {
94-
color: var(--navy-1000);
95-
}
966

977
.nx-cta {
98-
display: inline-flex;
99-
align-items: center;
100-
justify-content: center;
101-
padding: 9px 18px;
102-
border-radius: 999px;
103-
background: var(--accent);
104-
color: white;
105-
font-size: 13px;
106-
font-weight: 500;
107-
overflow: hidden;
108-
transition:
109-
transform 0.15s ease,
110-
background 0.15s ease;
1118
view-transition-name: nx-cta;
1129
}
113-
.nx-cta:hover {
114-
background: var(--accent-deep);
115-
transform: translateY(-1px);
116-
}
10+
11711
.nx-cta-text {
118-
display: inline-block;
11912
view-transition-name: nx-cta-text;
12013
animation: nx-cta-text-fallback 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
12114
}
15+
12216
@keyframes nx-cta-text-fallback {
123-
from {
124-
opacity: 0;
125-
transform: translateY(6px);
126-
}
127-
to {
128-
opacity: 1;
129-
transform: translateY(0);
130-
}
17+
from { opacity: 0; transform: translateY(6px); }
18+
to { opacity: 1; transform: translateY(0); }
13119
}
20+
13221
::view-transition-group(nx-cta) {
13322
animation-duration: 360ms;
13423
animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
@@ -139,83 +28,18 @@
13928
::view-transition-new(nx-cta-text) {
14029
animation: nx-cta-text-in 260ms 60ms ease-out backwards;
14130
}
31+
14232
@keyframes nx-cta-text-out {
143-
to {
144-
opacity: 0;
145-
transform: translateY(-6px);
146-
}
33+
to { opacity: 0; transform: translateY(-6px); }
14734
}
14835
@keyframes nx-cta-text-in {
149-
from {
150-
opacity: 0;
151-
transform: translateY(6px);
152-
}
153-
to {
154-
opacity: 1;
155-
transform: translateY(0);
156-
}
36+
from { opacity: 0; transform: translateY(6px); }
37+
to { opacity: 1; transform: translateY(0); }
15738
}
39+
15840
@media (prefers-reduced-motion: reduce) {
159-
.nx-toggle-thumb {
160-
transition: none;
161-
}
162-
.nx-cta-text {
163-
animation: none;
164-
}
41+
.nx-toggle-thumb { transition: none; }
42+
.nx-cta-text { animation: none; }
16543
::view-transition-old(nx-cta-text),
166-
::view-transition-new(nx-cta-text) {
167-
animation: none;
168-
}
169-
}
170-
171-
/* ============================================================
172-
Footer
173-
============================================================ */
174-
175-
.nx-footer {
176-
background: var(--navy-1000);
177-
color: var(--navy-300);
178-
padding: 80px var(--gutter) 40px;
179-
}
180-
.nx-footer-inner {
181-
max-width: var(--max);
182-
margin: 0 auto;
183-
display: grid;
184-
grid-template-columns: 1.5fr 1fr 1fr;
185-
gap: 64px;
186-
}
187-
.nx-footer h4 {
188-
color: white;
189-
font-size: 13px;
190-
font-weight: 500;
191-
margin: 0 0 16px;
192-
letter-spacing: -0.01em;
193-
}
194-
.nx-footer ul {
195-
list-style: none;
196-
padding: 0;
197-
margin: 0;
198-
display: flex;
199-
flex-direction: column;
200-
gap: 10px;
201-
font-size: 14px;
202-
}
203-
.nx-footer a:hover {
204-
color: white;
205-
}
206-
.nx-footer-base {
207-
max-width: var(--max);
208-
margin: 60px auto 0;
209-
padding-top: 28px;
210-
border-top: 1px solid var(--navy-800);
211-
display: flex;
212-
justify-content: space-between;
213-
font-size: 12px;
214-
color: var(--navy-500);
215-
font-family: var(--font-mono);
216-
}
217-
@media (max-width: 800px) {
218-
.nx-footer-inner {
219-
grid-template-columns: 1fr 1fr;
220-
}
44+
::view-transition-new(nx-cta-text) { animation: none; }
22145
}

0 commit comments

Comments
 (0)