diff --git a/docs/schemas/gallery-api.schema.json b/docs/schemas/gallery-api.schema.json index 3dc1ac2..6ec6573 100644 --- a/docs/schemas/gallery-api.schema.json +++ b/docs/schemas/gallery-api.schema.json @@ -5,13 +5,16 @@ "date": { "type": "object", "additionalProperties": false, - "required": ["date_folder", "count", "first_at", "latest_at", "duration_ms", "cover_thumbnail_url", "has_explore"], + "required": ["date_folder", "count", "first_at", "latest_at", "duration_ms", "cover_base", "cover_fallback_active", "cover_is_custom", "cover_thumbnail_url", "has_explore"], "properties": { "date_folder": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "count": { "type": "integer", "minimum": 1 }, "first_at": { "type": ["string", "null"], "format": "date-time" }, "latest_at": { "type": ["string", "null"], "format": "date-time" }, "duration_ms": { "type": "integer", "minimum": 0 }, + "cover_base": { "type": ["string", "null"], "pattern": "^[A-Za-z0-9_-]+$" }, + "cover_fallback_active": { "type": "boolean" }, + "cover_is_custom": { "type": "boolean" }, "cover_thumbnail_url": { "type": ["string", "null"], "pattern": "^/gallery/thumb/" }, "has_explore": { "type": "boolean" } } @@ -22,7 +25,6 @@ "required": [ "base", "date_folder", - "image_url", "thumbnail_url", "width", "height", @@ -34,7 +36,6 @@ "properties": { "base": { "type": "string", "pattern": "^[A-Za-z0-9_-]+$" }, "date_folder": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, - "image_url": { "type": "string", "pattern": "^/gallery/image/" }, "thumbnail_url": { "type": "string", "pattern": "^/gallery/thumb/" }, "width": { "type": ["integer", "null"], "minimum": 1 }, "height": { "type": ["integer", "null"], "minimum": 1 }, @@ -105,20 +106,48 @@ "required": ["url", "width", "height", "updated_at"], "properties": { "url": { "type": "string", "pattern": "^/gallery/branding/logo\\.webp\\?v=" }, - "width": { "type": "integer", "minimum": 1, "maximum": 360 }, - "height": { "type": "integer", "minimum": 1, "maximum": 120 }, + "width": { "type": "integer", "minimum": 1, "maximum": 720 }, + "height": { "type": "integer", "minimum": 1, "maximum": 240 }, "updated_at": { "type": "string", "format": "date-time" } } }, + "socialGraphic": { + "type": "object", + "additionalProperties": false, + "required": ["url", "width", "height", "updated_at"], + "properties": { + "url": { "type": "string", "pattern": "^/gallery/branding/socials/[A-Za-z0-9_-]{1,64}/graphic\\.webp\\?v=" }, + "width": { "type": "integer", "minimum": 1 }, + "height": { "type": "integer", "minimum": 1 }, + "updated_at": { "type": "string", "format": "date-time" } + } + }, + "social": { + "type": "object", + "additionalProperties": false, + "required": ["id", "platform", "url"], + "properties": { + "id": { "type": "string", "pattern": "^[A-Za-z0-9_-]{1,64}$" }, + "platform": { + "type": "string", + "enum": ["website", "instagram", "tiktok", "youtube", "twitch", "facebook", "x", "threads", "bluesky", "discord", "linkedin", "reddit", "snapchat", "flickr"] + }, + "label": { "type": "string", "minLength": 1, "maxLength": 60 }, + "url": { "type": "string", "maxLength": 2048, "pattern": "^https?://" }, + "graphic": { "$ref": "#/$defs/socialGraphic" } + } + }, "branding": { "type": "object", "additionalProperties": false, "required": [ "brand_name", "gallery_title", + "show_download_button", "mode", "profile_id", "custom_profiles", + "socials", "logo", "updated_at", "active_profile", @@ -127,14 +156,43 @@ "properties": { "brand_name": { "type": "string", "minLength": 1, "maxLength": 60 }, "gallery_title": { "type": "string", "minLength": 1, "maxLength": 80 }, + "show_download_button": { "type": "boolean", "default": false }, "mode": { "type": "string", "enum": ["system", "day", "night"] }, "profile_id": { "type": "string", "pattern": "^[a-z0-9-]+$" }, "custom_profiles": { "type": "array", "items": { "$ref": "#/$defs/profile" } }, + "socials": { "type": "array", "maxItems": 32, "items": { "$ref": "#/$defs/social" } }, "logo": { "$ref": "#/$defs/logo" }, "updated_at": { "type": "string", "format": "date-time" }, "active_profile": { "$ref": "#/$defs/profile" }, "presets": { "type": "array", "minItems": 5, "items": { "$ref": "#/$defs/profile" } } } + }, + "tile": { + "type": "object", + "additionalProperties": false, + "required": ["x", "y", "width", "height", "url"], + "properties": { + "x": { "type": "integer", "minimum": 0 }, + "y": { "type": "integer", "minimum": 0 }, + "width": { "type": "integer", "minimum": 1, "maximum": 512 }, + "height": { "type": "integer", "minimum": 1, "maximum": 512 }, + "url": { "type": "string", "pattern": "^/gallery/tile/[A-Za-z0-9_-]{43}/(?:0|[1-9][0-9]*)/(?:0|[1-9][0-9]*)\\.webp$" } + } + }, + "tileView": { + "type": "object", + "additionalProperties": false, + "required": ["handle", "width", "height", "tile_size", "overlap", "columns", "rows", "tiles"], + "properties": { + "handle": { "type": "string", "pattern": "^[A-Za-z0-9_-]{43}$" }, + "width": { "type": "integer", "minimum": 1 }, + "height": { "type": "integer", "minimum": 1 }, + "tile_size": { "type": "integer", "const": 512 }, + "overlap": { "type": "integer", "const": 1 }, + "columns": { "type": "integer", "minimum": 1 }, + "rows": { "type": "integer", "minimum": 1 }, + "tiles": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/tile" } } + } } }, "oneOf": [ @@ -163,6 +221,14 @@ "branding": { "$ref": "#/$defs/branding" } } }, + { + "type": "object", + "additionalProperties": false, + "required": ["view"], + "properties": { + "view": { "$ref": "#/$defs/tileView" } + } + }, { "type": "object", "additionalProperties": false, diff --git a/services/frame-gallery/README.md b/services/frame-gallery/README.md index 0252c47..fa51c87 100644 --- a/services/frame-gallery/README.md +++ b/services/frame-gallery/README.md @@ -18,7 +18,8 @@ Use it if you want to: - Explore a day's route and jump between mapped photos. - Hide or restore photos from the gallery. - Permanently delete published gallery copies when needed. -- Customize gallery branding, colors, and logo. +- Choose each album's gallery cover. +- Customize gallery branding, logo, and visitor download controls. ## What You Use It For @@ -31,6 +32,7 @@ Common uses: - Remove unwanted photos from public view. - Restore photos that were hidden by mistake. - Match the gallery branding to your stream, event, or production. +- Control whether visitors can view and download the full gallery JPEG. - Correct camera-to-GPX clock differences and manually place unmatched photos. Photo Gallery does not receive uploads directly. Photos come from Photo Upload or Photo FTP, then @@ -76,7 +78,7 @@ On the public gallery, viewers can: - Browse available photo days. - Open one day's album. -- View photos in the selected style. +- View photos through page-bound tiles when downloads are disabled, or the full gallery JPEG when downloads are enabled. - Switch between Photos and Explore when a day has attached route data. - Select a mapped photo from its thumbnail, lightbox, map marker, or Explore photo strip. - Switch day/night mode when enabled. @@ -89,8 +91,9 @@ On the admin page, operators can: - Empty the gallery trash. - Add or remove multiple GPX sessions for one day. - Adjust camera-to-GPX timing and manually place photos that do not match a route. -- Change the gallery title, brand name, logo, and colors. -- Save custom gallery styles. +- Choose or clear a custom cover for each album. +- Change the gallery title, brand name, and logo. +- Enable or disable full gallery JPEG downloads for every public gallery. Trash is reversible. Permanent delete is not. @@ -128,6 +131,12 @@ The admin page should stay login-protected. Photo Gallery asks Photo Pipeline to hide, restore, or delete photos. It does not edit the published photo files directly. +When downloads are disabled, public lightbox photos are delivered as short-lived, page-bound tiles and +FRAME does not expose a public full-image route. When downloads are enabled, the lightbox and Download +action use the full normalized gallery JPEG; the archived camera file remains private. Tiles can still +be captured or reassembled by a determined visitor, and anything visible in a browser can be +screenshotted; this is download deterrence and archive-file protection, not image DRM. + Explore uses the camera capture clock retained in the photo sidecar, not the time FRAME processed the photo. If the camera clock and GPX clock differ, Gallery Admin can infer the coarse timezone shift and apply a fine seconds adjustment. Manual photo placements survive trash and restore; permanent photo diff --git a/services/frame-gallery/public/admin.css b/services/frame-gallery/public/admin.css index 0e9c373..f85a5d2 100644 --- a/services/frame-gallery/public/admin.css +++ b/services/frame-gallery/public/admin.css @@ -37,9 +37,11 @@ } * { box-sizing: border-box; } [hidden] { display: none !important; } +.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } body { min-height: 100vh; margin: 0; background: var(--background); } button, input, select { font: inherit; } button, a { -webkit-tap-highlight-color: transparent; } +button, a, input { transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease; } .topbar { position: sticky; z-index: 5; top: 0; min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px clamp(12px, 3vw, 36px); @@ -77,6 +79,7 @@ button, a { -webkit-tap-highlight-color: transparent; } } :root[data-theme="day"] .theme-toggle, :root[data-theme-mode="day"] .theme-toggle, .theme-toggle[aria-pressed="true"] { border-color: var(--accent); background: var(--toggle-day-bg, #fff6d5); color: var(--toggle-day-text, #8a5e00); } main { width: min(1500px, 100%); margin: 0 auto; padding: 16px clamp(10px, 3vw, 30px) 48px; } +body.settings-dirty main { padding-bottom: calc(132px + env(safe-area-inset-bottom)); } .page-heading, .section-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; } .page-heading { margin-bottom: 14px; } .page-heading p, .section-heading p { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; } @@ -89,13 +92,17 @@ h1, h2 { margin: 2px 0; } .subtabs { display: grid; gap: 7px; margin-bottom: 14px; } .subtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .section-tabs button { - min-height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; + position: relative; min-height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; } .section-tabs button[aria-selected="true"] { border-bottom-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); } .section-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } +.section-tabs button[data-dirty="true"]::after { + content: ""; position: absolute; top: 8px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); + box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 70%, transparent); +} .subtabs button { min-height: 46px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--control-text); cursor: pointer; } @@ -110,24 +117,50 @@ h1, h2 { margin: 2px 0; } .album-card.selected { border-color: var(--accent); } .album-open { display: grid; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; } .album-open img, .photo-card > img, .trash-photo > img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: var(--surface-strong); } -.album-open span, .photo-card > span, .trash-photo > span { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; } +.album-open span, .trash-photo > span { min-width: 0; display: grid; gap: 2px; padding: 9px 10px; } +.photo-details > span { min-width: 0; display: grid; gap: 2px; } .album-open strong, .photo-card strong, .trash-photo strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } +.album-actions { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; padding: 8px; border-top: 1px solid var(--border); } +.album-actions > * { min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; } .album-detail, #trash-view { margin-top: 20px; scroll-margin-top: 86px; } +.cover-management-panel { + display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--border); + border-radius: 8px; background: var(--surface); +} +.cover-management-panel > div { min-width: 0; display: grid; gap: 4px; } +.cover-management-panel p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.45; } +.cover-management-panel p[data-kind="fallback"] { color: var(--accent); } +.cover-management-panel p[data-kind="error"] { color: var(--danger); } +.cover-management-panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } +.cover-management-panel > button { flex: none; } .section-heading { margin-bottom: 12px; } .section-actions { display: flex; justify-content: end; gap: 8px; } .section-actions a { display: inline-flex; align-items: center; text-decoration: none; } -.danger-button, .restore-button, .icon-action { +.danger-button, .restore-button, .icon-action, .icon-danger-button { min-height: 39px; padding: 7px 10px; border-radius: 5px; color: var(--control-text); font-weight: 800; cursor: pointer; } .secondary-button { min-height: 39px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--control-text); font-weight: 800; cursor: pointer; } -.danger-button, .icon-action { border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 44%, var(--surface)); } +.danger-button, .icon-action, .icon-danger-button { border: 1px solid var(--danger); background: color-mix(in srgb, var(--danger) 44%, var(--surface)); } .restore-button { border: 1px solid var(--good); background: color-mix(in srgb, var(--good) 36%, var(--surface)); } +.secondary-button:hover, .secondary-button:focus-visible, .gallery-button:hover, .icon-button:hover, .icon-button:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); } +.restore-button:hover, .restore-button:focus-visible { border-color: var(--good); background: color-mix(in srgb, var(--good) 52%, var(--surface)); } +.danger-button:hover, .danger-button:focus-visible, .icon-action:hover, .icon-action:focus-visible, .icon-danger-button:hover, .icon-danger-button:focus-visible { background: color-mix(in srgb, var(--danger) 58%, var(--surface)); } +.icon-danger-button { width: 42px; height: 42px; min-height: 42px; display: grid; place-items: center; padding: 0; } +.icon-danger-button:active, .secondary-button:active, .restore-button:active { transform: translateY(1px); } .compact-button { min-height: 34px; padding: 5px 9px; } .icon-action { width: 100%; border-width: 1px 0 0; border-radius: 0; } -.photo-card > button { width: calc(100% - 16px); margin: 0 8px 8px; } +.photo-card { position: relative; } +.photo-details { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; gap: 8px; padding: 8px 8px 8px 10px; } +.photo-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; } +.cover-star { + position: absolute; z-index: 2; top: 8px; right: 8px; width: 34px; height: 34px; display: grid; place-items: center; + padding: 0; border: 1px solid var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--topbar) 88%, transparent); + color: var(--accent); font-size: 19px; line-height: 1; box-shadow: 0 5px 18px rgb(0 0 0 / 32%); +} +.cover-star svg { width: 18px; height: 18px; display: block; fill: currentColor; } .trash-list { display: grid; gap: 12px; } .trash-album { padding: 10px; } .trash-album-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; } @@ -138,24 +171,107 @@ h1, h2 { margin: 2px 0; } .trash-photo > div button { flex: 1; } .empty { min-height: 260px; display: grid; place-content: center; gap: 5px; text-align: center; color: var(--muted); } .empty strong { color: var(--text); font-size: 19px; } -.branding-form { display: grid; gap: 12px; } +.branding-form { display: grid; gap: 16px; } .field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } .field-grid label { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; } .field-grid input, .field-grid select { min-width: 0; min-height: 42px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--control-text); padding: 8px 10px; text-transform: none; font-weight: 600; } -.branding-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } +.branding-fields { grid-template-columns: 1fr; align-content: center; } .field-grid input[type="color"] { padding: 3px; cursor: pointer; } .branding-panel { - min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--border); + min-width: 0; display: grid; gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); } +.settings-section .mini-heading > div { display: grid; gap: 3px; } +.settings-section .mini-heading small { text-align: left; line-height: 1.45; } +.visitor-control-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; border-top: 1px solid var(--border); } +.visitor-control-row > div:first-child { min-width: 0; display: grid; gap: 4px; } +.visitor-control-row small { max-width: 720px; color: var(--muted); line-height: 1.45; } +.segmented-control { flex: none; display: grid; grid-template-columns: repeat(2, minmax(96px, 1fr)); padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-strong); } +.segmented-control button { min-height: 38px; padding: 6px 12px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; } +.segmented-control button[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgb(0 0 0 / 18%); } +.segmented-control button:hover, .segmented-control button:focus-visible { color: var(--text); border-color: var(--accent); } +.branding-layout { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 20px; align-items: stretch; padding-top: 14px; border-top: 1px solid var(--border); } +.logo-editor { position: relative; min-width: 0; display: grid; align-content: start; gap: 8px; } +.logo-preview-button { + position: relative; overflow: hidden; min-height: 210px; display: grid; place-items: center; padding: 14px; + border: 1px solid var(--border); border-radius: 9px; background: var(--surface-strong); color: var(--text); cursor: pointer; +} +.logo-preview-button img { width: min(100%, 320px); height: 200px; display: block; object-fit: contain; } +.logo-preview-button span { + position: absolute; inset: auto 10px 10px; padding: 8px 10px; border: 1px solid var(--accent); border-radius: 6px; + background: color-mix(in srgb, var(--topbar) 90%, transparent); color: var(--text); font-size: 12px; font-weight: 800; + opacity: 0; transform: translateY(4px); +} +.logo-preview-button:hover, .logo-preview-button:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent); } +.logo-preview-button:hover span, .logo-preview-button:focus-visible span { opacity: 1; transform: translateY(0); } +.logo-remove-button { + position: absolute; z-index: 2; top: 10px; right: 10px; width: 42px; height: 42px; display: grid; place-items: center; + padding: 0; border: 1px solid var(--danger); border-radius: 7px; background: color-mix(in srgb, var(--topbar) 88%, transparent); color: var(--danger); cursor: pointer; +} +.logo-remove-button:hover, .logo-remove-button:focus-visible { background: color-mix(in srgb, var(--danger) 26%, var(--topbar)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 24%, transparent); } +.logo-editor > small { color: var(--muted); line-height: 1.45; } +.settings-action-bar { + position: fixed; z-index: 10; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); + display: flex; align-items: center; justify-content: space-between; gap: 16px; + width: min(720px, calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right))); margin: 0; padding: 10px 12px; border: 1px solid var(--accent); + border-radius: 9px; background: color-mix(in srgb, var(--topbar) 94%, transparent); box-shadow: 0 10px 34px rgb(0 0 0 / 34%); backdrop-filter: blur(10px); +} +.settings-action-bar > span { color: var(--text); font-weight: 750; } +.settings-action-bar > span[data-kind="error"] { color: var(--danger); } +.settings-action-bar > div { flex: none; display: flex; gap: 8px; } +.socials-form, .social-admin-list { display: grid; gap: 12px; } +.social-add-fields { grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(180px, 1fr) auto; align-items: end; } +.social-add-fields > button { min-height: 42px; } +.social-form-error { margin: 0; color: var(--danger); font-weight: 750; } +.social-admin-item { + min-width: 0; display: grid; grid-template-columns: 32px 56px minmax(0, 1fr) 42px; align-items: center; gap: 10px; + padding: 0 0 12px; border-bottom: 1px solid var(--border); +} +.social-admin-item:last-child { padding-bottom: 0; border-bottom: 0; } +.social-admin-item.is-dragging { opacity: .45; } +.social-admin-item.is-drag-target { box-shadow: inset 3px 0 var(--accent); } +.social-order-controls { + overflow: hidden; display: grid; align-self: stretch; min-height: 88px; border: 1px solid var(--border); + border-radius: 7px; background: var(--surface-strong); +} +.social-order-button { + min-width: 0; min-height: 28px; display: grid; place-items: center; padding: 0; border: 0; + border-bottom: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; +} +.social-order-button:last-child { border-bottom: 0; } +.social-order-button:hover, .social-order-button:focus-visible { background: var(--surface); color: var(--accent); } +.social-order-button:disabled { opacity: .25; cursor: default; } +.social-order-button svg { width: 17px; height: 17px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } +.social-drag-handle { cursor: grab; } +.social-drag-handle:active { cursor: grabbing; } +.social-admin-graphic { position: relative; width: 56px; height: 56px; } +.social-admin-icon { + position: relative; overflow: hidden; width: 56px; height: 56px; display: grid; place-items: center; padding: 0; + border: 1px solid var(--border); border-radius: 7px; background: var(--surface-strong); color: var(--accent); cursor: pointer; +} +.social-admin-icon:hover, .social-admin-icon:focus-visible { border-color: var(--accent); } +.social-admin-icon > img { width: 100%; height: 100%; display: block; object-fit: cover; } +.social-admin-platform-icon { display: grid; place-items: center; } +.social-admin-platform-icon > svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; } +.social-graphic-badge { + position: absolute; right: 3px; bottom: 3px; width: 21px; height: 21px; display: grid; place-items: center; + border: 1px solid var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--accent); +} +.social-graphic-badge svg, .social-graphic-reset svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } +.social-graphic-reset { + position: absolute; z-index: 2; top: -7px; right: -7px; width: 24px; height: 24px; display: grid; place-items: center; + padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); cursor: pointer; +} +.social-graphic-reset:hover, .social-graphic-reset:focus-visible { border-color: var(--accent); color: var(--accent); } +.social-row-fields { grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(170px, 1fr); } +.social-row-actions { display: grid; } +.social-remove { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; } .mini-heading { display: flex; justify-content: space-between; align-items: end; gap: 10px; } .mini-heading strong { font-size: 15px; } .mini-heading small { max-width: 620px; text-align: right; } -.style-fields { display: grid; max-width: 560px; gap: 12px; align-items: start; } -.style-fields label, .preset-field { min-width: 0; display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; } .select-shell { position: relative; display: block; min-width: 0; } .select-shell::after { content: ""; position: absolute; right: 14px; top: calc(50% - 6px); width: 9px; height: 9px; @@ -166,55 +282,7 @@ h1, h2 { margin: 2px 0; } background: var(--surface-strong); color: var(--control-text); padding: 9px 40px 9px 11px; text-transform: none; font-weight: 650; } .field-label { color: var(--muted); } -.preset-select { position: relative; min-width: 0; width: 100%; max-width: 560px; } -.preset-trigger, .preset-option { - min-width: 0; width: 100%; display: grid; align-items: center; gap: 10px; - border: 1px solid var(--border); border-radius: 8px; background: var(--surface-strong); color: var(--control-text); cursor: pointer; - text-align: left; -} -.preset-trigger { min-height: 58px; grid-template-columns: 92px minmax(0, 1fr) 16px; padding: 10px; } -.preset-trigger::after { - content: ""; width: 9px; height: 9px; justify-self: end; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); - transform: translateY(-2px) rotate(45deg); -} -.preset-menu { - position: absolute; z-index: 8; top: calc(100% + 6px); left: 0; width: min(560px, 100%); - max-height: min(360px, calc(100vh - 240px)); overflow: auto; display: grid; gap: 6px; - padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--topbar); - box-shadow: 0 16px 40px rgb(0 0 0 / 28%); -} -.preset-option-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 6px; } -.preset-option-row[data-custom-profile="true"] { grid-template-columns: minmax(0, 1fr) 42px; } -.preset-option { min-height: 54px; grid-template-columns: 92px minmax(0, 1fr); padding: 9px; } -.preset-option-main[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--secondary); } -.preset-trigger strong, .preset-option strong { overflow: hidden; display: block; white-space: nowrap; text-overflow: ellipsis; } -.preset-trigger[data-default-profile="true"] strong::after, .preset-option[data-default-profile="true"] strong::after { - content: "\2605"; display: inline-block; margin-left: 6px; color: var(--accent); -} -.preset-trigger small, .preset-option small { display: block; color: var(--muted); } -.swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; } -.swatches i { height: 28px; border: 1px solid var(--border); border-radius: 5px; } -.preset-delete { - min-width: 42px; min-height: 54px; display: grid; place-items: center; border: 1px solid var(--danger); - border-radius: 8px; background: color-mix(in srgb, var(--danger) 24%, var(--surface)); color: var(--control-text); cursor: pointer; -} -.preset-delete:hover { background: color-mix(in srgb, var(--danger) 36%, var(--surface)); } -.trash-icon { - position: relative; width: 15px; height: 15px; display: block; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; -} -.trash-icon::before { - content: ""; position: absolute; left: -4px; top: -6px; width: 19px; height: 2px; border-radius: 999px; background: currentColor; -} -.trash-icon::after { - content: ""; position: absolute; left: 3px; top: -10px; width: 7px; height: 4px; border: 2px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0; -} -.logo-controls { display: flex; align-items: center; gap: 12px; } -.logo-controls img { - width: auto; max-width: min(360px, 46vw); height: auto; max-height: 120px; object-fit: contain; - padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-strong); -} -.logo-controls > div { display: grid; gap: 8px; } -.logo-controls input { max-width: 100%; color: var(--muted); } +.trash-icon { width: 18px; height: 18px; display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; } .logo-crop-dialog { width: min(980px, calc(100vw - 24px)); } .logo-crop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; } .logo-crop-stage { @@ -262,6 +330,7 @@ h1, h2 { margin: 2px 0; } .logo-ratio-inputs span { color: var(--muted); font-weight: 900; } .logo-crop-dialog:not([data-crop-mode="custom"]) .logo-ratio-inputs, .logo-crop-dialog[data-crop-mode="full"] .logo-zoom-field { display: none; } +.logo-crop-dialog[data-crop-target="social"] #logo-shape-controls { display: none; } .logo-crop-handle { position: absolute; display: none; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 4px; background: var(--surface); box-shadow: 0 1px 8px rgb(0 0 0 / 35%); @@ -287,25 +356,54 @@ h1, h2 { margin: 2px 0; } } .preset-dialog::backdrop { background: rgb(0 0 0 / 62%); } .confirm-dialog { width: min(520px, calc(100vw - 24px)); } +.confirm-dialog.has-media { width: fit-content; max-width: calc(100vw - 24px); overflow: hidden; } +.confirm-dialog.has-media .dialog-panel { width: fit-content; max-width: calc(100vw - 24px); } +.confirm-media { + width: fit-content; max-width: 100%; justify-self: center; overflow: hidden; + border: 1px solid var(--border); border-radius: 8px; background: var(--surface-strong); +} +.confirm-media:not([hidden]) { display: grid; } +.confirm-media img { + width: auto; max-width: min(920px, calc(100vw - 58px)); height: auto; max-height: max(80px, calc(100dvh - 220px)); + display: block; object-fit: contain; +} .dialog-panel { display: grid; gap: 14px; padding: 16px; } .dialog-heading p { margin: 0; color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; } .dialog-heading h2 { margin: 2px 0 0; } .dialog-copy { margin: 0; color: var(--muted); line-height: 1.45; } -.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } -.choice-grid button { - min-height: 86px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--control-text); - font-weight: 800; cursor: pointer; -} -.choice-grid button:hover { border-color: var(--accent); } .dialog-actions { display: flex; justify-content: end; gap: 8px; } -.palette-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } -.palette-group { min-width: 0; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); } -.palette-group h3 { margin: 0; font-size: 15px; } -.color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } -.color-grid label { min-width: 0; display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; } -.color-grid input { width: 100%; min-height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-strong); cursor: pointer; } button:disabled { opacity: .45; cursor: wait; } +body.cover-picker-open { overflow: hidden; } +.cover-picker { + position: fixed; z-index: 20; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; overflow: auto; + padding: calc(112px + env(safe-area-inset-top)) calc(5px + env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) calc(5px + env(safe-area-inset-left)); + border: 0; border-radius: 0; background: var(--background); color: var(--text); +} +.cover-picker::backdrop { background: var(--background); } +.cover-picker-toolbar { + position: fixed; z-index: 22; top: max(16px, env(safe-area-inset-top)); left: 50%; width: min(520px, calc(100vw - 24px)); + display: grid; justify-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; +} +.cover-picker-cancel { min-width: 160px; box-shadow: 0 8px 28px rgb(0 0 0 / 40%); backdrop-filter: blur(10px); pointer-events: auto; } +.cover-picker-status { + max-width: 100%; margin: 0; padding: 7px 10px; border: 1px solid var(--accent); border-radius: 999px; + background: color-mix(in srgb, var(--topbar) 94%, transparent); color: var(--text); font-size: 12px; font-weight: 800; + box-shadow: 0 8px 28px rgb(0 0 0 / 34%); backdrop-filter: blur(10px); text-align: center; +} +.cover-picker-status[data-kind="error"] { border-color: var(--danger); color: var(--danger); } +.cover-picker-grid { display: grid; align-content: start; gap: 5px; } +.cover-picker-row { min-width: 0; display: flex; flex-wrap: nowrap; align-items: start; gap: 5px; } +.cover-picker-photo { + position: relative; min-width: 0; overflow: hidden; display: block; padding: 0; border: 0; border-radius: 2px; + background: var(--surface-strong); cursor: pointer; +} +.cover-picker-photo img { width: 100%; height: 100%; display: block; object-fit: contain; background: var(--surface-strong); transition: filter 150ms ease, transform 150ms ease; } +.cover-picker-photo::after { content: ""; position: absolute; inset: 0; border: 2px solid transparent; pointer-events: none; transition: border-color 150ms ease, background-color 150ms ease; } +.cover-picker-photo:hover::after, .cover-picker-photo:focus-visible::after { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); } +.cover-picker-photo:hover img, .cover-picker-photo:focus-visible img { filter: brightness(1.08); transform: scale(1.01); } +.cover-picker-photo:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } + .explore-admin-page main { width: min(1700px, 100%); } .privacy-warning { position: relative; display: grid; gap: 4px; margin: 0; padding: 12px 42px 12px 14px; border: 1px solid var(--warning, #f0b429); @@ -406,6 +504,8 @@ button:disabled { opacity: .45; cursor: wait; } .explore-admin-page .page-heading { display: none; } } @media (max-width: 900px) { + .branding-layout { grid-template-columns: 1fr; } + .logo-editor { width: min(100%, 420px); justify-self: center; } .explore-admin-layout { grid-template-columns: 1fr; } .explore-admin-map { min-height: 420px; height: 58vh; } } @@ -416,24 +516,33 @@ button:disabled { opacity: .45; cursor: wait; } .page-heading, .section-heading, .trash-album-heading { align-items: stretch; display: grid; } .page-heading .status { justify-self: start; } .section-heading > button { width: 100%; } - .section-actions { display: grid; } + .section-actions { display: grid; grid-template-columns: minmax(0, 1fr) 42px; } + .cover-management-panel, .visitor-control-row { align-items: stretch; display: grid; } + .cover-management-panel > button { width: 100%; } + .segmented-control { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); } .photo-grid, .trash-photo-grid { grid-template-columns: repeat(2, calc((100% - 7px) / 2)); gap: 7px; } - .photo-card > span, .trash-photo > span { padding: 7px; font-size: 12px; } + .photo-details { gap: 6px; padding: 6px; } + .photo-details > span, .trash-photo > span { font-size: 12px; } .trash-photo > div { display: grid; padding: 0 6px; } .trash-album-heading > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .section-tabs { overflow-x: auto; } - .subtabs, .field-grid, .branding-fields, .style-fields { grid-template-columns: 1fr; max-width: none; } + .subtabs, .field-grid, .branding-fields, .social-add-fields, .social-row-fields { grid-template-columns: 1fr; max-width: none; } + .social-admin-item { grid-template-columns: 32px 56px minmax(0, 1fr) 42px; align-items: start; } + .social-order-controls { grid-column: 1; grid-row: 1 / span 2; } + .social-admin-graphic { grid-column: 2; grid-row: 1; } + .social-row-fields { grid-column: 2 / -1; grid-row: 2; } + .social-row-actions { grid-column: 4; grid-row: 1; } .mini-heading { display: grid; } .mini-heading small { text-align: left; } - .logo-controls { align-items: stretch; display: grid; } - .logo-controls img { max-width: 100%; } + .branding-panel { padding: 14px; } + .logo-preview-button { min-height: 180px; padding: 12px; } + .logo-preview-button img { width: min(100%, 280px); height: 150px; } + .settings-action-bar { align-items: stretch; display: grid; width: calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); } + .settings-action-bar > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .logo-crop-layout { grid-template-columns: 1fr; } .logo-crop-stage { min-height: min(48vh, 360px); } - .preset-trigger { grid-template-columns: 78px minmax(0, 1fr) 16px; } - .preset-option { grid-template-columns: 78px minmax(0, 1fr); } - .preset-option-row[data-custom-profile="true"] { grid-template-columns: minmax(0, 1fr) 42px; } - .palette-fields, .choice-grid, .color-grid { grid-template-columns: 1fr; } - .dialog-actions { display: grid; } + .dialog-actions > button { min-width: 0; flex: 1; } + .confirm-media img { max-width: calc(100vw - 58px); max-height: max(56px, calc(100dvh - 270px)); } .explore-admin-page .header-actions { display: grid; gap: 5px; } .explore-admin-page .header-actions .gallery-button { min-height: 34px; padding: 5px 8px; font-size: 12px; } .explore-time-fields { grid-template-columns: 1fr; } diff --git a/services/frame-gallery/public/admin.html b/services/frame-gallery/public/admin.html index 1c8c4af..8733f30 100644 --- a/services/frame-gallery/public/admin.html +++ b/services/frame-gallery/public/admin.html @@ -29,7 +29,7 @@ })(); - +
Published album
Automatic cover uses the earliest published photo.
+Public gallery branding
Public gallery preferences