Art page round 2: virtual frames, real logo, hi-res zoom, spacing/affordance polish
- Virtual frames (Walnut/Gold/Silver/None), selectable + remembered in localStorage,
built as a beveled moulding around a cream museum mat.
- Header uses the real /logo.svg wordmark; the "No ads" pill is replaced by an
account icon (the pill doesn't need to follow every page).
- Lightbox now opens a full-resolution copy that fills the screen: art._download_image
caches a hi-res {id}-full copy alongside the web-large display copy, served via
/api/art/image/{id}?size=full (image_url_large in /api/art/today).
- Centered the placard bullet separators (explicit .sep spans, equal margins).
- Image no longer shifts on hover; a quiet "Click to expand" affordance sits on the art.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,16 @@ def test_pick_caches_image_metadata_and_marks_shown(conn):
|
||||
assert not list(art.cache_dir().glob("*.tmp")) # atomic write left no temp file
|
||||
|
||||
|
||||
def test_pick_caches_full_res_for_lightbox(conn):
|
||||
conn.execute("INSERT INTO art_pool (source, object_id) VALUES ('met', 1)") # has distinct primaryImage
|
||||
conn.commit()
|
||||
a = art.pick_daily(conn, art_date="2026-06-21")
|
||||
assert a and a["object_id"] == 1
|
||||
assert list(art.cache_dir().glob("1.*")) # web-large display copy
|
||||
assert list(art.cache_dir().glob("1-full.*")) # hi-res copy for the zoom
|
||||
assert not list(art.cache_dir().glob("*.tmp"))
|
||||
|
||||
|
||||
def test_blocked_pieces_are_never_picked(conn):
|
||||
art.harvest_pool(conn)
|
||||
conn.execute("UPDATE art_pool SET blocked=1 WHERE object_id=1") # block the good one
|
||||
|
||||
Reference in New Issue
Block a user