DC 1'
+ end
+
def test_root_varies_on_language
get '/'
assert_equal 'Accept-Language', last_response.headers['Vary']
diff --git a/views/bingo/_dc_incidents.erb b/views/bingo/_dc_incidents.erb
new file mode 100644
index 0000000..63f78f7
--- /dev/null
+++ b/views/bingo/_dc_incidents.erb
@@ -0,0 +1,10 @@
+<% if dc.incidents.empty? %>
+
<%= t(:no_incidents) %>
+<% else %>
+
+ <% dc.incidents.each do |i| %>
+ - <%= kind_icon(i.kind) %> —
+ <% if i.url %><%= i.l(:title, @locale) %><% else %><%= i.l(:title, @locale) %><% end %>
+ <% end %>
+
+<% end %>
diff --git a/views/bingo/_dc_meta.erb b/views/bingo/_dc_meta.erb
new file mode 100644
index 0000000..d71b859
--- /dev/null
+++ b/views/bingo/_dc_meta.erb
@@ -0,0 +1,9 @@
+
+ <%= [dc.operator, mw(dc), dc.l(:city, @locale), status_label(dc) || (dc.year && format(t(:since), dc.year))].compact.join(' · ') %>
+
+<% if dc.photo_credit || dc.info_url %>
+
+ <% if dc.photo_credit %><%= t(:photo) %>: <%= dc.photo_credit %><% end %>
+ <% if dc.info_url %> ·
<%= t(:source) %><% end %>
+
+<% end %>
diff --git a/views/bingo/dc.erb b/views/bingo/dc.erb
new file mode 100644
index 0000000..5beced5
--- /dev/null
+++ b/views/bingo/dc.erb
@@ -0,0 +1,33 @@
+<% dc = @dc %>
+
+
+
+
+ <% if (photo = photo_path(dc, 1200)) %>
<% end %>
+ <%= dc.l(:name, @locale) %>
+ <%== erb :_dc_meta, layout: false, locals: { dc: dc } %>
+ <%= dc_facts(dc).join(' ') %>
+
+ <%= t(:incidents) %>
+ <%== erb :_dc_incidents, layout: false, locals: { dc: dc } %>
+
+
+
+
+ <%= t(:back) %>
+
+
+
diff --git a/views/bingo/index.erb b/views/bingo/index.erb
index c9c85d0..2628dd3 100644
--- a/views/bingo/index.erb
+++ b/views/bingo/index.erb
@@ -33,7 +33,7 @@
<% b.cells.each_with_index do |dc, idx| %>
<% photo = photo_path(dc, 480) %>
-
<% if b.hit[idx] %>
<%= kind_icon(dc.incidents.first.kind) %>
<% end %>
-
+
<% end %>
@@ -62,7 +62,7 @@
<%= dc.l(:name, @locale) %>
-
<% end %>
diff --git a/views/bingo/layout.erb b/views/bingo/layout.erb
index f559b77..7811422 100644
--- a/views/bingo/layout.erb
+++ b/views/bingo/layout.erb
@@ -1,45 +1,45 @@
<% base = base_url %>
-<% desc = format(t(:seo_desc), hit: @board.hit.count(true), total: @board.cells.size) %>
-<% og = og_dc(@board) %>
-<% og_img = og && "#{base}/p/#{og.og_file}" %>
+<% og_img = @og && "#{base}/p/#{@og.og_file}" %>
-
<%= t(:seo_title) %>
-
-
+
<%= @title %>
+
+
-
+
<% Bingo::LOCALES.each do |l| %>
-
+
+<% end %>
+<% if @x_default %>
+
<% end %>
-
-
-
-
+
+
+
<% (Bingo::LOCALES - [@locale]).each do |l| %>
<% end %>
<% if og_img %>
-<% if og.photo_og %>
+<% if @og.photo_og %>
<% end %>
-
+
<% end %>
-
-
-
+
+
+
@@ -87,7 +87,7 @@
position: relative; aspect-ratio: 1; padding: 8px; overflow: hidden; width: 100%;
background: var(--card); border: 1px solid var(--line); border-radius: 8px;
display: flex; flex-direction: column; justify-content: space-between;
- text-align: left; color: inherit; font: inherit; cursor: pointer;
+ text-align: left; color: inherit; font: inherit; text-decoration: none; cursor: pointer;
}
.cell.photo { color: var(--on-photo); border-color: transparent; }
.cell .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
@@ -125,6 +125,17 @@
dialog h3 { margin: 0 0 4px; }
dialog .credit { font-size: 12px; color: var(--muted); margin-top: 4px; }
dialog ul { padding-left: 18px; }
+ dialog .actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
+ dialog form { margin: 0; }
+ .crumbs a { font-weight: 700; text-decoration: none; }
+ .crumbs a:hover { text-decoration: underline; }
+ .dc-page img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
+ .dc-page h1 { font-size: clamp(26px, 5vw, 38px); }
+ .dc-page.hit h1 { color: var(--hit); }
+ .dc-page .credit { font-size: 12px; color: var(--muted); margin-top: 4px; }
+ .dc-page .facts { max-width: 65ch; }
+ .dc-page ul { padding-left: 18px; }
+ .pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); }
dialog button { font: inherit; padding: 6px 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
footer { margin-top: 32px; color: var(--muted); font-size: 13px; }
footer p { margin: 0 0 4px; }
diff --git a/views/bingo/sitemap.erb b/views/bingo/sitemap.erb
index fe49fef..0c3013b 100644
--- a/views/bingo/sitemap.erb
+++ b/views/bingo/sitemap.erb
@@ -1,12 +1,16 @@
+<% @entries.each do |path_for, lastmod, x_default| %>
<% Bingo::LOCALES.each do |l| %>
- <%= base_url %>/<%= l %>
-<% if @lastmod %> <%= @lastmod.utc.iso8601 %>
+ <%= base_url %><%= path_for.(l) %>
+<% if lastmod %> <%= lastmod.utc.iso8601 %>
+<% end %>
+<% Bingo::LOCALES.each do |alt| %>
+<% end %>
+<% if x_default %>
<% end %>
-<% Bingo::LOCALES.each do |alt| %>
-<% end %>
<% end %>
+<% end %>