Skip to content

Commit b174c43

Browse files
masnwilliamsclaude
andcommitted
restyle oauth pages to match kernel.sh light theme
- switch from dark to light theme (beige #f2f0e7 background) - hard corners (0px border-radius) throughout - 0.5px solid charcoal borders instead of translucent - lowercase text-transform on body - clerk appearance updated for light mode with sharp corners - org cards use collapsed borders, tag-style active badge - continue button uses charcoal bg with hover underline - remove rounded corners from icon, toasts, avatars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent dfad152 commit b174c43

4 files changed

Lines changed: 81 additions & 50 deletions

File tree

src/app/globals.css

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
}
3131

3232
:root {
33-
--radius: 0.5rem;
33+
--radius: 0px;
3434
--background: #f2f0e7;
3535
--foreground: #1c2024;
36-
--card: #faf9f2;
36+
--card: #f2f0e7;
3737
--card-foreground: #1c2024;
38-
--popover: #faf9f2;
38+
--popover: #f2f0e7;
3939
--popover-foreground: #1c2024;
4040
--primary: #81b300;
4141
--primary-foreground: #1c2024;
@@ -46,17 +46,17 @@
4646
--accent: #f0f0f3;
4747
--accent-foreground: #1c2024;
4848
--destructive: #dc3545;
49-
--border: rgba(28, 32, 36, 0.15);
50-
--input: rgba(28, 32, 36, 0.15);
49+
--border: #1c2024;
50+
--input: #1c2024;
5151
--ring: #81b300;
5252
}
5353

5454
.dark {
5555
--background: #212225;
5656
--foreground: #edeef0;
57-
--card: #2a2b2e;
57+
--card: #212225;
5858
--card-foreground: #edeef0;
59-
--popover: #2a2b2e;
59+
--popover: #212225;
6060
--popover-foreground: #edeef0;
6161
--primary: #81b300;
6262
--primary-foreground: #212225;
@@ -67,8 +67,8 @@
6767
--accent: #333437;
6868
--accent-foreground: #edeef0;
6969
--destructive: #dc3545;
70-
--border: rgba(237, 238, 240, 0.1);
71-
--input: rgba(237, 238, 240, 0.12);
70+
--border: #edeef0;
71+
--input: #edeef0;
7272
--ring: #81b300;
7373
}
7474

@@ -90,13 +90,23 @@
9090
font-family: var(--font-sans);
9191
font-weight: 300;
9292
line-height: 1.2;
93+
text-transform: lowercase;
94+
font-feature-settings: 'liga' off, 'clig' off;
9395
-webkit-font-smoothing: antialiased;
9496
-moz-osx-font-smoothing: grayscale;
9597
}
98+
input, textarea, [data-preserve-case] {
99+
text-transform: none;
100+
}
96101
h1, h2, h3, h4, h5, h6 {
97102
font-weight: 300;
98103
line-height: 1.2;
99104
}
105+
a:hover {
106+
text-decoration: underline;
107+
text-decoration-thickness: 0.5px;
108+
text-underline-offset: 2px;
109+
}
100110
::selection {
101111
background-color: #81b300;
102112
color: #212225;
@@ -109,7 +119,7 @@
109119
font-family: var(--font-sans);
110120
}
111121
.toaster [data-sonner-toast] {
112-
@apply border border-border rounded-lg shadow-md;
122+
@apply border border-border shadow-md;
113123
padding: 0.875rem !important;
114124
}
115125
.toaster [data-sonner-toast][data-type="success"] [data-icon] {

src/app/layout.tsx

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ClerkProvider } from '@clerk/nextjs'
2-
import { dark } from '@clerk/themes'
32
import type { Metadata } from 'next'
43
import { Inter, IBM_Plex_Mono } from 'next/font/google'
54
import { ThemeProvider } from 'next-themes'
@@ -39,29 +38,61 @@ export default function RootLayout({
3938
return (
4039
<ClerkProvider
4140
appearance={{
42-
baseTheme: dark,
4341
variables: {
4442
colorPrimary: '#81b300',
45-
colorText: '#edeef0',
46-
colorTextSecondary: '#9b9da2',
47-
colorBackground: '#212225',
48-
colorInputBackground: '#2a2b2e',
49-
colorInputText: '#edeef0',
43+
colorText: '#1c2024',
44+
colorTextSecondary: '#60646c',
45+
colorBackground: '#f2f0e7',
46+
colorInputBackground: '#f2f0e7',
47+
colorInputText: '#1c2024',
5048
fontFamily: 'var(--font-inter), Inter, sans-serif',
51-
borderRadius: '0.5rem',
49+
borderRadius: '0px',
5250
},
5351
elements: {
5452
card: {
55-
backgroundColor: '#2a2b2e',
56-
borderColor: 'rgba(237, 238, 240, 0.1)',
53+
backgroundColor: '#f2f0e7',
54+
border: '0.5px solid #1c2024',
55+
borderRadius: '0px',
56+
boxShadow: 'none',
5757
},
5858
formButtonPrimary: {
59-
backgroundColor: '#81b300',
60-
color: '#212225',
61-
fontWeight: '400',
59+
backgroundColor: '#1c2024',
60+
color: '#f2f0e7',
61+
fontWeight: '300',
62+
borderRadius: '0px',
63+
textTransform: 'lowercase' as const,
64+
},
65+
formFieldInput: {
66+
border: '0.5px solid #1c2024',
67+
borderRadius: '0px',
68+
backgroundColor: '#f2f0e7',
6269
},
6370
footerActionLink: {
64-
color: '#81b300',
71+
color: '#1c2024',
72+
},
73+
headerTitle: {
74+
textTransform: 'lowercase' as const,
75+
fontWeight: '300',
76+
},
77+
headerSubtitle: {
78+
textTransform: 'lowercase' as const,
79+
fontWeight: '300',
80+
},
81+
socialButtonsBlockButton: {
82+
border: '0.5px solid #1c2024',
83+
borderRadius: '0px',
84+
textTransform: 'lowercase' as const,
85+
},
86+
dividerLine: {
87+
backgroundColor: '#1c2024',
88+
},
89+
identityPreview: {
90+
border: '0.5px solid #1c2024',
91+
borderRadius: '0px',
92+
},
93+
organizationPreview: {
94+
border: '0.5px solid #1c2024',
95+
borderRadius: '0px',
6596
},
6697
},
6798
}}
@@ -70,7 +101,7 @@ export default function RootLayout({
70101
<body className={`${inter.variable} ${ibmPlexMono.variable} font-sans`}>
71102
<ThemeProvider
72103
attribute="class"
73-
defaultTheme="dark"
104+
defaultTheme="light"
74105
disableTransitionOnChange
75106
enableSystem
76107
>

src/app/select-org/page.tsx

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function SelectOrgContent(): React.ReactElement {
2727
// Check if we just returned from org creation and reload to get fresh data
2828
useEffect(() => {
2929
if (searchParams.get('org_created') === 'true') {
30-
// Remove the flag from URL and reload to get fresh organization data
3130
const newUrl = new URL(window.location.href);
3231
newUrl.searchParams.delete('org_created');
3332
window.location.href = newUrl.toString();
@@ -72,20 +71,15 @@ function SelectOrgContent(): React.ReactElement {
7271
try {
7372
await setActive({ organization: selectedOrgId });
7473

75-
// After setting active org, redirect back to authorize
7674
const authorizeUrl = new URL('/authorize', window.location.origin);
7775

78-
// Add all original OAuth parameters
7976
Object.entries(originalParams).forEach(([key, value]) => {
8077
if (value) authorizeUrl.searchParams.set(key, value);
8178
});
8279

83-
// Add the selected orgId as a parameter
8480
authorizeUrl.searchParams.set('org_id', selectedOrgId);
8581

86-
const redirectUri = authorizeUrl.toString();
87-
88-
router.push(redirectUri);
82+
router.push(authorizeUrl.toString());
8983
} catch (error) {
9084
console.error('Failed to set active organization:', error);
9185
setIsSelecting(false);
@@ -103,12 +97,11 @@ function SelectOrgContent(): React.ReactElement {
10397
);
10498
}
10599

106-
// Check if user has any organizations (only after loaded)
100+
// No organizations — show create flow
107101
if (isLoaded && !userMemberships?.isLoading && (!userMemberships?.data || userMemberships.data.length === 0)) {
108102
return (
109103
<Col className="min-h-screen items-center justify-center">
110-
{/* User button in top-right corner */}
111-
<div className="absolute top-4 right-4">
104+
<div className="absolute top-6 right-6">
112105
<UserButton
113106
afterSignOutUrl={`/select-org?${searchParams.toString()}`}
114107
/>
@@ -136,8 +129,7 @@ function SelectOrgContent(): React.ReactElement {
136129

137130
return (
138131
<Col className="min-h-screen items-center justify-center">
139-
{/* User button in top-right corner */}
140-
<div className="absolute top-4 right-4">
132+
<div className="absolute top-6 right-6">
141133
<UserButton
142134
afterSignOutUrl={`/select-org?${searchParams.toString()}`}
143135
/>
@@ -155,11 +147,10 @@ function SelectOrgContent(): React.ReactElement {
155147
<div
156148
ref={scrollContainerRef}
157149
onScroll={updateScrollState}
158-
className="flex flex-col gap-2 max-h-60 overflow-y-auto"
150+
className="flex flex-col gap-0 max-h-64 overflow-y-auto"
159151
>
160152
{(userMemberships?.data || user?.organizationMemberships)
161153
?.sort((a, b) => {
162-
// Put the currently active org first
163154
if (a.organization.id === orgId) return -1;
164155
if (b.organization.id === orgId) return 1;
165156
return 0;
@@ -172,25 +163,25 @@ function SelectOrgContent(): React.ReactElement {
172163
key={membership.organization.id}
173164
onClick={() => handleOrgSelect(membership.organization.id)}
174165
disabled={isSelecting}
175-
className={`w-full p-4 text-left rounded-lg transition-all cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed ${
166+
className={`w-full p-4 text-left transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed border-[0.5px] border-foreground -mt-[0.5px] first:mt-0 ${
176167
isSelected
177-
? 'bg-primary/10 border border-primary/40'
178-
: 'border border-border hover:border-primary/30 hover:bg-primary/5'
168+
? 'bg-primary/10'
169+
: 'hover:bg-primary/5'
179170
}`}
180171
>
181172
<Row className="gap-3">
182173
{membership.organization.imageUrl && (
183174
<img
184175
src={membership.organization.imageUrl}
185176
alt={membership.organization.name}
186-
className="w-10 h-10 rounded-lg"
177+
className="w-10 h-10"
187178
/>
188179
)}
189180
<Col className="flex-1 gap-1">
190181
<Row className="justify-between items-center">
191182
<span className="font-normal text-sm text-foreground">{membership.organization.name}</span>
192183
{isCurrentlyActive && (
193-
<span className="text-xs bg-primary/15 text-primary px-2 py-0.5 rounded-full">
184+
<span className="text-[10px] uppercase tracking-wide border-[0.5px] border-foreground px-2 py-0.5">
194185
active
195186
</span>
196187
)}
@@ -203,23 +194,22 @@ function SelectOrgContent(): React.ReactElement {
203194
})}
204195
</div>
205196

206-
{/* Fade overlays to indicate scrollability */}
207197
{canScrollUp && (
208-
<div className="absolute top-0 left-0 right-0 h-4 bg-gradient-to-b from-background to-transparent pointer-events-none" />
198+
<div className="absolute top-0 left-0 right-0 h-6 bg-gradient-to-b from-background to-transparent pointer-events-none" />
209199
)}
210200
{canScrollDown && (
211-
<div className="absolute bottom-0 left-0 right-0 h-4 bg-gradient-to-t from-background to-transparent pointer-events-none" />
201+
<div className="absolute bottom-0 left-0 right-0 h-6 bg-gradient-to-t from-background to-transparent pointer-events-none" />
212202
)}
213203
</div>
214204

215205
<button
216206
onClick={handleConfirm}
217207
disabled={isSelecting || !selectedOrgId}
218-
className="w-full bg-primary text-primary-foreground py-3 px-4 rounded-lg font-normal text-sm hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-opacity"
208+
className="w-full bg-foreground text-background py-3 px-4 font-light text-sm hover:underline hover:decoration-[0.5px] hover:underline-offset-2 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer transition-opacity"
219209
>
220210
{isSelecting ? (
221211
<Row className="items-center justify-center gap-2">
222-
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-primary-foreground"></div>
212+
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-background"></div>
223213
authorizing...
224214
</Row>
225215
) : 'continue'}

src/components/icons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const KernelIcon = ({
2222
fill="none"
2323
xmlns="http://www.w3.org/2000/svg"
2424
>
25-
<rect width="400" height="400" rx="48" fill="#81B300" />
25+
<rect width="400" height="400" fill="#81B300" />
2626
<path d="M136.217 99C140.703 99 144.515 100.593 147.651 103.779C150.84 106.911 152.434 110.719 152.434 115.202V123.027C152.434 124 153.671 124.413 154.256 123.637L167.922 105.481C170.571 101.917 174.112 99.8373 178.544 99.2433C182.977 98.5953 187.004 99.5944 190.626 102.24C194.194 104.941 196.274 108.505 196.869 112.933C197.518 117.361 196.491 121.359 193.788 124.923L179.697 143.717C179.158 144.437 179.158 145.426 179.696 146.146L197.761 170.287C200.464 173.851 201.492 177.848 200.843 182.276C200.248 186.704 198.167 190.268 194.599 192.969C190.977 195.615 186.95 196.614 182.517 195.966C178.085 195.372 174.544 193.293 171.895 189.729L154.255 166.378C153.669 165.603 152.434 166.017 152.434 166.988V180.008C152.434 184.49 150.84 188.325 147.651 191.511C144.515 194.643 140.703 196.209 136.217 196.209C131.73 196.209 127.892 194.643 124.703 191.511C121.567 188.325 120 184.49 120 180.008V115.202C120 110.719 121.567 106.911 124.703 103.779C127.892 100.593 131.73 99.0001 136.217 99Z" fill="#1C2024"/>
2727
<path fillRule="evenodd" clipRule="evenodd" d="M245.654 99.8099C254.628 99.8099 262.277 102.97 268.602 109.288C274.926 115.607 278.089 123.248 278.089 132.213C278.089 141.178 274.926 148.82 268.602 155.139C268.373 155.367 268.144 155.59 267.915 155.807C267.138 156.545 266.996 157.752 267.639 158.611L276.386 170.287C279.089 173.851 280.116 177.848 279.467 182.276C278.872 186.704 276.792 190.268 273.224 192.969C269.602 195.615 265.575 196.614 261.142 195.966C256.71 195.372 253.169 193.293 250.52 189.729L239.436 170.421C238.92 169.522 237.546 169.888 237.546 170.925V180.008C237.546 184.49 235.951 188.325 232.762 191.511C229.627 194.643 225.816 196.209 221.329 196.209C216.842 196.209 213.004 194.643 209.815 191.511C206.68 188.325 205.111 184.49 205.111 180.008V116.011C205.111 111.529 206.68 107.721 209.815 104.589C213.004 101.403 216.842 99.8099 221.329 99.8099H245.654ZM241.209 125.327C237.574 125.327 234.628 128.274 234.628 131.909C234.628 135.544 237.574 138.491 241.209 138.491C244.844 138.491 247.79 135.544 247.79 131.909C247.79 128.274 244.844 125.327 241.209 125.327Z" fill="#1C2024"/>
2828
<path d="M192.977 202.791C197.464 202.791 201.274 204.384 204.409 207.57C207.599 210.702 209.194 214.51 209.194 218.992V283.798C209.194 288.281 207.599 292.116 204.409 295.302C201.274 298.434 197.464 300 192.977 300C188.491 300 184.68 298.407 181.544 295.221L154.207 264.106C153.591 263.405 152.435 263.841 152.434 264.775V283.798C152.434 288.281 150.839 292.116 147.65 295.302C144.514 298.434 140.703 300 136.217 300C131.73 300 127.892 298.434 124.703 295.302C121.567 292.116 120 288.281 120 283.798V218.992C120 214.51 121.567 210.702 124.703 207.57C127.892 204.384 131.73 202.791 136.217 202.791C140.703 202.791 144.541 204.357 147.731 207.489L174.986 238.597C175.602 239.299 176.76 238.864 176.76 237.929V218.992C176.76 214.51 178.328 210.702 181.463 207.57C184.653 204.384 188.491 202.791 192.977 202.791Z" fill="#1C2024"/>

0 commit comments

Comments
 (0)