diff --git a/assets/css/main.css b/assets/css/main.css index 8e564b7..970ee2d 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -198,6 +198,16 @@ input[type="search"]::-webkit-search-cancel-button { opacity: 1; } +/* ── full-image zoom overlay ── */ +.img-zoom { + position: fixed; inset: 0; z-index: 400; + background: rgba(8,6,4,.97); + display: none; place-items: center; + cursor: zoom-out; +} +.img-zoom[data-open="true"] { display: grid; } +.lb-img { cursor: zoom-in; } + /* ── scrollbar ── */ ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 0; } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7d20e86..f62e835 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,15 +1,37 @@ {{ define "main" }} {{- $issue := index (.Params.issues | default (slice "01")) 0 }} {{- $issueURL := printf "/issues/%s/" $issue }} +{{- $img := .Resources.GetMatch "*.png" }} +{{- $cardSrc := "" }} +{{- if $img }}{{- $c := $img.Resize "900x1350 webp" }}{{- $cardSrc = $c.RelPermalink }}{{- end }} + № {{ $issue }} · {{ index (.Params.categories | default (slice "Plate")) 0 }} {{ .Title }} - + {{ .Params.description }} - Return to issue → + + + ← Return to issue + + {{- if $cardSrc }} + + + + + View full image + + {{- end }} + + {{/* Pure image zoom — opened by hero button or clicking the lightbox main image */}} + + + + + + + + +
+
{{ .Params.description }} - Return to issue →