summaryrefslogtreecommitdiffstats
path: root/views/album.erb
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@jots.org>2026-05-12 14:45:00 +0000
committerKen D'Ambrosio <ken@jots.org>2026-05-12 14:45:00 +0000
commitb47fdda4fe1bf6fe90d0ba30eedac435dde7c034 (patch)
tree81f1921bedaf9e86e65d511c6bacbddd4697c7df /views/album.erb
parent67a19fed3ff7ff9a40d489863fcef432cdba0913 (diff)
Add photo counts, EXIF details, video duration badges, slideshow launcher UI
- Album cards show recursive photo count (bubbles up through sub-albums). - Lightbox info panel shows camera, aperture, shutter speed, and ISO; update.rb now extracts and stores these EXIF fields. - Video thumbnail cards show a duration badge (e.g. "1:23"). - Slideshow launcher redesigned: button on its own line, with Shuffle / Full screen / Interval options on a second line, all inside a rounded border to make the grouping clear. - Fixed album-actions alignment so Interval sits level with the checkboxes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'views/album.erb')
-rw-r--r--views/album.erb13
1 files changed, 8 insertions, 5 deletions
diff --git a/views/album.erb b/views/album.erb
index ee6e548..3dc4fdb 100644
--- a/views/album.erb
+++ b/views/album.erb
@@ -10,14 +10,16 @@
<% end %>
<h1><%= @title %></h1>
<% if @desc %><p class="album-desc"><%= @desc %></p><% end %>
- <div class="album-actions">
- <% if @rel.empty? ? @albums.any? : @entries.any? { |e| %i[image video].include?(e[:type]) } %>
- <a href="/slideshow/<%= @rel %>" id="ss-launch" data-base="/slideshow/<%= @rel %>" class="btn">Slideshow</a>
+ <% if @rel.empty? ? @albums.any? : @entries.any? { |e| %i[image video].include?(e[:type]) } %>
+ <div class="ss-launcher">
+ <a href="/slideshow/<%= @rel %>" id="ss-launch" data-base="/slideshow/<%= @rel %>" class="btn">Slideshow</a>
+ <div class="ss-opts">
<label class="ss-opt-label"><input type="checkbox" id="ss-opt-shuffle"> Shuffle</label>
<label class="ss-opt-label"><input type="checkbox" id="ss-opt-fullscreen"> Full screen</label>
<label class="ss-opt-label">Interval <input type="number" id="ss-opt-interval" value="5" min="1" max="60" step="1"> s</label>
- <% end %>
+ </div>
</div>
+ <% end %>
</div>
<% unless @albums.empty? %>
@@ -39,7 +41,7 @@
<div class="thumb-placeholder">📁</div>
<% end %>
</div>
- <div class="album-label"><%= a[:title] %></div>
+ <div class="album-label"><%= a[:title] %><% if a[:count] && a[:count] > 0 %><span class="album-count"><%= a[:count] %></span><% end %></div>
</a>
<% end %>
</div>
@@ -62,6 +64,7 @@
<div class="thumb-wrap">
<img src="/thumb/<%= file_rel %>" alt="<%= ERB::Util.html_escape(e[:title]) %>" loading="lazy">
<% if e[:type] == :video %><span class="type-badge video-badge">▶</span><% end %>
+ <% if e[:type] == :video && e[:duration] %><span class="duration-badge"><%= format_duration(e[:duration]) %></span><% end %>
<% if e[:type] == :audio %><span class="type-badge audio-badge">♪</span><% end %>
</div>
<% if e[:caption] %>