- showHome(): most recent entry renders as a hero card (poster, episode/lang/position, progress bar, Resume); the rest become mini poster cards with progress + relative timestamp - history entries now persist dur (video.duration) and poster; /api/anime returns poster (parsed from the details page) - old entries without dur render without a bar (backward compatible) - browser test asserts the seeded entry, not a section header that only existed via a cross-test side effect
78 lines
4.5 KiB
CSS
78 lines
4.5 KiB
CSS
:root { --bg: #0e0f13; --card: #171821; --bd: #262833; --fg: #e8e9f0; --muted: #8a8d9c; --acc: #f97316; }
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, sans-serif; }
|
|
a { color: inherit; text-decoration: none; }
|
|
header { display: flex; gap: 1rem; align-items: center; padding: 0.8rem 1.2rem;
|
|
border-bottom: 1px solid var(--bd); position: sticky; top: 0; background: var(--bg); z-index: 1; }
|
|
.logo { font-weight: 700; font-size: 1.2rem; color: var(--acc); }
|
|
header form { flex: 1; max-width: 420px; }
|
|
button.tiny { padding: .2rem .55rem; font-size: .8rem; border-radius: 6px;
|
|
border: 1px solid var(--bd); background: var(--card); color: var(--fg); cursor: pointer; }
|
|
button.tiny.danger { border-color: #7f1d1d; color: #f87171; }
|
|
#menubox { position: relative; }
|
|
#menu-items { display: none; position: absolute; right: 0; top: calc(100% + 4px);
|
|
background: var(--card); border: 1px solid var(--bd); border-radius: 8px;
|
|
padding: .35rem; min-width: 160px; z-index: 2; }
|
|
#menubox.open #menu-items { display: block; }
|
|
#menu-items button { display: block; width: 100%; text-align: left; margin-top: .15rem; }
|
|
header #me { margin-left: auto; }
|
|
#q { width: 100%; padding: 0.5rem 0.8rem; border-radius: 8px; border: 1px solid var(--bd);
|
|
background: var(--card); color: var(--fg); }
|
|
main { padding: 1.2rem; max-width: 1100px; margin: 0 auto; }
|
|
.muted { color: var(--muted); }
|
|
.error { color: #f87171; }
|
|
h2 { margin: 0.4rem 0; }
|
|
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
|
|
.card { background: var(--card); border: 1px solid var(--bd); border-radius: 10px; overflow: hidden;
|
|
display: flex; flex-direction: column; }
|
|
.card:hover { border-color: var(--acc); }
|
|
.card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: #000; display: block; }
|
|
.card-name { padding: 0.5rem; font-size: 0.85rem; color: var(--muted); }
|
|
|
|
/* home: continue-watching hero + mini history cards */
|
|
.hero-sec { display: grid; grid-template-columns: 170px 1fr;
|
|
grid-template-areas: "img right"; gap: 1rem; margin-bottom: 1.4rem;
|
|
background: var(--card); border: 1px solid var(--bd); border-radius: 12px; padding: 1rem; }
|
|
.hero { display: contents; }
|
|
.hero img { grid-area: img; width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; background: #000; }
|
|
.right { grid-area: right; display: flex; flex-direction: column; justify-content: space-between;
|
|
gap: .45rem; min-width: 0; }
|
|
.hero-body { display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
|
|
.hero-kicker { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
|
|
.hero-body h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.btn { align-self: start; padding: .45rem 1.1rem; border-radius: 8px;
|
|
border: 1px solid var(--acc); background: var(--acc); color: #140b02; font-weight: 600; cursor: pointer; }
|
|
.bar { height: 5px; border-radius: 3px; background: var(--bd); overflow: hidden; }
|
|
.bar-fill { height: 100%; background: var(--acc); }
|
|
.bar.small { height: 4px; margin-top: .4rem; }
|
|
.grid.mini { grid-template-columns: repeat(auto-fill, minmax(140px, 170px)); }
|
|
.grid.mini .card { cursor: pointer; }
|
|
.mini-info { display: flex; flex-direction: column; padding: .5rem; }
|
|
.mini-meta { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
|
|
@media (max-width: 640px) {
|
|
.hero-sec { grid-template-columns: 1fr; grid-template-areas: "img" "right"; }
|
|
}
|
|
|
|
.detail-head { margin-bottom: 1rem; }
|
|
.synopsis { color: var(--muted); max-width: 70ch; margin: 0.3rem 0; }
|
|
|
|
.player { position: relative; }
|
|
.player video { width: 100%; max-height: 70vh; background: #000; border-radius: 10px; aspect-ratio: 16/9; }
|
|
.play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
|
|
font-size: 1.1rem; padding: 0.8rem 1.4rem; background: rgba(0, 0, 0, 0.75); }
|
|
.controls { display: flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0; }
|
|
button { background: var(--card); color: var(--fg); border: 1px solid var(--bd);
|
|
border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer; }
|
|
button:hover { border-color: var(--acc); }
|
|
|
|
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.6rem 0; }
|
|
.tab.active { border-color: var(--acc); color: var(--acc); }
|
|
|
|
.eps { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.4rem; }
|
|
.ep { position: relative; font-size: 0.9rem; }
|
|
.ep.active { border-color: var(--acc); color: var(--acc); }
|
|
.ep.filler { opacity: 0.55; }
|
|
.badge { font-size: 0.6rem; color: var(--muted); }
|
|
|