Add list styles: Podium, Spotlight, Grid, List
- Each list picks a style in List settings (new lists default to Podium); existing lists keep Grid or List - Podium: top 3 on medal-colored steps (#1 center and raised), the rest behind a native <details> "Show N more"; stacks #1 over #2/#3 on phones - Spotlight: #1 as a feature card (art, why-note or description, play button), the rest as a numbered list - Visitors can switch styles on a list page (?style=), preserved across pages; later pages fall back to a plain list since they don't start at #1 - Entries' detail data now lives on a wrapper per list, so featured and collapsed entries all open the detail view Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b09533cc00
commit
ddf2157e63
15 files changed
+286
-65
No files matched your search
+115
-5
@@ -165,10 +165,10 @@ code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; bac
|
||||
/* ---------- ranked items: grid ---------- */
|
||||
.items { list-style: none; margin: 0; padding: 0; }
|
||||
.items--grid { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
|
||||
.items--grid.aspect-square { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
|
||||
.aspect-square .items--grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
|
||||
@media (max-width: 640px) {
|
||||
.items--grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px 12px; }
|
||||
.items--grid.aspect-square { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
|
||||
.aspect-square .items--grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
|
||||
}
|
||||
.item-btn {
|
||||
all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px;
|
||||
@@ -281,6 +281,101 @@ code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; bac
|
||||
.items--rows .item-rank { font-size: 18px; }
|
||||
}
|
||||
|
||||
/* ---------- style: podium ---------- */
|
||||
/* #2, #1, #3 left to right, #1 raised and a little larger, each standing on
|
||||
a medal-colored step. */
|
||||
.podium {
|
||||
list-style: none; margin: 8px auto 0; padding: 0; max-width: 860px;
|
||||
display: grid; grid-template-columns: 1fr 1.22fr 1fr; gap: 0 22px; align-items: end;
|
||||
}
|
||||
.podium--2 { grid-template-columns: 1fr 1.22fr; max-width: 580px; }
|
||||
.podium--1 { grid-template-columns: minmax(0, 300px); justify-content: center; }
|
||||
.podium-spot { position: relative; display: flex; flex-direction: column; min-width: 0; --medal: var(--gold); }
|
||||
.podium-spot--1 { order: 2; }
|
||||
.podium-spot--2 { order: 1; --medal: var(--silver); }
|
||||
.podium-spot--3 { order: 3; --medal: var(--bronze); }
|
||||
.podium--1 .podium-spot--1 { order: 0; }
|
||||
.podium-card { align-items: center; text-align: center; gap: 12px; padding: 0 4px 14px; }
|
||||
.podium-card .item-art { width: 100%; box-shadow: var(--shadow); }
|
||||
.podium-spot--1 .item-art { box-shadow: 0 0 0 3px var(--medal), var(--shadow); }
|
||||
.podium-card .item-body { align-items: center; width: 100%; }
|
||||
.podium-card .item-title { font-size: 16px; }
|
||||
.podium-spot--1 .item-title { font-size: 18px; font-weight: 700; }
|
||||
.podium-card .item-tags { justify-content: center; }
|
||||
.podium-step {
|
||||
display: grid; place-items: center; border-radius: 10px 10px 0 0;
|
||||
border-top: 3px solid var(--medal);
|
||||
background: linear-gradient(to bottom, color-mix(in srgb, var(--medal) 26%, var(--surface)), color-mix(in srgb, var(--medal) 4%, var(--bg)));
|
||||
font: 800 30px/1 var(--font-display); color: var(--medal); font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.podium-spot--1 .podium-step { height: 86px; font-size: 40px; }
|
||||
.podium-spot--2 .podium-step { height: 60px; }
|
||||
.podium-spot--3 .podium-step { height: 42px; font-size: 26px; }
|
||||
.podium + .more, .podium + .more-all { margin-top: 0; border-top: 1px solid var(--border); }
|
||||
@media (max-width: 640px) {
|
||||
/* #1 on its own row, #2 and #3 side by side beneath it. */
|
||||
.podium, .podium--2 { grid-template-columns: 1fr 1fr; gap: 18px 14px; }
|
||||
.podium-spot--1 { order: 0; grid-column: 1 / -1; justify-self: center; width: min(100%, 230px); }
|
||||
.podium-spot--2 { order: 1; }
|
||||
.podium-spot--3 { order: 2; }
|
||||
/* Short, equal steps so every spot still shows its rank. */
|
||||
.podium-spot .podium-step { height: 34px; font-size: 20px; border-radius: 8px; }
|
||||
.podium-card { padding-bottom: 10px; }
|
||||
}
|
||||
|
||||
/* "Show N more" under a podium: the browser's own <details>, so it works
|
||||
without JavaScript. */
|
||||
.more { padding-top: 18px; }
|
||||
.more > summary {
|
||||
list-style: none; display: flex; align-items: center; gap: 8px; width: fit-content; margin: 0 auto;
|
||||
padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
|
||||
color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
|
||||
transition: color 0.15s, border-color 0.15s;
|
||||
}
|
||||
.more > summary::-webkit-details-marker { display: none; }
|
||||
.more > summary:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
|
||||
.more > summary .icon { transition: transform 0.2s; }
|
||||
.more-open, .more[open] .more-closed { display: none; }
|
||||
.more[open] .more-open { display: inline; }
|
||||
.more[open] > summary { margin-bottom: 16px; }
|
||||
.more[open] > summary .icon { transform: rotate(180deg); }
|
||||
.more-all {
|
||||
display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 16px auto 0;
|
||||
color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none;
|
||||
}
|
||||
.more-all:hover { color: var(--accent); }
|
||||
.podium + .more-all { padding-top: 16px; width: 100%; }
|
||||
/* On a list page, pages past the first only make sense once the rest is open. */
|
||||
.list-body:has(.ranked--podium details:not([open])) .pager { display: none; }
|
||||
|
||||
/* ---------- style: spotlight ---------- */
|
||||
.spotlight {
|
||||
position: relative; overflow: hidden; isolation: isolate; margin-bottom: 14px;
|
||||
display: grid; grid-template-columns: minmax(150px, 250px) 1fr; gap: 30px; align-items: center;
|
||||
padding: 26px; border-radius: calc(var(--radius) + 8px); border: 1px solid var(--border); background: var(--surface);
|
||||
}
|
||||
.aspect-square .spotlight { grid-template-columns: minmax(150px, 270px) 1fr; }
|
||||
.spotlight-bg { position: absolute; inset: 0; z-index: -1; }
|
||||
.spotlight-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.4); filter: blur(50px) saturate(1.4); opacity: 0.32; }
|
||||
.spotlight-art { position: relative; }
|
||||
.spotlight-art .item-art { box-shadow: 0 0 0 3px var(--gold), var(--shadow); }
|
||||
.spotlight-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; align-items: flex-start; }
|
||||
.spotlight-rank { font: 800 46px/1 var(--font-display); color: var(--gold); }
|
||||
.spotlight-title { font-size: clamp(24px, 3.4vw, 36px); font-weight: 800; }
|
||||
.spotlight-body .item-sub { font-size: 15px; white-space: normal; }
|
||||
.spotlight-desc { color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
|
||||
.spotlight-note {
|
||||
margin: 8px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
|
||||
background: var(--accent-soft); font-size: 15px; white-space: pre-line;
|
||||
display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.spotlight-more { margin-top: 10px; }
|
||||
@media (max-width: 640px) {
|
||||
.spotlight, .aspect-square .spotlight { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
|
||||
.spotlight-art { width: min(100%, 220px); justify-self: center; }
|
||||
.spotlight-rank { font-size: 36px; }
|
||||
}
|
||||
|
||||
/* ---------- list page ---------- */
|
||||
.list-hero { position: relative; overflow: hidden; padding: 28px 0 34px; border-bottom: 1px solid var(--border); }
|
||||
.list-hero-backdrop { position: absolute; inset: 0; z-index: 0; }
|
||||
@@ -304,9 +399,9 @@ code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; bac
|
||||
.list-body { padding-top: 30px; }
|
||||
|
||||
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: calc(var(--radius) + 2px); background: var(--surface); border: 1px solid var(--border); }
|
||||
.segmented button { display: grid; place-items: center; width: 34px; height: 30px; border: 0; border-radius: calc(var(--radius) - 2px); background: none; color: var(--muted); cursor: pointer; }
|
||||
.segmented button:hover { color: var(--text); }
|
||||
.segmented button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
|
||||
.segmented a, .segmented button { display: grid; place-items: center; width: 34px; height: 30px; border: 0; border-radius: calc(var(--radius) - 2px); background: none; color: var(--muted); cursor: pointer; }
|
||||
.segmented a:hover, .segmented button:hover { color: var(--text); }
|
||||
.segmented [aria-current="true"], .segmented [aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
|
||||
|
||||
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
|
||||
.pager:empty { display: none; }
|
||||
@@ -506,6 +601,21 @@ input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px;
|
||||
.cat-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
|
||||
.cat-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.cat-option input:disabled + span { opacity: 0.45; cursor: not-allowed; }
|
||||
.style-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
||||
.style-option { position: relative; }
|
||||
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
|
||||
.style-option span {
|
||||
display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 2px; align-items: center; height: 100%;
|
||||
padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); cursor: pointer;
|
||||
transition: border-color 0.15s, background 0.15s;
|
||||
}
|
||||
.style-option .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--accent); }
|
||||
.style-option b { font-size: 14px; }
|
||||
.style-option small { color: var(--muted); font-size: 12px; line-height: 1.35; }
|
||||
.style-option span:hover { border-color: var(--accent); }
|
||||
.style-option input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
|
||||
.style-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
@media (max-width: 480px) { .style-picker { grid-template-columns: 1fr; } }
|
||||
.size-chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.size-chips button { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; font-size: 13px; font-weight: 600; }
|
||||
.size-chips button:hover { border-color: var(--accent); }
|
||||
|
||||
Reference in new issue
Block a user