Skip to content

Commit 15b4efd

Browse files
UI polish: brand mark, button states, status styling
- purple gradient logo dot (matches the favicon) above the title, wrapped with h1 + tagline in a header block - subtle radial page-background tint for depth - button: soft shadow, hover lift, visible :focus-visible ring, and a spinner inside the working state (aria-busy) - errors render in a soft red card instead of bare red text; success message gets a green ok state - #status reserves 4rem so appearing text doesn't shift the layout - focus rings on help links
1 parent 8e9aacf commit 15b4efd

2 files changed

Lines changed: 66 additions & 10 deletions

File tree

index.html

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,45 @@
1919
--bg: #fafbfc;
2020
--fg: #1f2328;
2121
--accent: #6839e6;
22+
--accent-2: #8b5cf6;
2223
--accent-hover: #5328d4;
2324
--muted: #656d76;
2425
--error: #cf222e;
26+
--error-bg: #fff5f5;
27+
--error-border: #ffd7d5;
28+
--ok: #1a7f37;
2529
}
2630
* { box-sizing: border-box; }
2731
html, body {
2832
margin: 0; padding: 0; height: 100%;
2933
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
3034
background: var(--bg); color: var(--fg);
3135
}
36+
body {
37+
background:
38+
radial-gradient(60rem 30rem at 50% -10%, rgba(104, 57, 230, 0.06), transparent 70%),
39+
var(--bg);
40+
}
3241
main {
3342
min-height: 100vh;
3443
display: flex; flex-direction: column;
3544
align-items: center; justify-content: center;
3645
padding: 2rem; gap: 2rem;
3746
text-align: center;
3847
}
39-
h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin: 0; font-weight: 600; }
48+
header {
49+
display: flex; flex-direction: column;
50+
align-items: center; gap: 0.9rem;
51+
}
52+
.logo {
53+
width: 52px; height: 52px; border-radius: 50%;
54+
background: radial-gradient(circle at 30% 30%, var(--accent-2), var(--accent));
55+
box-shadow: 0 8px 24px rgba(104, 57, 230, 0.3);
56+
}
57+
h1 {
58+
font-size: clamp(1.5rem, 4vw, 2.5rem);
59+
margin: 0; font-weight: 600; letter-spacing: -0.02em;
60+
}
4061
p.tagline { color: var(--muted); margin: 0; max-width: 32rem; }
4162
button#signin {
4263
font-size: 1.25rem;
@@ -45,14 +66,45 @@
4566
border: none; border-radius: 999px;
4667
cursor: pointer;
4768
font-weight: 600;
48-
transition: background 0.15s, transform 0.05s;
69+
transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
4970
min-width: 14rem;
71+
box-shadow: 0 2px 8px rgba(104, 57, 230, 0.25);
72+
}
73+
button#signin:hover {
74+
background: var(--accent-hover);
75+
transform: translateY(-1px);
76+
box-shadow: 0 6px 16px rgba(104, 57, 230, 0.3);
77+
}
78+
button#signin:active { transform: translateY(0) scale(0.98); }
79+
button#signin:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 3px; }
80+
button#signin:disabled {
81+
opacity: 0.75; cursor: progress;
82+
transform: none; box-shadow: 0 2px 8px rgba(104, 57, 230, 0.25);
83+
}
84+
button#signin[aria-busy="true"]::before {
85+
content: '';
86+
display: inline-block;
87+
width: 1em; height: 1em;
88+
margin-right: 0.6em;
89+
vertical-align: -0.12em;
90+
border: 2px solid rgba(255, 255, 255, 0.35);
91+
border-top-color: white;
92+
border-radius: 50%;
93+
animation: spin 0.7s linear infinite;
94+
}
95+
@keyframes spin { to { transform: rotate(360deg); } }
96+
#status {
97+
color: var(--muted); font-size: 0.95rem;
98+
min-height: 4rem; max-width: 32rem;
99+
}
100+
#status.error {
101+
color: var(--error);
102+
background: var(--error-bg);
103+
border: 1px solid var(--error-border);
104+
border-radius: 12px;
105+
padding: 0.9rem 1.4rem;
50106
}
51-
button#signin:hover { background: var(--accent-hover); }
52-
button#signin:active { transform: scale(0.98); }
53-
button#signin:disabled { opacity: 0.6; cursor: progress; }
54-
#status { color: var(--muted); font-size: 0.95rem; min-height: 1.5em; max-width: 32rem; }
55-
#status.error { color: var(--error); }
107+
#status.ok { color: var(--ok); font-weight: 500; }
56108
#status ul.help-links {
57109
list-style: none; padding: 0; margin: 1rem 0 0;
58110
display: flex; flex-direction: column; gap: 0.5rem;
@@ -62,6 +114,7 @@
62114
text-underline-offset: 3px;
63115
}
64116
#status ul.help-links a:hover { color: var(--accent-hover); }
117+
#status ul.help-links a:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; border-radius: 4px; }
65118
footer {
66119
margin-top: 2rem; color: var(--muted); font-size: 0.85rem;
67120
}
@@ -70,8 +123,11 @@
70123
</head>
71124
<body>
72125
<main>
73-
<h1>Sign in to Solid</h1>
74-
<p class="tagline">One click. We resolve your Nostr / WebID. You land at your pod.</p>
126+
<header>
127+
<div class="logo" aria-hidden="true"></div>
128+
<h1>Sign in to Solid</h1>
129+
<p class="tagline">One click. We resolve your Nostr / WebID. You land at your pod.</p>
130+
</header>
75131
<button id="signin">Sign in</button>
76132
<div id="status" aria-live="polite"></div>
77133
<footer>

login.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ async function flow() {
194194
setStatus(`Could not build redirect URL from: ${base}`, 'error');
195195
return false;
196196
}
197-
setStatus(`Found your WebID: ${webId}. Taking you to ${base}…`);
197+
setStatus(`Found your WebID: ${webId}. Taking you to ${base}…`, 'ok');
198198
// Hopping to the user's own pod is instant; an app-supplied ?next=
199199
// destination stays on screen for a beat so the user sees where
200200
// they're being sent before leaving this origin.

0 commit comments

Comments
 (0)