@acms-subir/core 0.3.31 → 0.3.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/cli/main.mjs +1 -1
- package/cli/migrations.generated.mjs +35 -2
- package/docs/mobile.md +7 -3
- package/integration.mjs +49 -2
- package/mobile-template/client/AGENTS.md +1 -0
- package/mobile-template/recipes/announcements/files/app/announcements/[id].tsx +43 -0
- package/mobile-template/recipes/announcements/files/app/announcements/index.tsx +155 -0
- package/mobile-template/recipes/announcements/files/components/AnnouncementBanners.tsx +47 -0
- package/mobile-template/recipes/announcements/files/components/AnnouncementIcon.tsx +21 -0
- package/mobile-template/recipes/announcements/recipe.json +19 -0
- package/package.json +1 -1
- package/src/components/Announcements.tsx +806 -0
- package/src/components/MobileApp.tsx +1 -1
- package/src/layouts/Admin.astro +4 -0
- package/src/layouts/Site.astro +42 -2
- package/src/lib/agent-discovery.ts +6 -2
- package/src/lib/agent.ts +5 -0
- package/src/lib/announcements/agent.ts +49 -0
- package/src/lib/announcements/api.ts +222 -0
- package/src/lib/announcements/config.ts +8 -0
- package/src/lib/announcements/migration.ts +21 -0
- package/src/lib/announcements/pages.ts +54 -0
- package/src/lib/announcements/service.ts +132 -0
- package/src/lib/announcements/store.ts +88 -0
- package/src/lib/announcements/types.ts +78 -0
- package/src/lib/announcements/words.ts +55 -0
- package/src/lib/backup/content.ts +5 -1
- package/src/lib/mobile/config.mjs +18 -2
- package/src/lib/mobile/locale.ts +2 -0
- package/src/lib/mobile/openapi.ts +6 -2
- package/src/lib/mobile/schemas.ts +10 -3
- package/src/lib/mobile/site.ts +8 -3
- package/src/lib/push/api.ts +12 -8
- package/src/lib/push/config.ts +3 -1
- package/src/lib/push/service.ts +40 -12
- package/src/lib/push/store.ts +20 -7
- package/src/lib/push/types.ts +5 -3
- package/src/lib/repo/migrations.ts +4 -0
- package/src/lib/repo/sql.ts +6 -0
- package/src/lib/repo/types.ts +5 -0
- package/src/lib/scheduler.ts +3 -0
- package/src/lib/schema.ts +1 -0
- package/src/pages/admin/announcements.astro +18 -0
- package/src/pages/admin/integrations.astro +2 -1
- package/src/pages/admin/settings.astro +2 -0
- package/src/pages/announcements/[id].astro +35 -0
- package/src/pages/announcements/index.astro +61 -0
- package/src/pages/api/announcements.ts +32 -0
- package/src/pages/api/v1/announcements/[id].ts +7 -0
- package/src/pages/api/v1/announcements/index.ts +8 -0
- package/src/pages/api/webhooks/docs.ts +2 -0
- package/src/styles/announcements-site.css +32 -0
- package/src/styles/announcements.css +210 -0
- package/src/styles/site.css +5 -0
- package/src/virtual.d.ts +2 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/* Admin → Announcements island. Scoped under .an; admin.css tokens only, except
|
|
2
|
+
the lock-screen and website-banner previews, which show a phone and the
|
|
3
|
+
public site (fixed device/site colours, like mobile-app.css). Kind colours
|
|
4
|
+
reuse the status tokens; red is for urgent only. No pills: statuses are
|
|
5
|
+
coloured text, controls 8–10px rects. */
|
|
6
|
+
.an { display: flex; flex-direction: column; gap: 16px; }
|
|
7
|
+
.an .card + .card { margin-top: 0; }
|
|
8
|
+
.an code { font-family: ui-monospace, 'SF Mono', monospace; font-size: 12px; overflow-wrap: anywhere; }
|
|
9
|
+
.an [data-kind='event'] { --an-c: var(--blue); --an-bg: var(--blue-soft); }
|
|
10
|
+
.an [data-kind='registration'] { --an-c: var(--green); --an-bg: var(--green-soft); }
|
|
11
|
+
.an [data-kind='help'] { --an-c: var(--amber); --an-bg: var(--amber-soft); }
|
|
12
|
+
.an [data-kind='info'] { --an-c: var(--text-2); --an-bg: var(--sel); }
|
|
13
|
+
.an [data-kind='urgent'] { --an-c: var(--red); --an-bg: var(--red-soft); }
|
|
14
|
+
|
|
15
|
+
/* skeleton */
|
|
16
|
+
.an-skel { display: grid; gap: 12px; }
|
|
17
|
+
.an-skel i { display: block; height: 44px; border-radius: var(--r-lg); background: var(--panel-2); animation: an-pulse 1.2s ease-in-out infinite alternate; }
|
|
18
|
+
.an-skel i:nth-child(2) { height: 320px; }
|
|
19
|
+
.an-skel i:nth-child(3) { height: 20px; width: 50%; }
|
|
20
|
+
@keyframes an-pulse { to { opacity: 0.45; } }
|
|
21
|
+
@media (prefers-reduced-motion: reduce) { .an-skel i { animation: none; } }
|
|
22
|
+
|
|
23
|
+
/* flash (an always-present live region; no gap while empty) */
|
|
24
|
+
.an-flash .flash { margin: 0; }
|
|
25
|
+
.an > .an-flash:empty { margin-bottom: -16px; }
|
|
26
|
+
.an .flash.an-warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
|
|
27
|
+
.modal-body .an-flash .flash { margin-top: 12px; }
|
|
28
|
+
|
|
29
|
+
/* segmented controls */
|
|
30
|
+
.an-seg { max-width: 100%; }
|
|
31
|
+
.an-seg > button { font-size: 12.5px; padding: 6px 12px; min-height: 32px; }
|
|
32
|
+
.an-seg > button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
33
|
+
.an-seg > button:disabled { cursor: default; }
|
|
34
|
+
.an-seg > button:disabled:not([aria-selected='true']) { opacity: 0.5; }
|
|
35
|
+
.an-n { font-style: normal; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; margin-left: 3px; }
|
|
36
|
+
|
|
37
|
+
/* list */
|
|
38
|
+
.an-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
39
|
+
.an-list { overflow: hidden; }
|
|
40
|
+
.an-rows { list-style: none; margin: 0; padding: 0; }
|
|
41
|
+
.an-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 6px 16px; align-items: start; padding: 14px 20px; border-bottom: 1px solid var(--line); }
|
|
42
|
+
.an-row:last-child { border-bottom: 0; }
|
|
43
|
+
.an-row:hover { background: var(--hover); }
|
|
44
|
+
.an-kind { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--an-c); }
|
|
45
|
+
.an-kind i { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: var(--r-sm); background: var(--an-bg); }
|
|
46
|
+
.an-kind svg { width: 14px; height: 14px; }
|
|
47
|
+
.an-row-main { min-width: 0; }
|
|
48
|
+
.an-row-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
|
|
49
|
+
.an-row-title.is-empty { color: var(--muted); font-weight: 500; }
|
|
50
|
+
.an-row-msg { margin: 1px 0 0; color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
51
|
+
.an-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: 12px; color: var(--muted); }
|
|
52
|
+
.an-where { display: inline-flex; gap: 4px; }
|
|
53
|
+
.an-chip { font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; line-height: 18px; }
|
|
54
|
+
.an-tone { font-weight: 600; }
|
|
55
|
+
.an-tone[data-tone='ok'] { color: var(--green); }
|
|
56
|
+
.an-tone[data-tone='warn'] { color: var(--amber); }
|
|
57
|
+
.an-tone[data-tone='bad'] { color: var(--red); }
|
|
58
|
+
.an-row-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
|
|
59
|
+
.an-empty { padding: 40px 20px 44px; }
|
|
60
|
+
.an-empty p { margin: 0; }
|
|
61
|
+
.an-foot { margin: 0 2px; line-height: 1.5; display: flex; flex-wrap: wrap; gap: 4px 16px; }
|
|
62
|
+
.an-del { margin: 0; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
|
|
63
|
+
|
|
64
|
+
/* composer: head */
|
|
65
|
+
.an-head { display: flex; flex-direction: column; gap: 4px; }
|
|
66
|
+
.an-back { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 500; color: var(--muted); padding: 6px 8px; margin-left: -8px; min-height: 32px; border-radius: var(--r-sm); cursor: pointer; }
|
|
67
|
+
.an-back:hover { color: var(--text); background: var(--hover); }
|
|
68
|
+
.an-back:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
69
|
+
.an-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
70
|
+
.an-head h2 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
|
|
71
|
+
.an-head h2:focus { outline: none; }
|
|
72
|
+
.an-status { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
|
|
73
|
+
|
|
74
|
+
/* composer: form */
|
|
75
|
+
.an-compose { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
|
|
76
|
+
.an-form { min-width: 0; }
|
|
77
|
+
.an-sec { padding: 18px 0; border-top: 1px solid var(--line); min-width: 0; }
|
|
78
|
+
.an-sec:first-child { border-top: 0; padding-top: 0; }
|
|
79
|
+
.an-sec:last-child { padding-bottom: 0; }
|
|
80
|
+
.an-fs { border: 0; padding: 0; margin: 0; min-width: 0; }
|
|
81
|
+
.an-legend { padding: 0; margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--text); }
|
|
82
|
+
.an-opt-l { font-weight: 400; color: var(--muted); }
|
|
83
|
+
.an-sec-hint { margin: -6px 0 10px; }
|
|
84
|
+
.an-after { margin: 8px 0 0; line-height: 1.45; }
|
|
85
|
+
.an-ro { margin: 0; font-size: 13.5px; color: var(--text-2); }
|
|
86
|
+
.an-bad { color: var(--red); margin: -6px 0 12px; }
|
|
87
|
+
.an-linkhint { margin: -6px 0 0; }
|
|
88
|
+
.an-sec .field:last-child { margin-bottom: 0; }
|
|
89
|
+
|
|
90
|
+
/* kind: radio cards (selected = --sel fill, like the event editor's mode cards) */
|
|
91
|
+
.an-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
92
|
+
.an-kind-opt { position: relative; flex: 1 1 104px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
|
|
93
|
+
.an-kind-opt:hover { border-color: var(--faint); }
|
|
94
|
+
.an-kind-opt.on { background: var(--sel); border-color: var(--muted); color: var(--text); }
|
|
95
|
+
.an-kind-opt:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
96
|
+
.an-kind-opt:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
|
|
97
|
+
.an-kind-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
|
|
98
|
+
.an-kind-opt i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-sm); background: var(--an-bg); color: var(--an-c); }
|
|
99
|
+
.an-kind-opt svg { width: 15px; height: 15px; }
|
|
100
|
+
.an-kind-opt span { overflow-wrap: anywhere; }
|
|
101
|
+
|
|
102
|
+
/* words */
|
|
103
|
+
.an-langs { margin-bottom: 14px; }
|
|
104
|
+
.an-field { margin-bottom: 14px; }
|
|
105
|
+
.an-field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
|
|
106
|
+
.an-field-top label { font-size: 12px; color: var(--muted); font-weight: 500; }
|
|
107
|
+
.an-count { font-style: normal; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
|
|
108
|
+
.an-count[data-near] { color: var(--amber); }
|
|
109
|
+
.an-field > small.hint { display: block; margin-top: 5px; }
|
|
110
|
+
.an-src { margin: 0 0 6px; padding: 7px 10px; border-radius: var(--r-sm); background: var(--panel-2); color: var(--text-2); font-size: 12.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; max-height: 7.5em; overflow: auto; }
|
|
111
|
+
.an-src span { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 1px; }
|
|
112
|
+
|
|
113
|
+
/* where */
|
|
114
|
+
.an-toggle { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: center; }
|
|
115
|
+
.an-toggle input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; cursor: pointer; }
|
|
116
|
+
.an-toggle label { display: flex; align-items: center; min-height: 36px; font-size: 13.5px; color: var(--text); cursor: pointer; }
|
|
117
|
+
.an-toggle small { grid-column: 2; margin: -6px 0 6px; line-height: 1.45; }
|
|
118
|
+
.an-toggle:has(input:disabled) input, .an-toggle:has(input:disabled) label { cursor: default; }
|
|
119
|
+
.an-toggle:has(input:disabled) label { color: var(--muted); }
|
|
120
|
+
|
|
121
|
+
/* who gets the push (topic choices as in Mobile app) */
|
|
122
|
+
.an-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-top: 10px; }
|
|
123
|
+
.an-opt { display: flex; align-items: center; gap: 9px; padding: 9px 11px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--panel); cursor: pointer; font-size: 13px; }
|
|
124
|
+
.an-opt:hover { background: var(--hover); }
|
|
125
|
+
.an-opt.on { background: var(--sel); color: var(--text); font-weight: 600; }
|
|
126
|
+
.an-opt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
127
|
+
.an-opt input { accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
|
|
128
|
+
.an-opt span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
129
|
+
.an-opt em { font-style: normal; font-weight: 500; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
130
|
+
.an-pace { margin: 12px 0 0; line-height: 1.45; }
|
|
131
|
+
.an-pace[data-tone='warn'] { color: var(--amber); }
|
|
132
|
+
|
|
133
|
+
/* when */
|
|
134
|
+
.an-when { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
|
|
135
|
+
.an-when input[type='datetime-local'] { display: block; margin-top: 8px; min-width: 0; max-width: 260px; }
|
|
136
|
+
:root[data-theme='dark'] .an input[type='datetime-local'] { color-scheme: dark; }
|
|
137
|
+
|
|
138
|
+
/* preview: lock screen (device colours) */
|
|
139
|
+
.an-preview { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 72px; min-width: 0; }
|
|
140
|
+
.an-preview-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; align-self: stretch; flex-wrap: wrap; }
|
|
141
|
+
.an-preview-lang { width: auto; max-width: 130px; padding: 4px 8px; font-size: 12.5px; }
|
|
142
|
+
.an-phone { width: 100%; max-width: 280px; min-height: 350px; border-radius: 42px 42px 0 0; padding: 9px 9px 0; background: #1d1c1a; box-shadow: inset 0 0 0 1px #34322e; display: flex; }
|
|
143
|
+
.an-phone.is-off { opacity: 0.6; }
|
|
144
|
+
.an-phone-screen { flex: 1; border-radius: 34px 34px 0 0; background: #33424b; color: #f7f5f2; display: flex; flex-direction: column; align-items: center; padding: 46px 11px 16px; overflow: hidden; min-width: 0; }
|
|
145
|
+
.an-clock { text-align: center; }
|
|
146
|
+
.an-clock small { display: block; font-size: 13px; font-weight: 500; opacity: 0.88; }
|
|
147
|
+
.an-clock b { display: block; font-size: 62px; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
|
|
148
|
+
.an-note { margin-top: 30px; width: 100%; background: rgb(246 245 243 / 86%); color: #1c1b19; border-radius: 18px; padding: 10px 12px 11px; box-shadow: 0 6px 18px rgb(0 0 0 / 18%); }
|
|
149
|
+
.an-note-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #5d5a55; margin-bottom: 5px; }
|
|
150
|
+
.an-appicon { width: 20px; height: 20px; border-radius: 5px; background: #fdfcfb; color: #3b3935; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 8%); }
|
|
151
|
+
.an-appicon svg { width: 13px; height: 13px; }
|
|
152
|
+
.an-appicon img { width: 100%; height: 100%; object-fit: cover; }
|
|
153
|
+
.an-appname { font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
154
|
+
.an-now { margin-left: auto; flex: 0 0 auto; }
|
|
155
|
+
/* collapsed: one line of title, two of message; expanded: everything */
|
|
156
|
+
.an-note-title { font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
|
|
157
|
+
.an-note-body { margin: 1px 0 0; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
158
|
+
.an-note.is-open .an-note-title, .an-note.is-open .an-note-body { display: block; -webkit-line-clamp: unset; overflow: visible; }
|
|
159
|
+
.an-cap { margin: 0; align-self: stretch; text-align: center; border-top: 1px solid var(--line); padding-top: 10px; }
|
|
160
|
+
|
|
161
|
+
/* preview: website banner (site colours) */
|
|
162
|
+
.an-site { align-self: stretch; }
|
|
163
|
+
.an-site-label { display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin-bottom: 6px; }
|
|
164
|
+
.an-site-bar { display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 11px; border-radius: 10px; background: #f3f1ed; color: #1c1b19; font-size: 12.5px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 7%); }
|
|
165
|
+
.an-site-bar i { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; color: #4c4841; }
|
|
166
|
+
.an-site-bar svg { width: 16px; height: 16px; }
|
|
167
|
+
.an-site-bar b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
168
|
+
.an-site-btn { flex: 0 0 auto; max-width: 45%; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
169
|
+
.an-site-x { flex: 0 0 auto; opacity: 0.55; font-size: 11px; }
|
|
170
|
+
.an-site-bar[data-kind='event'] i { color: #2f5fb3; }
|
|
171
|
+
.an-site-bar[data-kind='registration'] i { color: #127442; }
|
|
172
|
+
.an-site-bar[data-kind='help'] i { color: #93660c; }
|
|
173
|
+
.an-site-bar[data-kind='urgent'] { background: #b42318; color: #fff; box-shadow: none; }
|
|
174
|
+
.an-site-bar[data-kind='urgent'] i { color: #fff; }
|
|
175
|
+
|
|
176
|
+
/* review dialog */
|
|
177
|
+
dialog.modal.an-review { width: min(540px, calc(100vw - 32px)); }
|
|
178
|
+
.an-checks { list-style: none; margin: 0; padding: 0; }
|
|
179
|
+
.an-checks li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
|
|
180
|
+
.an-checks li:last-child { border-bottom: 0; }
|
|
181
|
+
.an-checks li[data-tone='bad'] { color: var(--red); }
|
|
182
|
+
.an-mark { font-weight: 700; text-align: center; }
|
|
183
|
+
.an-checks li[data-tone='ok'] .an-mark { color: var(--green); }
|
|
184
|
+
.an-checks li[data-tone='warn'] .an-mark { color: var(--amber); }
|
|
185
|
+
.an-checks li[data-tone='bad'] .an-mark { color: var(--red); }
|
|
186
|
+
.an-checks .btn { white-space: nowrap; }
|
|
187
|
+
|
|
188
|
+
@media (max-width: 1000px) {
|
|
189
|
+
.an-compose { grid-template-columns: 1fr; gap: 24px; }
|
|
190
|
+
.an-preview { position: static; border-top: 1px solid var(--line); padding-top: 18px; }
|
|
191
|
+
.an-phone { max-width: 260px; min-height: 300px; }
|
|
192
|
+
.an-clock b { font-size: 52px; }
|
|
193
|
+
}
|
|
194
|
+
@media (max-width: 767px) {
|
|
195
|
+
.an-bar .seg { display: flex; width: 100%; }
|
|
196
|
+
.an-bar .seg > button { flex: 1; padding: 6px 4px; min-height: 36px; }
|
|
197
|
+
.an-bar > .btn.primary { width: 100%; justify-content: center; min-height: 44px; }
|
|
198
|
+
.an-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
|
|
199
|
+
.an-row-actions { justify-content: flex-start; }
|
|
200
|
+
.an-head-row .page-actions { width: 100%; }
|
|
201
|
+
.an-head-row .page-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 44px; white-space: nowrap; }
|
|
202
|
+
.an-sec .seg { display: flex; }
|
|
203
|
+
.an-sec .seg > button { flex: 1; min-height: 36px; white-space: normal; }
|
|
204
|
+
.an-when { grid-template-columns: 1fr; }
|
|
205
|
+
.an-when input[type='datetime-local'] { max-width: none; }
|
|
206
|
+
.an-topics { grid-template-columns: 1fr; }
|
|
207
|
+
.an-toggle label { min-height: 44px; }
|
|
208
|
+
.an-checks li { grid-template-columns: 18px minmax(0, 1fr); }
|
|
209
|
+
.an-checks .btn { grid-column: 2; justify-self: start; }
|
|
210
|
+
}
|
package/src/styles/site.css
CHANGED
|
@@ -535,12 +535,17 @@ li::marker { color: var(--muted); }
|
|
|
535
535
|
background: var(--btn); color: var(--btn-ink);
|
|
536
536
|
font-size: 14px; padding: 9px 44px; text-align: center; position: relative;
|
|
537
537
|
}
|
|
538
|
+
/* hidden until its script checks it wasn't closed (display: flex would beat the attribute) */
|
|
539
|
+
.announcement-bar[hidden] { display: none; }
|
|
538
540
|
.announcement-bar a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
|
|
539
541
|
.announcement-x {
|
|
540
542
|
position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
|
|
541
543
|
background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; font-size: 12px; padding: 6px; border-radius: 6px;
|
|
542
544
|
}
|
|
543
545
|
.announcement-x:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
|
|
546
|
+
/* pinned announcements: urgent says so in words, never by colour alone */
|
|
547
|
+
.announcement-bar .ann-urgent { font-weight: 700; letter-spacing: 0.01em; }
|
|
548
|
+
.announcement-bar .ann-cta { white-space: nowrap; }
|
|
544
549
|
|
|
545
550
|
/* dynamic post-list blocks (expanded at request time) */
|
|
546
551
|
.dyn-postlist { display: grid; gap: 24px; margin: 32px 0; }
|
package/src/virtual.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare module 'virtual:acms-config' {
|
|
|
14
14
|
};
|
|
15
15
|
// resolved by integration.mjs; empty locales = i18n not configured
|
|
16
16
|
i18n: { locales: string[]; defaultLocale: string };
|
|
17
|
-
mobile?: { ios?: { teamId: string; bundleId: string; paths: string[] }; android?: { package: string; sha256CertFingerprints: string[] }; push?: { enabled: boolean; retentionDays: number }; editor?: { enabled: boolean; name: string; redirectUris: string[]; accessTokenMinutes: number; refreshTokenDays: number } };
|
|
17
|
+
mobile?: { ios?: { teamId: string; bundleId: string; paths: string[] }; android?: { package: string; sha256CertFingerprints: string[] }; push?: { enabled: boolean; retentionDays: number; topics?: Array<{ id: string; label: Record<string, string>; description: Record<string, string> }> }; editor?: { enabled: boolean; name: string; redirectUris: string[]; accessTokenMinutes: number; refreshTokenDays: number } };
|
|
18
18
|
search?: { enabled: boolean };
|
|
19
19
|
// resolved by integration.mjs; '' = pick from the environment (lib/maps/config.ts)
|
|
20
20
|
maps?: { provider: '' | 'geoapify' | 'google' | 'mapbox' | 'locationiq' | 'stadia' | 'photon' | 'nominatim' | 'pelias' };
|
|
@@ -23,6 +23,7 @@ declare module 'virtual:acms-config' {
|
|
|
23
23
|
roles?: { key: string; label: string; summary: string; admin: boolean; home: string }[];
|
|
24
24
|
permissions?: { key: string; label: string; description: string; defaults: string[]; sensitive: boolean }[];
|
|
25
25
|
members?: { enabled: boolean; base: string; notify: string[] };
|
|
26
|
+
announcements?: { enabled: boolean; base: string; pages: boolean; topics: Partial<Record<'event' | 'registration' | 'help' | 'info', string>> };
|
|
26
27
|
// resolved by integration.mjs (lib/calendar/config.ts documents the shape)
|
|
27
28
|
calendar?: {
|
|
28
29
|
enabled: boolean;
|