Syn4D_Gallery / style.css
Kelvin Li
Lazy load gallery videos (prioritize videos in the viewport)
2ffd837
Raw
History Blame Contribute Delete
2.79 kB
:root {
color-scheme: light;
--bg: #f7f7f4;
--panel: #ffffff;
--text: #202124;
--muted: #62656a;
--line: #d9d9d4;
--accent: #16615a;
--accent-strong: #0d4843;
--shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
* {
box-sizing: border-box;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: Arial, Helvetica, sans-serif;
}
header {
position: sticky;
top: 0;
z-index: 10;
border-bottom: 1px solid var(--line);
background: rgba(247, 247, 244, 0.96);
backdrop-filter: blur(8px);
}
.bar {
max-width: 1500px;
margin: 0 auto;
padding: 16px 20px;
display: grid;
grid-template-columns: minmax(220px, 1fr) auto;
gap: 16px;
align-items: center;
}
h1 {
margin: 0;
font-size: 22px;
font-weight: 700;
}
.meta {
margin-top: 4px;
color: var(--muted);
font-size: 13px;
}
.controls {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
align-items: center;
}
button,
select,
input {
height: 36px;
border: 1px solid var(--line);
border-radius: 6px;
background: var(--panel);
color: var(--text);
font: inherit;
font-size: 14px;
}
button {
padding: 0 12px;
cursor: pointer;
box-shadow: var(--shadow);
}
button.primary {
border-color: var(--accent);
background: var(--accent);
color: #ffffff;
}
button.primary:hover {
background: var(--accent-strong);
}
select {
min-width: 180px;
padding: 0 8px;
}
input {
width: 96px;
padding: 0 8px;
}
main {
max-width: 1500px;
margin: 0 auto;
padding: 18px 20px 32px;
}
.status {
margin: 0 0 14px;
color: var(--muted);
font-size: 14px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 14px;
}
.card {
overflow: hidden;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--panel);
box-shadow: var(--shadow);
}
video {
display: block;
width: 100%;
aspect-ratio: 16 / 9;
background: #111;
object-fit: contain;
}
video:not(.is-loaded) {
background:
linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
#111;
}
.card-body {
padding: 10px 11px 12px;
}
.scene {
font-size: 14px;
font-weight: 700;
line-height: 1.25;
}
.name {
margin-top: 4px;
color: var(--muted);
font-size: 13px;
line-height: 1.3;
overflow-wrap: anywhere;
}
.path {
display: block;
margin-top: 8px;
color: var(--muted);
font-family: Menlo, Consolas, monospace;
font-size: 11px;
line-height: 1.35;
overflow-wrap: anywhere;
text-decoration: none;
}
.path:hover {
color: var(--accent);
text-decoration: underline;
}
@media (max-width: 760px) {
.bar {
grid-template-columns: 1fr;
}
.controls {
justify-content: flex-start;
}
select {
min-width: 100%;
}
}