v2: global player, infinite scroll, image picker, threaded comments

This commit is contained in:
khannurien
2026-03-21 13:55:22 +00:00
parent be426eb150
commit 7c098e7c4c
48 changed files with 4346 additions and 711 deletions

View File

@@ -1,3 +1,71 @@
/* ── Markdown prose ── */
.md p {
margin: 0 0 0.7em;
}
.md p:last-child {
margin-bottom: 0;
}
.md a {
color: var(--color-accent);
text-decoration: underline;
text-underline-offset: 2px;
}
.md a:hover {
text-decoration: none;
}
.md strong { font-weight: 700; }
.md em { font-style: italic; }
.md code {
font-family: monospace;
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: 3px;
padding: 0.1em 0.35em;
font-size: 0.88em;
}
.md pre {
background: var(--color-bg);
border: 1px solid var(--color-border);
border-radius: 8px;
padding: 0.75rem 1rem;
overflow-x: auto;
margin: 0.6em 0;
}
.md pre code {
background: none;
border: none;
padding: 0;
}
.md ul, .md ol {
padding-left: 1.5em;
margin: 0.4em 0;
}
.md li { margin: 0.15em 0; }
.md blockquote {
border-left: 3px solid var(--color-border);
margin: 0.5em 0;
padding: 0.2em 0.75em;
opacity: 0.75;
}
.md h1, .md h2, .md h3,
.md h4, .md h5, .md h6 {
margin: 0.6em 0 0.2em;
font-weight: 700;
line-height: 1.25;
}
/* Compact / card mode: strip vertical spacing */
.md--inline p,
.md--inline ul,
.md--inline ol,
.md--inline pre,
.md--inline blockquote {
margin: 0;
}
.md--inline li { margin: 0; }
.md--inline ul,
.md--inline ol { padding-left: 1.2em; }
/* ── Dump detail page ── */
.dump-detail {
display: flex;
@@ -16,9 +84,21 @@
}
.dump-header-block {
display: flex;
align-items: flex-start;
gap: 1rem;
display: grid;
grid-template-columns: auto 1fr;
column-gap: 1rem;
row-gap: 0.3rem;
align-items: center;
}
.dump-title,
.dump-op {
grid-column: 2;
}
.dump-header-block .vote-btn,
.dump-header-block .btn-add-playlist {
justify-self: center;
}
.dump-header-info {
@@ -29,6 +109,7 @@
min-width: 0;
}
.dump-title {
margin: 0;
font-size: 1.5rem;
@@ -513,19 +594,17 @@
border: 2px solid var(--color-border);
border-radius: 10px;
overflow: hidden;
text-decoration: none;
color: var(--color-text);
transition: border-color 0.2s;
}
.rich-content-card:hover {
.rich-content-card:has(.rich-content-body:hover) {
border-color: var(--color-accent);
}
.rich-content-card--youtube {
border-color: var(--color-youtube);
}
.rich-content-card--youtube:hover {
.rich-content-card--youtube:has(.rich-content-body:hover) {
border-color: var(--color-youtube-hover);
}
.rich-content-card--youtube .rich-content-badge {
@@ -535,7 +614,7 @@
.rich-content-card--bandcamp {
border-color: var(--color-bandcamp);
}
.rich-content-card--bandcamp:hover {
.rich-content-card--bandcamp:has(.rich-content-body:hover) {
border-color: var(--color-bandcamp-hover);
}
.rich-content-card--bandcamp .rich-content-badge {
@@ -545,13 +624,157 @@
.rich-content-card--soundcloud {
border-color: var(--color-soundcloud);
}
.rich-content-card--soundcloud:hover {
.rich-content-card--soundcloud:has(.rich-content-body:hover) {
border-color: var(--color-soundcloud-hover);
}
.rich-content-card--soundcloud .rich-content-badge {
background: var(--color-soundcloud);
}
.rich-content-embed {
width: 100%;
display: block;
border: 2px solid var(--color-border);
border-radius: 10px;
overflow: hidden;
margin-top: 0.75rem;
}
.rich-content-embed iframe {
width: 100%;
border: none;
display: block;
}
.embed-youtube {
aspect-ratio: 16/9;
}
.embed-youtube iframe {
height: 100%;
}
.embed-soundcloud {
height: 166px;
}
.embed-bandcamp {
height: 120px;
}
/* ── Global persistent player ── */
.global-player {
position: fixed;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
width: calc(100% - 2.5rem);
max-width: 860px;
z-index: 1000;
background: var(--color-surface);
border: 2px solid var(--color-border);
border-radius: 10px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
animation: player-enter 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
transition: opacity 0.2s ease, box-shadow 0.2s ease;
}
.global-player--reduced {
opacity: 0.6;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.global-player--reduced:hover {
opacity: 1;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
}
@keyframes player-enter {
from {
transform: translateX(-50%) translateY(1.5rem);
}
to {
transform: translateX(-50%) translateY(0);
}
}
.global-player-header {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.5rem 1rem;
}
.global-player-title {
flex: 1;
font-weight: 600;
font-size: 0.9rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.global-player-body {
display: grid;
grid-template-rows: 1fr;
transition: grid-template-rows 0.3s ease;
}
.global-player--reduced .global-player-body {
grid-template-rows: 0fr;
}
.global-player-iframe-wrap {
overflow: hidden;
min-height: 0;
border-radius: 0 0 8px 8px;
}
.global-player iframe {
width: 100%;
border: none;
display: block;
}
.global-player-iframe--youtube {
aspect-ratio: 16/9;
max-height: 40vh;
}
.global-player-iframe--soundcloud {
height: 166px;
}
.global-player-iframe--bandcamp {
height: 120px;
}
.global-player.global-player--bandcamp {
max-width: 600px;
}
.feed-loading-more {
text-align: center;
padding: 1rem;
color: var(--color-text-muted);
font-size: 0.85rem;
}
body.has-player {
padding-bottom: var(--player-height, 0px);
}
body.has-player .fab-new {
bottom: calc(var(--player-height, 0px) + 1rem);
}
.rich-content-thumbnail-btn {
position: relative;
padding: 0;
border: none;
background: none;
cursor: pointer;
display: flex;
align-self: stretch;
overflow: hidden;
flex-shrink: 0;
}
.rich-content-play-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.25);
color: #fff;
font-size: 1.75rem;
transition: background 0.18s ease;
}
.rich-content-thumbnail-btn:hover .rich-content-play-overlay {
background: rgba(0, 0, 0, 0.5);
}
.rich-content-thumbnail {
width: 180px;
min-width: 180px;
@@ -562,6 +785,8 @@
.rich-content-body {
display: flex;
flex-direction: column;
text-decoration: none;
color: var(--color-text);
gap: 0.4rem;
padding: 0.9rem 1.1rem;
flex: 1;
@@ -735,6 +960,54 @@
}
/* ── Avatar edit overlay ── */
/* ── ImagePicker (reusable clickable cover image) ── */
.img-picker {
position: relative;
flex-shrink: 0;
cursor: pointer;
outline: none;
}
.img-picker-img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
border: 1px solid var(--color-border);
}
.img-picker-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
border: 2px dashed var(--color-border);
background: var(--color-bg);
color: var(--color-text);
font-size: 1.5rem;
opacity: 0.4;
box-sizing: border-box;
}
.img-picker-overlay {
position: absolute;
inset: 0;
background: var(--color-overlay);
color: var(--color-on-accent);
font-size: 1.1rem;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.15s;
}
.img-picker:hover .img-picker-overlay,
.img-picker:focus-visible .img-picker-overlay {
opacity: 1;
}
.profile-avatar-wrapper {
position: relative;
flex-shrink: 0;
@@ -764,13 +1037,12 @@
display: flex;
align-items: center;
gap: 1.5rem;
margin-bottom: 2rem;
}
.profile-columns {
display: grid;
grid-template-columns: 1fr;
gap: 0;
gap: 1.5rem;
}
@media (min-width: 900px) {
@@ -781,9 +1053,7 @@
}
}
.profile-section {
margin-bottom: 2.5rem;
}
.profile-section {}
.profile-section ul {
list-style: none;
@@ -881,24 +1151,23 @@
/* ── Shared layout ── */
.page-shell {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.page-content {
flex: 1;
width: 100%;
max-width: 860px;
margin: 0 auto;
padding: 2rem 1.25rem;
padding: 2rem 1.25rem 0;
box-sizing: border-box;
animation: page-enter 0.2s ease both;
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.page-content--centered {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 2.5rem;
}
@@ -1138,6 +1407,10 @@
border-radius: 0 0 12px 12px;
}
.dump-edit-refresh {
margin-top: 0.75rem;
}
.dump-form {
display: flex;
flex-direction: column;
@@ -1252,7 +1525,6 @@
/* ── Index page ── */
.index-page {
min-height: 100vh;
display: flex;
flex-direction: column;
animation: page-enter 0.2s ease both;
@@ -1354,10 +1626,21 @@
}
/* ── Dump feed ── */
@keyframes card-enter {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.dump-feed {
list-style: none;
margin: 0;
padding: 1rem 1.25rem;
padding: 1rem 1.25rem 0;
display: flex;
flex-direction: column;
gap: 1rem;
@@ -1367,6 +1650,10 @@
align-self: center;
}
.dump-feed > li {
animation: card-enter 0.2s ease both;
}
/* ── Shared card skin (dump-card + playlist-card) ── */
.dump-card,
.playlist-card {
@@ -1493,8 +1780,16 @@
margin-top: 0.2rem;
}
.dump-card-meta {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.2rem;
}
.dump-card-date {
display: block;
margin-top: 0;
}
.playlist-card-meta {
@@ -1587,6 +1882,21 @@
flex-direction: column;
}
.modal-card--wide {
max-width: 600px;
}
.dump-create-success {
margin-bottom: 1rem;
font-size: 0.95rem;
color: var(--color-text-muted);
}
.dump-create-success a {
color: var(--color-accent);
font-weight: 600;
}
.confirm-modal {
max-width: 340px;
padding: 1.5rem 1.25rem 1.25rem;
@@ -1733,7 +2043,6 @@
background: var(--color-surface);
border-radius: 12px;
padding: 1.25rem;
margin-bottom: 1rem;
}
.playlist-detail-header-top {
@@ -1772,10 +2081,24 @@
opacity: 0.6;
}
/* ── Playlist edit button ── */
.playlist-edit-btn {
margin-left: auto;
/* ── Playlist header inline edit ── */
.playlist-detail-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.playlist-header-actions {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0.4rem;
}
.playlist-edit-btn {
background: none;
border: 1px solid var(--color-border-subtle);
border-radius: 6px;
@@ -1793,19 +2116,6 @@
color: var(--color-accent);
}
/* ── Playlist edit form ── */
.playlist-edit-form {
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px solid var(--color-border-subtle);
}
.playlist-edit-fields {
display: flex;
flex-direction: column;
gap: 0.6rem;
}
.playlist-edit-input,
.playlist-edit-textarea {
background: var(--color-bg);
@@ -1813,43 +2123,32 @@
border-radius: 8px;
color: var(--color-text);
font-size: 0.95rem;
padding: 0.5rem 0.75rem;
padding: 0.4rem 0.65rem;
font-family: inherit;
resize: vertical;
width: 100%;
box-sizing: border-box;
outline: none;
transition: border-color 0.2s;
}
.playlist-edit-textarea {
resize: none;
overflow: hidden;
line-height: 1.5;
}
.playlist-edit-input {
font-size: 1.1rem;
font-weight: 700;
}
.playlist-edit-input:focus,
.playlist-edit-textarea:focus {
border-color: var(--color-accent);
}
.playlist-edit-toggle {
align-self: flex-start;
}
.playlist-edit-image-row {
display: flex;
align-items: center;
gap: 0.75rem;
}
.playlist-edit-img-preview {
width: 56px;
height: 56px;
object-fit: cover;
border-radius: 6px;
border: 1px solid var(--color-border);
display: block;
}
.playlist-edit-actions {
display: flex;
gap: 0.5rem;
margin-top: 0.75rem;
.playlist-detail-meta .playlist-edit-toggle {
opacity: 1;
}
/* ── Playlist dump list ── */
@@ -1927,18 +2226,23 @@
/* ── Add to playlist button (dump detail) ── */
.btn-add-playlist {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.25rem 0.6rem;
border: 2px solid var(--color-border);
border-radius: 8px;
background: none;
border: none;
cursor: pointer;
color: var(--color-text);
font-size: 0.9rem;
opacity: 0.7;
padding: 0;
transition: opacity 0.15s, color 0.15s;
font-size: 0.78rem;
font-weight: 600;
white-space: nowrap;
transition: border-color 0.15s, color 0.15s;
}
.btn-add-playlist:hover {
opacity: 1;
border-color: var(--color-accent);
color: var(--color-accent);
}
@@ -1948,7 +2252,6 @@
align-items: center;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1.5rem;
}
.my-playlists-title {
@@ -1972,3 +2275,302 @@
.new-playlist-toggle:hover {
opacity: 0.75;
}
/* ── Public/Private toggle ── */
.toggle-row {
display: flex;
align-items: center;
gap: 0.6rem;
cursor: pointer;
margin-bottom: 0.5rem;
}
.toggle-label {
font-size: 0.9rem;
color: var(--color-text);
user-select: none;
}
.toggle-hint {
font-size: 0.8rem;
color: var(--color-text-muted);
user-select: none;
}
.toggle-switch {
position: relative;
display: inline-flex;
align-items: center;
width: 2.4rem;
height: 1.3rem;
flex-shrink: 0;
}
.toggle-switch input {
opacity: 0;
width: 0;
height: 0;
position: absolute;
}
.toggle-thumb {
position: absolute;
inset: 0;
border-radius: 999px;
background: var(--color-text-muted);
transition: background 0.2s;
cursor: pointer;
}
.toggle-thumb::after {
content: "";
position: absolute;
left: 0.15rem;
top: 50%;
transform: translateY(-50%);
width: 1rem;
height: 1rem;
border-radius: 50%;
background: #fff;
transition: left 0.2s;
}
.toggle-switch input:checked + .toggle-thumb {
background: var(--color-accent);
}
.toggle-switch input:checked + .toggle-thumb::after {
left: calc(100% - 1.15rem);
}
/* ── Dump card comment count ── */
.dump-card-comment-count {
font-size: 0.72rem;
color: var(--color-text-muted);
}
/* ── Dump card private badge ── */
.dump-card-private-badge {
font-size: 0.68rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
padding: 0.1em 0.45em;
border-radius: 4px;
background: color-mix(in srgb, var(--color-text-muted) 18%, transparent);
color: var(--color-text-muted);
}
/* ── Comments ── */
.comment-section {
margin-top: 2.5rem;
padding-top: 1.75rem;
border-top: 2px solid var(--color-border);
}
.comment-section-title {
font-size: 0.8rem;
font-weight: 700;
color: var(--color-text-muted);
margin: 0 0 1.25rem;
text-transform: uppercase;
letter-spacing: 0.08em;
}
.comment-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.comment-node {
display: flex;
flex-direction: column;
}
.comment-node-inner {
display: flex;
gap: 0.75rem;
padding: 0.75rem 0.85rem;
border-radius: 8px;
background: var(--color-surface);
transition: background 0.12s;
}
.comment-node-inner:hover {
background: color-mix(in srgb, var(--color-surface) 80%, var(--color-accent) 20%);
}
.comment-avatar {
flex-shrink: 0;
padding-top: 1px;
}
.comment-content {
flex: 1;
min-width: 0;
}
.comment-meta {
display: flex;
align-items: baseline;
gap: 0.5rem;
margin-bottom: 0.4rem;
}
.comment-author {
font-weight: 700;
font-size: 0.85rem;
color: var(--color-accent);
text-decoration: none;
}
.comment-author:hover {
text-decoration: underline;
}
.comment-time {
font-size: 0.75rem;
color: var(--color-text-muted);
}
.comment-body {
font-size: 0.9rem;
line-height: 1.6;
color: var(--color-text);
}
.comment-actions {
display: flex;
gap: 0.25rem;
margin-top: 0.5rem;
}
.comment-action-btn {
background: none;
border: 1px solid transparent;
border-radius: 4px;
padding: 0.15rem 0.45rem;
font-size: 0.75rem;
color: var(--color-text-muted);
cursor: pointer;
font-family: inherit;
transition: color 0.1s, border-color 0.1s, background 0.1s;
}
.comment-action-btn:hover {
color: var(--color-text);
border-color: var(--color-border-subtle);
background: color-mix(in srgb, var(--color-text) 6%, transparent);
}
.comment-delete-btn:hover {
color: var(--color-danger);
border-color: color-mix(in srgb, var(--color-danger) 40%, transparent);
background: color-mix(in srgb, var(--color-danger) 10%, transparent);
}
.comment-replies {
padding-left: 1.25rem;
margin-left: 1.1rem;
margin-top: 0.35rem;
border-left: 2px solid color-mix(in srgb, var(--color-accent) 30%, transparent);
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.comment-form {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin-top: 0.6rem;
}
.comment-top-form {
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--color-surface);
border-radius: 8px;
border: 1px solid var(--color-border-subtle);
}
.comment-reply-textarea {
width: 100%;
box-sizing: border-box;
background: var(--color-bg);
border: 1px solid var(--color-border-subtle);
border-radius: 6px;
padding: 0.55rem 0.75rem;
font-family: inherit;
font-size: 0.875rem;
color: var(--color-text);
resize: vertical;
min-height: 4.5rem;
transition: border-color 0.15s, box-shadow 0.15s;
}
.comment-reply-textarea:focus {
outline: none;
border-color: var(--color-accent);
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 20%, transparent);
}
.comment-form-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.comment-submit-btn {
background: var(--color-accent);
color: #fff;
border: none;
border-radius: 6px;
padding: 0.4rem 1rem;
font-family: inherit;
font-size: 0.82rem;
font-weight: 700;
cursor: pointer;
transition: background 0.15s, opacity 0.15s;
letter-spacing: 0.02em;
}
.comment-submit-btn:not(:disabled):hover {
background: var(--color-accent-hover);
}
.comment-submit-btn:disabled {
opacity: 0.4;
cursor: default;
}
.comment-form-error {
margin: 0;
font-size: 0.8rem;
color: var(--color-danger);
}
.comment-node-inner--deleted {
opacity: 0.35;
}
.comment-node-inner--deleted:hover {
background: var(--color-surface);
}
.comment-avatar-placeholder {
border-radius: 50%;
background: var(--color-border-subtle);
}
.comment-deleted-placeholder {
font-size: 0.85rem;
font-style: italic;
color: var(--color-text-muted);
margin: 0;
padding: 0.2rem 0;
}