Redesign settings page with sectioned layout, side navigation and choice cards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-15 19:21:41 +01:00
1 parent 6b9bf3cd5f
commit de22f035dc
11 files changed
+934 -294

No files matched your search

+541 -47
View File
@@ -382,7 +382,7 @@ tr.open .clip {
gap: 0 16px;
}
input,
input:not([type="radio"], [type="checkbox"]),
textarea {
width: 100%;
padding: 8px 10px;
@@ -393,12 +393,18 @@ textarea {
font: inherit;
}
input:focus,
input:not([type="radio"], [type="checkbox"]):focus,
textarea:focus {
outline: 2px solid var(--accent);
outline-offset: -1px;
}
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
textarea {
resize: vertical;
}
@@ -586,36 +592,6 @@ tr.open .detail {
color: inherit;
}
.check {
display: flex;
align-items: center;
gap: 8px;
font-weight: 400;
}
.check input {
width: auto;
accent-color: var(--accent);
}
.danger-zone {
display: flex;
flex-direction: column;
gap: 6px;
margin-top: 16px;
padding-top: 16px;
border-top: 1px solid var(--border);
}
.danger-zone h3 {
margin: 0;
font-size: 14px;
}
.danger-zone p {
margin: 0;
}
button.danger {
background: var(--bad);
}
@@ -626,6 +602,478 @@ button.danger {
}
}
select {
width: 100%;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
color: var(--text);
font: inherit;
}
.settings-head {
margin-bottom: 24px;
}
.settings-head h1 {
margin: 0 0 6px;
font-size: 24px;
}
.settings-head p {
margin: 0;
color: var(--muted);
}
.settings-layout {
display: grid;
grid-template-columns: 200px minmax(0, 1fr);
gap: 32px;
align-items: start;
}
.settings-nav {
position: sticky;
top: 24px;
display: flex;
flex-direction: column;
gap: 2px;
}
.settings-nav a {
padding: 7px 12px;
border-radius: 6px;
color: var(--muted);
text-decoration: none;
font-weight: 500;
}
.settings-nav a:hover,
.settings-nav a.active {
background: var(--surface);
color: var(--text);
}
.settings-nav a.active {
box-shadow: inset 2px 0 0 var(--accent);
}
.settings-sections {
display: flex;
flex-direction: column;
gap: 24px;
min-width: 0;
}
.s-section {
scroll-margin-top: 24px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 10px;
}
.s-head {
padding: 20px 24px 0;
}
.s-head h2 {
display: flex;
align-items: center;
gap: 10px;
margin: 0;
font-size: 17px;
}
.s-head p {
max-width: 60ch;
margin: 6px 0 0;
color: var(--muted);
}
.s-badge {
padding: 2px 8px;
border: 1px solid var(--accent);
border-radius: 999px;
color: var(--accent);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.02em;
}
.s-body {
display: flex;
flex-direction: column;
gap: 20px;
padding: 20px 24px 24px;
}
.s-foot {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
gap: 12px;
padding: 14px 24px;
border-top: 1px solid var(--border);
background: color-mix(in srgb, var(--bg) 45%, var(--surface));
border-radius: 0 0 10px 10px;
}
.s-foot > form:first-child:not(:only-child) {
margin-right: auto;
}
.s-foot-text {
margin-right: auto;
color: var(--muted);
font-size: 13px;
}
.s-section > .notice {
margin: 16px 24px 0;
}
.notice {
padding: 10px 14px;
border: 1px solid color-mix(in srgb, var(--ok) 45%, var(--border));
border-left: 3px solid var(--ok);
border-radius: 6px;
background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}
.notice.bad {
border-color: color-mix(in srgb, var(--bad) 45%, var(--border));
border-left-color: var(--bad);
background: color-mix(in srgb, var(--bad) 8%, var(--surface));
}
.fields {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
gap: 18px 20px;
}
.field {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.field label,
.choices legend {
font-size: 13px;
font-weight: 600;
}
.field-control {
position: relative;
}
.field-control.has-unit input {
padding-right: 52px;
}
.field-unit {
position: absolute;
top: 50%;
right: 12px;
transform: translateY(-50%);
color: var(--muted);
font-size: 12px;
pointer-events: none;
}
.field-hint,
.field-error {
margin: 0;
font-size: 12px;
}
.field-hint {
color: var(--muted);
}
.field-error {
color: var(--bad);
}
.field:has(.field-error) input {
border-color: var(--bad);
}
.settings input {
font-variant-numeric: tabular-nums;
}
.choices {
margin: 0;
padding: 0;
border: 0;
}
.choices legend {
margin-bottom: 8px;
padding: 0;
}
.choice-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 12px;
}
.choice {
position: relative;
display: flex;
gap: 10px;
padding: 14px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--bg);
cursor: pointer;
}
.choice:hover {
border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
.choice:has(input:checked) {
border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}
.choice input {
flex: none;
width: 16px;
height: 16px;
margin: 2px 0 0;
accent-color: var(--accent);
}
.choice-body {
display: flex;
flex-direction: column;
gap: 4px;
}
.choice-body span {
color: var(--muted);
font-size: 13px;
}
.estimate {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 6px 12px;
padding: 12px 14px;
border-radius: 8px;
background: var(--bg);
}
.estimate-value {
font-size: 15px;
}
.estimate-value strong {
color: var(--accent);
font-size: 20px;
font-variant-numeric: tabular-nums;
}
.switch-row {
display: flex;
align-items: flex-start;
gap: 12px;
cursor: pointer;
}
.switch-row > span {
display: flex;
flex-direction: column;
gap: 2px;
}
.switch-row .muted {
font-size: 13px;
}
input.switch {
flex: none;
position: relative;
width: 38px;
height: 22px;
margin: 0;
padding: 0;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--bg);
appearance: none;
cursor: pointer;
transition: background 0.15s;
}
input.switch::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: var(--muted);
transition: transform 0.15s, background 0.15s;
}
input.switch:checked {
border-color: var(--accent);
background: var(--accent);
}
input.switch:checked::after {
background: #fff;
transform: translateX(16px);
}
.stat-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 12px;
}
.stat {
display: flex;
flex-direction: column;
gap: 4px;
padding: 12px 14px;
border-radius: 8px;
background: var(--bg);
}
.stat-label {
color: var(--muted);
font-size: 12px;
}
.stat-value {
font-size: 18px;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.danger-box {
margin: 0 24px 24px;
border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--border));
border-radius: 8px;
}
.danger-box h3 {
margin: 0;
padding: 10px 16px;
border-bottom: 1px solid color-mix(in srgb, var(--bad) 25%, var(--border));
color: var(--bad);
font-size: 13px;
}
.action-row {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 12px 20px;
padding: 14px 16px;
}
.action-row + .action-row {
border-top: 1px solid var(--border);
}
.action-text {
display: flex;
flex-direction: column;
gap: 3px;
min-width: 0;
flex: 1 1 280px;
}
.action-text .muted {
font-size: 13px;
}
.action-controls {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.action-controls input[type="text"],
.action-controls input:not([type]) {
width: 130px;
}
.inline-check {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
cursor: pointer;
}
.inline-check input {
width: auto;
accent-color: var(--bad);
}
.inline-field {
display: flex;
flex: 1 1 240px;
flex-direction: column;
gap: 4px;
}
.kv {
display: grid;
gap: 0;
margin: 0;
}
.kv > div {
display: grid;
grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
gap: 12px;
padding: 9px 0;
border-bottom: 1px solid var(--border);
}
.kv > div:last-child {
border-bottom: 0;
}
.kv dt {
color: var(--muted);
}
.kv dd {
margin: 0;
overflow-wrap: anywhere;
}
.s-table th {
font-size: 12px;
}
.empty {
margin: 0;
padding: 14px;
border: 1px dashed var(--border);
border-radius: 8px;
color: var(--muted);
text-align: center;
}
.token {
display: block;
margin-top: 8px;
@@ -637,22 +1085,68 @@ button.danger {
user-select: all;
}
.section-head {
display: flex;
align-items: center;
gap: 8px;
button.ghost {
padding: 8px 12px;
background: transparent;
color: var(--muted);
}
.section-head h2 {
margin: 0;
}
select {
width: 100%;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--bg);
button.ghost:hover:not(:disabled) {
color: var(--text);
font: inherit;
}
button.danger-text {
color: var(--bad);
}
@media (max-width: 899px) {
.settings-layout {
grid-template-columns: minmax(0, 1fr);
gap: 16px;
}
.settings-nav {
position: static;
flex-direction: row;
gap: 6px;
overflow-x: auto;
padding-bottom: 4px;
}
.settings-nav a {
flex: none;
border: 1px solid var(--border);
font-size: 13px;
}
.settings-nav a.active {
border-color: var(--accent);
box-shadow: none;
}
.s-head,
.s-body {
padding-left: 16px;
padding-right: 16px;
}
.s-foot {
padding-left: 16px;
padding-right: 16px;
}
.s-section > .notice {
margin-left: 16px;
margin-right: 16px;
}
.danger-box {
margin-left: 16px;
margin-right: 16px;
}
.kv > div {
grid-template-columns: minmax(0, 1fr);
gap: 2px;
}
}