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:
@@ -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>
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
<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=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>
|
||||
@@ -19,8 +20,8 @@
|
||||
</div>
|
||||
<div class="dsidebar">
|
||||
<div class="dauthor">
|
||||
<div class="mini-avatar"><span>A</span></div>
|
||||
<span class="dauthor-name">Ashik Salahudeen</span>
|
||||
<div class="mini-avatar"><span>{{.Initial}}</span></div>
|
||||
<span class="dauthor-name">{{.Author}}</span>
|
||||
</div>
|
||||
<p class="dcaption">{{.Photo.Caption}}</p>
|
||||
<p class="ddate">{{.Photo.Date.Format "Jan 02, 2006"}}</p>
|
||||
@@ -30,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<footer class="site-footer">
|
||||
© 2000–{{.Year}} Ashik Salahudeen. All rights reserved.
|
||||
© 2000–{{.Year}} {{.Author}}. All rights reserved.
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user