From e96bbec551c0388e972894b349413fa6ef607352 Mon Sep 17 00:00:00 2001 From: grm Date: Thu, 17 Sep 2026 21:29:44 +0300 Subject: Add custom fonts: upload WOFF2/WOFF/TTF/OTF files and pick them on the Design tab Fonts become a file kind of their own (sniffed from the bytes like images, served inline from /media), and the theme gets custom_font and custom_heading_font: a chosen file is declared as @font-face and put first in the stack, the built-in Font / Heading font choice behind it as the fallback, so there is no "custom" enum value and no invalid state. The pickers are plain selects with an upload input, no script. Fonts uploaded before this are reclassified by the migration. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- internal/web/static/dashboard.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/web/static/dashboard.css') diff --git a/internal/web/static/dashboard.css b/internal/web/static/dashboard.css index f5e0fd4..4aa0213 100644 --- a/internal/web/static/dashboard.css +++ b/internal/web/static/dashboard.css @@ -269,6 +269,11 @@ textarea.mono { font-size: 0.9em; } .pickrow .pickctl select { max-width: 24em; margin: 0 0 0.5em; } .pickrow .pickctl .upload { margin: 0.5em 0 0; font-size: 0.85em; } .pickrow .pickctl .upload input { max-width: 24em; } +/* the design page's font pickers: a select over its upload input, two to a row */ +.fontpick { flex: 1 1 16em; min-width: 12em; } +.fontpick select { max-width: 24em; margin: 0 0 0.5em; } +.fontpick .upload { margin: 0 0 0.5em; font-size: 0.85em; } +.fontpick .upload input { max-width: 24em; } .picker { position: fixed; inset: 0; z-index: 20; background: rgba(16, 24, 40, 0.45); padding: 3vh 1em; overflow: auto; } .picker-box { max-width: 860px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(16, 24, 40, 0.25); padding: 1em 1.2em; } .picker-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em; margin-bottom: 0.8em; } -- cgit v1.2.3