Make profile identity, bio and fonts configurable

The profile header, photo page byline and copyright footer previously
hardcoded the author name, handle, bio, and font choices. Move all of
these to CLI flags on the binary and matching options on the NixOS
module so the same build can serve any single-user gallery.

New surface, all with defaults matching the previous hardcoded values:
  --author       / services.photogallery.author
  --handle       / services.photogallery.handle
  --bio          / services.photogallery.bio
  --bio-alt      / services.photogallery.bioAlt   ("" to omit)
  --fonts-url    / services.photogallery.fontsURL
  --serif-family / services.photogallery.serifFamily
  --ml-family    / services.photogallery.mlFamily

Templates read the two font families from a small inline <style> that
overrides the :root variables, so the stylesheet stays fully static and
the font URL is loaded via the configured stylesheet link.

README updated to describe the new options, the medium/full-size photo
detail flow, and the EXIF-based date prefill on the upload page.
This commit is contained in:
2026-07-02 02:30:35 +02:00
parent ec42a65c5b
commit 51b082ccf4
6 changed files with 152 additions and 31 deletions
+7 -6
View File
@@ -4,21 +4,22 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Photo Gallery</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,400;0,600;0,700;1,400&family=Manjari:wght@100;400;700&display=swap">
<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">A</span>
<span class="avatar-initials">{{.Initial}}</span>
</div>
<div class="pinfo">
<h1>Ashik Salahudeen</h1>
<p class="handle">@puttaalu@inflo.ws</p>
<h1>{{.Author}}</h1>
<p class="handle">{{.Handle}}</p>
<p class="pcount"><strong>{{len .Photos}}</strong> posts</p>
<p class="pbio">Personal photo journal.<br><span class="ml">എന്തിനോ വേണ്ടി തിളയ്ക്കുന്ന സാമ്പാർ</span></p>
<p class="pbio">{{.Bio}}{{if .BioAlt}}<br><span class="ml">{{.BioAlt}}</span>{{end}}</p>
<a href="/feed.xml" class="rss-a">
<svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" aria-hidden="true">
<circle cx="2.5" cy="11.5" r="1.5"/>
@@ -44,7 +45,7 @@
</main>
<footer class="site-footer">
© 2000{{.Year}} Ashik Salahudeen. All rights reserved.
© 2000{{.Year}} {{.Author}}. All rights reserved.
</footer>
</body>
</html>