Add a timeline page grouping photos by day
New /timeline/ page renders photos grouped into consecutive same-day runs (ISO date heading plus per-day count), reusing the square grid. groupByDay collapses the newest-first photo list; the page is not paginated. Linked from the profile header.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Timeline · Photo Gallery</title>
|
||||
<link rel="stylesheet" href="{{.FontsURL}}">
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<style>:root { --serif: '{{.SerifFamily}}', Georgia, serif; --mj: '{{.MlFamily}}', sans-serif; }</style>
|
||||
<link rel="alternate" type="application/atom+xml" href="/feed.xml" title="Photo Feed">
|
||||
</head>
|
||||
<body>
|
||||
<header class="profile-hdr">
|
||||
<div class="profile-inner">
|
||||
<div class="avatar-ring">
|
||||
<span class="avatar-initials">{{.Initial}}</span>
|
||||
</div>
|
||||
<div class="pinfo">
|
||||
<h1>{{.Author}}</h1>
|
||||
<p class="handle">{{.Handle}}</p>
|
||||
<p class="pcount"><strong>{{.Total}}</strong> posts</p>
|
||||
<a href="/" class="rss-a">← Grid</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="grid-wrap">
|
||||
{{range .Groups}}
|
||||
<section class="tl-day">
|
||||
<h2 class="tl-date">{{.Label}}<span class="tl-count">{{.Count}}</span></h2>
|
||||
<div class="pgrid">
|
||||
{{range .Photos}}
|
||||
<a href="/photo/{{.Slug}}/" class="ptile">
|
||||
<img src="/{{.Thumb}}" alt="{{.Caption}}" loading="lazy">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</section>
|
||||
{{end}}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
© 2000–{{.Year}} {{.Author}}. All rights reserved.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user