Astro site: profile header, Flickr-style justified rows that keep each photo's aspect ratio, and a detail page per photo (date from EXIF or a YAML sidecar, optional location) that opens in a dialog from the grid. Originals are dropped from the build and CI fails if a published image still carries EXIF location or capture time. Tags release folio-<ver>.tgz and deploy it with ygg/static-server to ig.mtps.pl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
1.4 KiB
CSS
74 lines
1.4 KiB
CSS
/* PhotoDetail, also shown in the index page dialog, so loaded on every page by Base.astro */
|
|
.detail {
|
|
--meta: 340px;
|
|
display: grid;
|
|
grid-template-columns: auto var(--meta);
|
|
width: fit-content;
|
|
background: var(--bg);
|
|
}
|
|
.detail .frame {
|
|
display: grid;
|
|
place-items: center;
|
|
background: #000;
|
|
}
|
|
/* fit the viewport by aspect ratio (--r on the img), so the panel hugs the
|
|
photo whatever its shape, already before the file has loaded */
|
|
.detail .frame img {
|
|
width: min(calc(100vw - 96px - var(--meta)), calc(92vh * var(--r)));
|
|
height: auto;
|
|
aspect-ratio: var(--r);
|
|
}
|
|
.detail aside {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
border-left: 1px solid var(--line);
|
|
max-height: 92vh;
|
|
overflow: auto;
|
|
}
|
|
.detail .who {
|
|
font-weight: 600;
|
|
text-decoration: none;
|
|
}
|
|
.detail .description {
|
|
margin: 0;
|
|
white-space: pre-line;
|
|
}
|
|
.detail dl {
|
|
margin: 0;
|
|
display: grid;
|
|
grid-template-columns: auto 1fr;
|
|
gap: 4px 12px;
|
|
font-size: 13px;
|
|
}
|
|
.detail dt {
|
|
color: var(--muted);
|
|
}
|
|
.detail dd {
|
|
margin: 0;
|
|
}
|
|
.detail nav {
|
|
margin-top: auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 13px;
|
|
}
|
|
.detail nav a {
|
|
color: var(--link);
|
|
text-decoration: none;
|
|
}
|
|
@media (max-width: 900px) {
|
|
.detail {
|
|
grid-template-columns: 1fr;
|
|
width: auto;
|
|
}
|
|
.detail .frame img {
|
|
width: min(100vw, calc(80vh * var(--r)));
|
|
}
|
|
.detail aside {
|
|
border-left: 0;
|
|
max-height: none;
|
|
}
|
|
}
|