Skip to content

Commit 8275d83

Browse files
danlexclaude
andcommitted
Wider gallery layout + larger thumbnails + live nav previews
Gallery page: - Grid max-width: 1140px → 1600px (1900px on ultrawide) - Card min-width: 340px → 420px (450px on ultrawide) - Thumbnail aspect ratio: 16:9 → 4:3 (taller, more visible) - Filters and pagination also widened to 1600px Animation page navigation: - Prev/Next links now show live iframe thumbnail previews of the adjacent animation (scaled to 80x50px via CSS transform) - Labels show direction ("← Previous" / "Next →") and animation name - Larger click targets with thumbnail + text layout Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4649ec6 commit 8275d83

2 files changed

Lines changed: 73 additions & 6 deletions

File tree

index.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,14 @@
117117
}
118118
.grid {
119119
display: grid;
120-
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
121-
gap: 28px;
122-
max-width: 1140px;
120+
grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
121+
gap: 32px;
122+
max-width: 1600px;
123123
width: 100%;
124124
}
125+
@media (min-width: 1800px) {
126+
.grid { max-width: 1900px; grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); }
127+
}
125128
.card {
126129
position: relative;
127130
border: 1px solid rgba(255,255,255,0.05);
@@ -142,7 +145,7 @@
142145
.card:hover .play-hint { opacity: 1; }
143146
.card-preview {
144147
width: 100%;
145-
aspect-ratio: 16/9;
148+
aspect-ratio: 4/3;
146149
position: relative;
147150
overflow: hidden;
148151
background: #000;
@@ -229,7 +232,7 @@
229232
gap: 8px;
230233
flex-wrap: wrap;
231234
justify-content: center;
232-
max-width: 1140px;
235+
max-width: 1600px;
233236
width: 100%;
234237
margin-bottom: 40px;
235238
}
@@ -263,7 +266,7 @@
263266
gap: 6px;
264267
justify-content: center;
265268
margin-top: 40px;
266-
max-width: 1140px;
269+
max-width: 1600px;
267270
width: 100%;
268271
flex-wrap: wrap;
269272
}

shared-ui.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,73 @@
4646
border-color: rgba(255,255,255,0.06) !important;
4747
box-shadow: 0 4px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.03);
4848
}
49+
/* Enhanced prev/next navigation */
50+
.page-nav a {
51+
display: flex !important;
52+
align-items: center !important;
53+
gap: 10px !important;
54+
max-width: 280px !important;
55+
padding: 8px 14px !important;
56+
}
57+
.page-nav a .nav-thumb {
58+
width: 80px;
59+
height: 50px;
60+
border-radius: 6px;
61+
overflow: hidden;
62+
flex-shrink: 0;
63+
background: rgba(255,255,255,0.03);
64+
border: 1px solid rgba(255,255,255,0.06);
65+
}
66+
.page-nav a .nav-thumb iframe {
67+
width: 320px;
68+
height: 200px;
69+
border: none;
70+
transform: scale(0.25);
71+
transform-origin: top left;
72+
pointer-events: none;
73+
}
74+
.page-nav a .nav-label {
75+
display: flex;
76+
flex-direction: column;
77+
gap: 2px;
78+
overflow: hidden;
79+
}
80+
.page-nav a .nav-dir {
81+
font-size: 8px;
82+
letter-spacing: 2px;
83+
color: rgba(255,255,255,0.2);
84+
}
85+
.page-nav a .nav-name {
86+
font-size: 10px;
87+
letter-spacing: 1px;
88+
color: rgba(255,255,255,0.4);
89+
overflow: hidden;
90+
text-overflow: ellipsis;
91+
white-space: nowrap;
92+
}
93+
.page-nav a:hover .nav-name {
94+
color: rgba(255,255,255,0.7);
95+
}
4996
`;
5097
document.head.appendChild(visualStyle);
5198

99+
// Enhance prev/next navigation with thumbnails
100+
if (!document.querySelector('.grid')) {
101+
document.querySelectorAll('.page-nav a').forEach(link => {
102+
const href = link.getAttribute('href');
103+
const isLeft = link === link.parentElement.firstElementChild;
104+
const name = href.replace('.html', '').replace(/-/g, ' ').replace(/\b\w/g, c => c.toUpperCase());
105+
const arrowHtml = link.querySelector('.nav-arrow')?.outerHTML || '';
106+
107+
// Create thumbnail iframe (loads the actual animation as a tiny preview)
108+
link.innerHTML = isLeft
109+
? `<div class="nav-thumb"><iframe src="${href}" loading="lazy" tabindex="-1"></iframe></div>
110+
<div class="nav-label"><span class="nav-dir">${arrowHtml} Previous</span><span class="nav-name">${name}</span></div>`
111+
: `<div class="nav-label"><span class="nav-dir">Next ${arrowHtml}</span><span class="nav-name">${name}</span></div>
112+
<div class="nav-thumb"><iframe src="${href}" loading="lazy" tabindex="-1"></iframe></div>`;
113+
});
114+
}
115+
52116
// Add vignette overlay (doesn't affect canvas rendering or interactions)
53117
if (!document.querySelector('.grid')) { // only on animation pages, not gallery
54118
const vignette = document.createElement('div');

0 commit comments

Comments
 (0)