d269c8b1b4
Photo detail page previously showed a square crop of the source image. Now generate an aspect-preserved medium JPEG (longest side 1600, quality 88) and display that on the detail page instead. The original file is linked from a click-through on the image and from a sidebar 'Full size' download link. Also skip regeneration of images/thumbs/medium when the destination is already at least as new as the source, so a rebuild triggered by editing one sidecar (or restarting the service) no longer redecodes and rescales every photo.
33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{.Photo.Caption}}</title>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Vollkorn:ital,wght@0,400;0,600;0,700;1,400&family=Manjari:wght@100;400;700&display=swap">
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<link rel="alternate" type="application/atom+xml" href="/feed.xml" title="Photo Feed">
|
|
</head>
|
|
<body>
|
|
<div class="photo-page">
|
|
<a href="/" class="back-btn">← Back</a>
|
|
<div class="dlayout">
|
|
<div class="dimg-wrap">
|
|
<a href="/{{.Photo.File}}" target="_blank" rel="noopener">
|
|
<img src="/{{.Photo.Medium}}" alt="{{.Photo.Caption}}">
|
|
</a>
|
|
</div>
|
|
<div class="dsidebar">
|
|
<div class="dauthor">
|
|
<div class="mini-avatar"><span>A</span></div>
|
|
<span class="dauthor-name">Ashik Salahudeen</span>
|
|
</div>
|
|
<p class="dcaption">{{.Photo.Caption}}</p>
|
|
<p class="ddate">{{.Photo.Date.Format "Jan 02, 2006"}}</p>
|
|
<p class="dfull"><a href="/{{.Photo.File}}" download>↓ Full size</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|