|
|
|
@ -25,10 +25,32 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="relative min-h-0 flex-1 overflow-hidden bg-black"> |
|
|
|
<img src="{{.Current.RawURL}}" alt="{{.Current.Filename}}" class="h-full max-h-[calc(100vh-15rem)] min-h-[18rem] w-full object-contain"> |
|
|
|
<a href="/day/{{.Date}}/images?idx={{.PrevIndex}}" class="absolute left-3 top-1/2 -translate-y-1/2 rounded-md bg-slate-950/80 px-3 py-2 text-sm font-medium text-white hover:bg-slate-900">Prev</a> |
|
|
|
<a href="/day/{{.Date}}/images?idx={{.NextIndex}}" class="absolute right-3 top-1/2 -translate-y-1/2 rounded-md bg-slate-950/80 px-3 py-2 text-sm font-medium text-white hover:bg-slate-900">Next</a> |
|
|
|
<!-- Viewer: fixed height so the image always fits without page scroll. --> |
|
|
|
<div class="relative h-[calc(100vh-18rem)] min-h-[16rem] overflow-hidden bg-black"> |
|
|
|
<!-- object-contain keeps the full image visible; the black bg fills letterbox gaps. --> |
|
|
|
<img src="{{.Current.RawURL}}" |
|
|
|
alt="{{.Current.Filename}}" |
|
|
|
class="h-full w-full object-contain"> |
|
|
|
|
|
|
|
<!-- Prev / Next overlays --> |
|
|
|
<a href="/day/{{.Date}}/images?idx={{.PrevIndex}}" |
|
|
|
class="absolute left-3 top-1/2 -translate-y-1/2 rounded-md bg-slate-950/80 px-3 py-2 text-sm font-medium text-white hover:bg-slate-900">←</a> |
|
|
|
<a href="/day/{{.Date}}/images?idx={{.NextIndex}}" |
|
|
|
class="absolute right-3 top-1/2 -translate-y-1/2 rounded-md bg-slate-950/80 px-3 py-2 text-sm font-medium text-white hover:bg-slate-900">→</a> |
|
|
|
|
|
|
|
<!-- Full-size button: opens raw image in a new tab at original resolution. --> |
|
|
|
<a href="{{.Current.RawURL}}" |
|
|
|
target="_blank" |
|
|
|
rel="noopener" |
|
|
|
title="Open full-size image" |
|
|
|
class="absolute right-3 top-3 rounded-md bg-slate-950/80 p-2 text-white hover:bg-slate-900"> |
|
|
|
<!-- expand / external-link icon --> |
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> |
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" |
|
|
|
d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4 |
|
|
|
M14 4h6m0 0v6m0-6L10 14" /> |
|
|
|
</svg> |
|
|
|
</a> |
|
|
|
</div> |
|
|
|
|
|
|
|
<script> |
|
|
|
|