Skip to content

Commit 381c44c

Browse files
committed
refactor: dedupe shared ui styles
1 parent 21eb936 commit 381c44c

9 files changed

Lines changed: 254 additions & 444 deletions

File tree

frontend/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
name="description"
99
content="html2rss converts fixed demo pages or operator-submitted URLs into feed endpoints."
1010
/>
11+
<link rel="stylesheet" href="/shared-ui.css" />
1112
<link rel="icon" href="/favicon.ico" />
1213
<title>html2rss</title>
1314
</head>

frontend/src/components/App.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ export function App() {
196196
return (
197197
<section class="workspace-shell workspace-shell--centered workspace-shell--loading">
198198
<BrandLockup />
199-
<div class="ui-card ui-card--notice ui-card--roomy status-card" aria-live="polite">
200-
<div class="status-card__spinner" aria-hidden="true" />
199+
<div class="ui-card ui-card--notice ui-card--roomy notice" data-state="loading" aria-live="polite">
200+
<div class="notice__spinner" aria-hidden="true" />
201201
<div>
202202
<strong>Loading instance</strong>
203203
<p>Reading feed-generation capabilities.</p>
@@ -214,7 +214,7 @@ export function App() {
214214
</header>
215215

216216
{(metadataError || tokenStateError) && (
217-
<section class="ui-card ui-card--notice ui-card--padded notice notice--error" role="alert">
217+
<section class="ui-card ui-card--notice ui-card--padded notice" data-tone="error" role="alert">
218218
<div class="notice__title">Instance metadata unavailable</div>
219219
<p>{metadataError ?? tokenStateError}</p>
220220
</section>

frontend/src/components/AppPanels.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function CreateFeedPanel({
118118
onInput={(event) => onFeedFieldChange('url', (event.target as HTMLInputElement).value)}
119119
/>
120120

121-
<label class="field-block field-block--select" htmlFor="strategy">
121+
<label class="field-block field-block--centered field-block--compact" htmlFor="strategy">
122122
<select
123123
id="strategy"
124124
name="strategy"
@@ -182,7 +182,7 @@ export function CreateFeedPanel({
182182
<h2>Add access token</h2>
183183
<p class="token-gate__hint">This instance needs an access token.</p>
184184
</div>
185-
<label class="field-block field-block--token" htmlFor="access-token">
185+
<label class="field-block field-block--stretch field-block--compact" htmlFor="access-token">
186186
<span class="field-label field-label--ghost">Access token</span>
187187
<input
188188
id="access-token"
@@ -226,14 +226,14 @@ export function CreateFeedPanel({
226226
)}
227227

228228
{conversionError && (
229-
<div class="ui-card ui-card--notice ui-card--padded notice notice--error" role="alert">
229+
<div class="ui-card ui-card--notice ui-card--padded notice" data-tone="error" role="alert">
230230
<div class="notice__title">Feed generation failed</div>
231231
<p>{conversionError}</p>
232232
</div>
233233
)}
234234

235235
{feedFieldErrors.form && (
236-
<div class="ui-card ui-card--notice ui-card--padded notice notice--error" role="alert">
236+
<div class="ui-card ui-card--notice ui-card--padded notice" data-tone="error" role="alert">
237237
<p>{feedFieldErrors.form}</p>
238238
</div>
239239
)}

frontend/src/components/DominantField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function DominantField({
3939
}: DominantFieldProps) {
4040
return (
4141
<div class={className ? `dominant-field ${className}` : 'dominant-field'}>
42-
<label class="field-block field-block--primary field-block--hero" htmlFor={id}>
42+
<label class="field-block field-block--centered" htmlFor={id}>
4343
<span class="field-label field-label--ghost">{label}</span>
4444
<input
4545
id={id}

frontend/src/components/ResultDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function ResultDisplay({ result, onCreateAnother }: ResultDisplayProps) {
166166
)}
167167

168168
{copyNotice && (
169-
<div class="ui-card ui-card--notice ui-card--padded notice notice--success" role="status">
169+
<div class="ui-card ui-card--notice ui-card--padded notice" data-tone="success" role="status">
170170
<p>{copyNotice}</p>
171171
</div>
172172
)}

0 commit comments

Comments
 (0)