@acms-subir/core 0.3.3-next.20260929113209 → 0.3.4
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 +105 -0
- package/cli/common.mjs +2 -2
- package/cli/legacy.mjs +1 -1
- package/cli/main.mjs +82 -8
- package/cli/mobile-doctor.mjs +430 -0
- package/cli/mobile.mjs +315 -0
- package/cli/native-sections.mjs +168 -0
- package/cli/preview.mjs +8 -4
- package/cli/sections.mjs +188 -0
- package/cli/themes.mjs +52 -8
- package/docs/mobile.md +527 -0
- package/docs/sections.md +203 -0
- package/docs/theme-authoring.md +19 -3
- package/integration.mjs +76 -5
- package/mobile-template/client/AGENTS.md +97 -0
- package/mobile-template/client/README.md +65 -0
- package/mobile-template/client/app/_layout.tsx +56 -0
- package/mobile-template/client/app/index.tsx +21 -0
- package/mobile-template/client/app.json +21 -0
- package/mobile-template/client/components/LanguageSwitch.tsx +31 -0
- package/mobile-template/client/eas.json +21 -0
- package/mobile-template/client/env.example +3 -0
- package/mobile-template/client/gitignore +42 -0
- package/mobile-template/client/package.json +38 -0
- package/mobile-template/client/sections/index.ts +11 -0
- package/mobile-template/client/tsconfig.json +7 -0
- package/mobile-template/editor/AGENTS.md +66 -0
- package/mobile-template/editor/README.md +73 -0
- package/mobile-template/editor/app/_layout.tsx +76 -0
- package/mobile-template/editor/app/auth.tsx +13 -0
- package/mobile-template/editor/app/index.tsx +55 -0
- package/mobile-template/editor/app.json +21 -0
- package/mobile-template/editor/components/Screen.tsx +51 -0
- package/mobile-template/editor/components/SignIn.tsx +36 -0
- package/mobile-template/editor/components/TextTabs.tsx +27 -0
- package/mobile-template/editor/eas.json +21 -0
- package/mobile-template/editor/env.example +5 -0
- package/mobile-template/editor/gitignore +42 -0
- package/mobile-template/editor/lib/appearance.tsx +12 -0
- package/mobile-template/editor/lib/config.ts +17 -0
- package/mobile-template/editor/lib/format.ts +24 -0
- package/mobile-template/editor/lib/tools.ts +16 -0
- package/mobile-template/editor/package.json +40 -0
- package/mobile-template/editor/tools/README.md +2 -0
- package/mobile-template/editor/tsconfig.json +7 -0
- package/mobile-template/recipes/booking/files/app/book/[resource].tsx +57 -0
- package/mobile-template/recipes/booking/files/app/book/details.tsx +105 -0
- package/mobile-template/recipes/booking/files/app/book/index.tsx +38 -0
- package/mobile-template/recipes/booking/recipe.json +17 -0
- package/mobile-template/recipes/editor-bookings/files/app/bookings/index.tsx +113 -0
- package/mobile-template/recipes/editor-bookings/files/tools/bookings.ts +1 -0
- package/mobile-template/recipes/editor-bookings/recipe.json +8 -0
- package/mobile-template/recipes/editor-content/files/app/content/[kind]/[id].tsx +13 -0
- package/mobile-template/recipes/editor-content/files/app/content/index.tsx +76 -0
- package/mobile-template/recipes/editor-content/files/components/DocumentDetail.tsx +55 -0
- package/mobile-template/recipes/editor-content/files/tools/content.ts +1 -0
- package/mobile-template/recipes/editor-content/recipe.json +8 -0
- package/mobile-template/recipes/editor-media/files/app/media/index.tsx +73 -0
- package/mobile-template/recipes/editor-media/files/tools/media.ts +1 -0
- package/mobile-template/recipes/editor-media/recipe.json +8 -0
- package/mobile-template/recipes/editor-sections/files/app/sections/[pageId]/[sectionId].tsx +12 -0
- package/mobile-template/recipes/editor-sections/files/app/sections/index.tsx +48 -0
- package/mobile-template/recipes/editor-sections/files/components/SectionEditorPane.tsx +77 -0
- package/mobile-template/recipes/editor-sections/files/tools/sections.ts +1 -0
- package/mobile-template/recipes/editor-sections/recipe.json +8 -0
- package/mobile-template/recipes/editor-translations/files/app/translations/index.tsx +63 -0
- package/mobile-template/recipes/editor-translations/files/app/translations/review.tsx +14 -0
- package/mobile-template/recipes/editor-translations/files/components/ReviewPane.tsx +72 -0
- package/mobile-template/recipes/editor-translations/files/tools/translations.ts +1 -0
- package/mobile-template/recipes/editor-translations/recipe.json +8 -0
- package/mobile-template/recipes/editor-writer/files/app/write/[kind]/[id].tsx +132 -0
- package/mobile-template/recipes/editor-writer/files/app/write/new.tsx +61 -0
- package/mobile-template/recipes/editor-writer/files/tools/writer.ts +1 -0
- package/mobile-template/recipes/editor-writer/recipe.json +8 -0
- package/mobile-template/recipes/events/files/app/events/[slug].tsx +41 -0
- package/mobile-template/recipes/events/files/app/events/index.tsx +50 -0
- package/mobile-template/recipes/events/files/lib/addToCalendar.ts +27 -0
- package/mobile-template/recipes/events/recipe.json +15 -0
- package/mobile-template/recipes/news/files/app/news/[slug].tsx +25 -0
- package/mobile-template/recipes/news/files/app/news/index.tsx +50 -0
- package/mobile-template/recipes/news/recipe.json +13 -0
- package/mobile-template/recipes/push/files/app/notifications.tsx +64 -0
- package/mobile-template/recipes/push/files/components/PushSetup.tsx +15 -0
- package/mobile-template/recipes/push/files/lib/push.ts +15 -0
- package/mobile-template/recipes/push/recipe.json +20 -0
- package/package.json +17 -13
- package/section-library/README.md +16 -0
- package/section-library/contact/Contact.astro +49 -0
- package/section-library/contact/section.json +106 -0
- package/section-library/cta-band/CtaBand.astro +28 -0
- package/section-library/cta-band/section.json +51 -0
- package/section-library/feature-grid/FeatureGrid.astro +54 -0
- package/section-library/feature-grid/section.json +107 -0
- package/section-library/gallery/Gallery.astro +29 -0
- package/section-library/gallery/section.json +51 -0
- package/section-library/hero-banner/HeroBanner.astro +42 -0
- package/section-library/hero-banner/section.json +81 -0
- package/section-library/latest-posts/LatestPosts.astro +22 -0
- package/section-library/latest-posts/section.json +37 -0
- package/section-library/pricing/Pricing.astro +40 -0
- package/section-library/pricing/section.json +117 -0
- package/section-library/questions/Questions.astro +38 -0
- package/section-library/questions/section.json +69 -0
- package/section-library/service-times/ServiceTimes.astro +42 -0
- package/section-library/service-times/section.json +127 -0
- package/section-library/team/Team.astro +45 -0
- package/section-library/team/section.json +88 -0
- package/section-library/upcoming-events/UpcomingEvents.astro +54 -0
- package/section-library/upcoming-events/section.json +51 -0
- package/src/actions/index.ts +205 -174
- package/src/components/AiSettings.tsx +45 -5
- package/src/components/DesignManager.tsx +112 -16
- package/src/components/MobileApp.tsx +392 -0
- package/src/components/ThemeSections.astro +40 -21
- package/src/components/ThemeSectionsEditor.tsx +757 -229
- package/src/components/booking/BookingFlow.astro +6 -3
- package/src/components/calendar/BookingsHead.astro +51 -0
- package/src/components/calendar/CalendarBoard.tsx +618 -0
- package/src/components/calendar/MiniMonth.tsx +54 -0
- package/src/components/calendar/NewEventDialog.tsx +44 -0
- package/src/components/calendar/QuickAdd.tsx +263 -0
- package/src/components/calendar/RoomHolds.tsx +203 -0
- package/src/components/calendar/WhereItLands.tsx +51 -0
- package/src/components/editor/EventPanel.tsx +23 -2
- package/src/components/editor/PostEditor.tsx +206 -14
- package/src/components/import/ImportExport.tsx +4 -1
- package/src/components/import/runner.ts +1 -0
- package/src/components/sections/SectionFields.tsx +560 -0
- package/src/components/sections/SectionPicker.tsx +120 -0
- package/src/components/sections/TranslationPanel.tsx +143 -0
- package/src/components/sections/checks.ts +64 -0
- package/src/layouts/Admin.astro +11 -7
- package/src/layouts/Site.astro +136 -21
- package/src/lib/agent-discovery.ts +11 -7
- package/src/lib/agent.ts +35 -2
- package/src/lib/ai-schema.ts +5 -0
- package/src/lib/ai.ts +5 -0
- package/src/lib/api.ts +12 -0
- package/src/lib/backup/content.ts +6 -1
- package/src/lib/booking/agent.ts +3 -2
- package/src/lib/booking/approval.ts +70 -0
- package/src/lib/booking/holds.ts +120 -0
- package/src/lib/booking/service.ts +37 -3
- package/src/lib/calendar/agent-schema.ts +9 -1
- package/src/lib/calendar/agent.ts +16 -1
- package/src/lib/calendar/board.ts +171 -0
- package/src/lib/calendar/config.ts +3 -0
- package/src/lib/calendar/grid.ts +169 -0
- package/src/lib/calendar/migration.ts +16 -0
- package/src/lib/calendar/render.ts +9 -7
- package/src/lib/calendar/schedule.ts +166 -0
- package/src/lib/content-service.ts +203 -0
- package/src/lib/design-service.ts +153 -5
- package/src/lib/drafts.ts +3 -3
- package/src/lib/editor/auth.ts +264 -0
- package/src/lib/editor/bookings.ts +60 -0
- package/src/lib/editor/config.ts +25 -0
- package/src/lib/editor/documents.ts +227 -0
- package/src/lib/editor/http.ts +48 -0
- package/src/lib/editor/me.ts +30 -0
- package/src/lib/editor/migration.ts +57 -0
- package/src/lib/editor/next.ts +11 -0
- package/src/lib/editor/openapi.ts +124 -0
- package/src/lib/editor/schemas.ts +91 -0
- package/src/lib/editor/sections.ts +96 -0
- package/src/lib/editor/store.ts +184 -0
- package/src/lib/editor/token-route.ts +74 -0
- package/src/lib/editor/translations.ts +163 -0
- package/src/lib/email/accounts.ts +2 -1
- package/src/lib/email/types.ts +2 -1
- package/src/lib/home-source.ts +34 -0
- package/src/lib/i18n.ts +34 -0
- package/src/lib/import/apply.ts +31 -2
- package/src/lib/import/bundle.ts +4 -0
- package/src/lib/import/export.ts +1 -0
- package/src/lib/import/ghost.ts +1 -0
- package/src/lib/media/upload.ts +83 -0
- package/src/lib/mobile/associations.ts +25 -0
- package/src/lib/mobile/calendar.ts +26 -14
- package/src/lib/mobile/config.mjs +59 -0
- package/src/lib/mobile/content.ts +18 -13
- package/src/lib/mobile/embed.ts +83 -0
- package/src/lib/mobile/http.ts +14 -6
- package/src/lib/mobile/locale.ts +18 -0
- package/src/lib/mobile/openapi.ts +111 -0
- package/src/lib/mobile/pages.ts +71 -0
- package/src/lib/mobile/route.ts +3 -3
- package/src/lib/mobile/schemas.ts +60 -0
- package/src/lib/mobile/site.ts +41 -0
- package/src/lib/push/api.ts +158 -0
- package/src/lib/push/config.ts +20 -0
- package/src/lib/push/expo.ts +76 -0
- package/src/lib/push/migration.ts +60 -0
- package/src/lib/push/service.ts +302 -0
- package/src/lib/push/store.ts +144 -0
- package/src/lib/push/types.ts +43 -0
- package/src/lib/repo/migrations.ts +14 -0
- package/src/lib/repo/sql.ts +65 -20
- package/src/lib/repo/types.ts +10 -4
- package/src/lib/roles.ts +5 -0
- package/src/lib/scheduler.ts +6 -1
- package/src/lib/schema.ts +76 -1
- package/src/lib/section-ai.ts +55 -0
- package/src/lib/section-targets.ts +62 -0
- package/src/lib/sections-agent.ts +146 -0
- package/src/lib/sections.ts +242 -0
- package/src/lib/site-chrome.ts +34 -0
- package/src/lib/theme-assets.ts +16 -0
- package/src/lib/theme.ts +33 -4
- package/src/lib/translate.ts +97 -0
- package/src/lib/translations.ts +39 -0
- package/src/middleware.ts +38 -2
- package/src/pages/.well-known/apple-app-site-association.ts +6 -0
- package/src/pages/.well-known/assetlinks.json.ts +6 -0
- package/src/pages/[...slug].astro +8 -3
- package/src/pages/admin/app-auth.astro +159 -0
- package/src/pages/admin/c/[collection]/[id].astro +9 -0
- package/src/pages/admin/calendar/bookings.astro +32 -26
- package/src/pages/admin/calendar/calendars.astro +4 -263
- package/src/pages/admin/calendar/events/[id].astro +9 -0
- package/src/pages/admin/calendar/events/index.astro +41 -83
- package/src/pages/admin/calendar/index.astro +43 -0
- package/src/pages/admin/calendar/resources/[id].astro +27 -5
- package/src/pages/admin/calendar/resources/index.astro +16 -17
- package/src/pages/admin/calendar/resources/link.astro +52 -12
- package/src/pages/admin/calendar/settings.astro +458 -0
- package/src/pages/admin/integrations.astro +5 -11
- package/src/pages/admin/login.astro +6 -2
- package/src/pages/admin/logout.ts +5 -2
- package/src/pages/admin/mobile.astro +18 -0
- package/src/pages/admin/pages/[id].astro +62 -0
- package/src/pages/admin/section-preview.astro +61 -0
- package/src/pages/admin/users.astro +107 -11
- package/src/pages/api/agent/docs.ts +6 -2
- package/src/pages/api/agent/index.ts +1 -1
- package/src/pages/api/ai/settings.ts +7 -4
- package/src/pages/api/design/ai.ts +15 -0
- package/src/pages/api/design/index.ts +12 -42
- package/src/pages/api/design/translate.ts +15 -0
- package/src/pages/api/live/thumb.ts +1 -1
- package/src/pages/api/mcp.ts +2 -2
- package/src/pages/api/media/upload.ts +10 -78
- package/src/pages/api/push/admin.ts +27 -0
- package/src/pages/api/v1/admin/bookings/[id]/[action].ts +14 -0
- package/src/pages/api/v1/admin/bookings/index.ts +6 -0
- package/src/pages/api/v1/admin/documents/[kind]/[id]/[action].ts +17 -0
- package/src/pages/api/v1/admin/documents/[kind]/[id]/index.ts +20 -0
- package/src/pages/api/v1/admin/documents/[kind]/[id]/translations/[locale]/[action].ts +26 -0
- package/src/pages/api/v1/admin/documents/[kind]/[id]/translations/[locale]/index.ts +18 -0
- package/src/pages/api/v1/admin/documents/index.ts +13 -0
- package/src/pages/api/v1/admin/me.ts +6 -0
- package/src/pages/api/v1/admin/media/index.ts +32 -0
- package/src/pages/api/v1/admin/sections/[pageId]/[sectionId]/index.ts +14 -0
- package/src/pages/api/v1/admin/sections/[pageId]/[sectionId]/publish.ts +14 -0
- package/src/pages/api/v1/admin/sections/[pageId]/[sectionId]/translations/[locale]/[action].ts +22 -0
- package/src/pages/api/v1/admin/sections/[pageId]/[sectionId]/translations/[locale]/index.ts +14 -0
- package/src/pages/api/v1/admin/sections/index.ts +6 -0
- package/src/pages/api/v1/auth/revoke.ts +5 -0
- package/src/pages/api/v1/auth/token.ts +5 -0
- package/src/pages/api/v1/devices/[token].ts +20 -0
- package/src/pages/api/v1/devices/index.ts +17 -0
- package/src/pages/api/v1/openapi.json.ts +7 -0
- package/src/pages/api/v1/pages/[...slug].ts +7 -0
- package/src/pages/api/v1/pages/home.ts +7 -0
- package/src/pages/api/v1/push/topics.ts +7 -0
- package/src/pages/api/v1/site.ts +7 -0
- package/src/pages/api/v1/theme.ts +7 -0
- package/src/pages/blog/[slug].astro +8 -2
- package/src/pages/blog/index.astro +11 -4
- package/src/pages/book/[resource].ics.ts +7 -1
- package/src/pages/embed/section/[...path].astro +42 -0
- package/src/pages/events/[slug].astro +7 -2
- package/src/pages/index.astro +11 -5
- package/src/pages/sitemap.xml.ts +8 -0
- package/src/styles/admin.css +117 -0
- package/src/styles/cards.css +5 -1
- package/src/styles/editor.css +57 -0
- package/src/styles/mobile-app.css +151 -0
- package/src/styles/schedule.css +325 -0
- package/src/styles/sections.css +21 -12
- package/src/styles/theme-editor.css +255 -0
- package/src/theme-sdk/contract.d.mts +2193 -89
- package/src/theme-sdk/contract.mjs +77 -20
- package/src/theme-sdk/fields.d.mts +88 -0
- package/src/theme-sdk/fields.mjs +330 -0
- package/src/theme-sdk/index.ts +14 -2
- package/src/theme-sdk/tokens.d.mts +11 -0
- package/src/virtual.d.ts +4 -0
- package/src/pages/admin/calendar/index.ts +0 -4
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Site from '../../../layouts/Site.astro';
|
|
3
|
+
import ThemeSections from '../../../components/ThemeSections.astro';
|
|
4
|
+
import { getRepo } from '../../../lib/repo';
|
|
5
|
+
import { ApiError } from '../../../lib/api';
|
|
6
|
+
import { I18N } from '../../../lib/i18n';
|
|
7
|
+
import { embedSection, embedBridgeScript } from '../../../lib/mobile/embed';
|
|
8
|
+
|
|
9
|
+
// One published section, chrome-less, for mobile apps without a native
|
|
10
|
+
// component for it: GET /embed/section/<page slug|home>/<section id>
|
|
11
|
+
// ?locale=es the language to render (default: the site's)
|
|
12
|
+
// ?scheme=dark light/dark for themes that follow the device
|
|
13
|
+
// The document posts its height and link taps to the app (see
|
|
14
|
+
// lib/mobile/embed.ts); it never navigates itself.
|
|
15
|
+
const repo = await getRepo(Astro.locals);
|
|
16
|
+
let embed;
|
|
17
|
+
try {
|
|
18
|
+
embed = await embedSection(repo, Astro.url, Astro.params.path ?? '');
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const status = error instanceof ApiError ? error.status : 500;
|
|
21
|
+
return new Response((status === 400 ? 'Bad request' : status === 404 ? 'Not found' : 'Error'), { status, headers: { 'Content-Type': 'text/plain; charset=utf-8', 'Cache-Control': 'no-store', 'X-Robots-Tag': 'noindex' } });
|
|
22
|
+
}
|
|
23
|
+
if (I18N.enabled && embed.locale && embed.locale !== I18N.defaultLocale) (Astro.locals as { acmsLocale?: string }).acmsLocale = embed.locale;
|
|
24
|
+
Astro.response.headers.set('Content-Security-Policy', 'frame-ancestors *');
|
|
25
|
+
Astro.response.headers.set('Cache-Control', 'public, max-age=0, must-revalidate');
|
|
26
|
+
Astro.response.headers.set('X-Robots-Tag', 'noindex');
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
<Site title="Section" bare noindex>
|
|
30
|
+
<div id="acms-embed" data-section={embed.sectionId} data-scheme={embed.scheme}>
|
|
31
|
+
<ThemeSections page={embed.page} settings={embed.settings} locale={embed.locale} editable={false} />
|
|
32
|
+
</div>
|
|
33
|
+
<style is:global>
|
|
34
|
+
html, body { background: var(--bg); }
|
|
35
|
+
main.site-main { max-width: none; margin: 0; padding: 0; }
|
|
36
|
+
#acms-embed { display: flow-root; }
|
|
37
|
+
#acms-embed .acms-sections { margin: 0; }
|
|
38
|
+
#acms-embed .acms-section { padding: 0; }
|
|
39
|
+
astro-dev-toolbar { display: none !important; }
|
|
40
|
+
</style>
|
|
41
|
+
<script is:inline set:html={embedBridgeScript(embed.sectionId)} />
|
|
42
|
+
</Site>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
+
import { requestLocale } from '../../lib/i18n';
|
|
3
|
+
import { localizeDoc, isExtraLocale } from '../../lib/translations';
|
|
2
4
|
import Site from '../../layouts/Site.astro';
|
|
3
5
|
import EventPage from '../../components/EventPage.astro';
|
|
4
6
|
import { getRepo } from '../../lib/repo';
|
|
@@ -21,13 +23,16 @@ import { waitUntilFrom } from '../../lib/webhooks';
|
|
|
21
23
|
// repeating event — the calendar grid links carry it.
|
|
22
24
|
if (!CALENDAR.enabled) return new Response(null, { status: 404, statusText: 'Not found' });
|
|
23
25
|
const repo = await getRepo(Astro.locals);
|
|
24
|
-
const
|
|
26
|
+
const locale = requestLocale(Astro.url, Astro.locals);
|
|
27
|
+
const rawEvent = await repo.getEventBySlug(Astro.params.slug ?? '');
|
|
28
|
+
const event = rawEvent ? localizeDoc(rawEvent, locale) : null;
|
|
25
29
|
const [rawSettings, allCalendars] = await Promise.all([repo.getSettings(), repo.listCalendars()]);
|
|
26
30
|
const calMap = new Map(allCalendars.map((c) => [c.id, c]));
|
|
27
31
|
const isAdmin = (await validateSession(Astro.cookies.get(SESSION_COOKIE)?.value, Astro.locals));
|
|
28
32
|
if (!event || (!eventIsPublic(event, calMap) && !isAdmin)) return new Response(null, { status: 404, statusText: 'Not found' });
|
|
29
33
|
|
|
30
|
-
const
|
|
34
|
+
const baseSettings = await effectiveSettings(rawSettings, Astro.url, Astro.cookies, Astro.locals);
|
|
35
|
+
const settings = isExtraLocale(locale) ? { ...baseSettings, locale } : baseSettings;
|
|
31
36
|
const now = Date.now();
|
|
32
37
|
const on = Astro.url.searchParams.get('on') ?? undefined;
|
|
33
38
|
const occurrence = featuredOccurrence(event, settings, now, on && /^\d{4}-\d{2}-\d{2}$/.test(on) ? on : undefined);
|
package/src/pages/index.astro
CHANGED
|
@@ -14,14 +14,20 @@ const repo = await getRepo(Astro.locals);
|
|
|
14
14
|
const locale = I18N.enabled ? localeFromPath(Astro.url.pathname) : I18N.defaultLocale;
|
|
15
15
|
const wantsLocaleHome = I18N.enabled && locale !== I18N.defaultLocale;
|
|
16
16
|
let [home, rawSettings] = await Promise.all([
|
|
17
|
-
repo.getHomePage(
|
|
17
|
+
repo.getHomePage(),
|
|
18
18
|
repo.getSettings(),
|
|
19
19
|
]);
|
|
20
20
|
// ?designPreview=1 (admin-only) renders the staged Design-screen changes
|
|
21
21
|
const settings = await effectiveSettings(rawSettings, Astro.url, Astro.cookies, Astro.locals);
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
|
|
22
|
+
// Another language: the default home page's section layout with that
|
|
23
|
+
// language's translated words, once it has any. A separately authored home
|
|
24
|
+
// page for the language (the older setup) keeps serving until then, and /es
|
|
25
|
+
// never 404s mid-setup.
|
|
26
|
+
if (wantsLocaleHome) {
|
|
27
|
+
const translated = Boolean(home && settings.sectionPages?.[home.id]?.sections.some((s) => s.translations?.[locale]));
|
|
28
|
+
const separate = translated ? null : await repo.getHomePage(locale);
|
|
29
|
+
if (separate) home = separate;
|
|
30
|
+
}
|
|
25
31
|
|
|
26
32
|
// Live state must not survive in a cached page after its snapshot expires.
|
|
27
33
|
if (settings.live.mode !== 'off' || home?.blocks.some(block => block.type === 'live') ||
|
|
@@ -46,7 +52,7 @@ const homeForTemplate = home ? { ...home, bodyHtml: homeHtml } : null;
|
|
|
46
52
|
|
|
47
53
|
<Site title={home?.seoTitle || undefined} description={home?.seoDesc || undefined}>
|
|
48
54
|
{home && settings.sectionPages?.[home.id]?.mode === 'sections' ? (
|
|
49
|
-
<ThemeSections page={home} settings={settings} />
|
|
55
|
+
<ThemeSections page={home} settings={settings} locale={locale} />
|
|
50
56
|
) : HomeTemplate ? (
|
|
51
57
|
<HomeTemplate settings={settings} page={homeForTemplate} posts={posts} tags={tags} />
|
|
52
58
|
) : home ? (
|
package/src/pages/sitemap.xml.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { siteOrigin, xmlEscape } from '../lib/seo';
|
|
|
5
5
|
import { CONTENT, collectionUrl, tagUrl } from '../lib/content';
|
|
6
6
|
import { CALENDAR, eventUrl, bookingsEnabled, resourceUrl } from '../lib/calendar/config';
|
|
7
7
|
import { eventIsPublic } from '../lib/calendar/events';
|
|
8
|
+
import { extraLocales, localePath } from '../lib/i18n';
|
|
9
|
+
import { hasTranslation } from '../lib/translations';
|
|
8
10
|
|
|
9
11
|
// DB-backed sitemap: content lives in D1/libSQL, so this is generated per
|
|
10
12
|
// request instead of at build time. Draft/scheduled content never appears.
|
|
@@ -49,6 +51,12 @@ export const GET: APIRoute = async ({ locals, url }) => {
|
|
|
49
51
|
...publicEvents.map((e) => ({ loc: eventUrl(e.slug), lastmod: e.updatedAt })),
|
|
50
52
|
]
|
|
51
53
|
: []),
|
|
54
|
+
// translated documents also live at /<locale>/… (acms({ i18n }))
|
|
55
|
+
...extraLocales().flatMap((l) => [
|
|
56
|
+
...pages.filter((p) => p.status === 'published' && !p.isHome && hasTranslation(p, l)).map((p) => ({ loc: localePath(`/${p.slug}`, l), lastmod: p.updatedAt })),
|
|
57
|
+
...posts.filter((p) => hasTranslation(p, l)).map((p) => ({ loc: localePath(collectionUrl(p.collection, p.slug), l), lastmod: p.updatedAt })),
|
|
58
|
+
...publicEvents.filter((e) => hasTranslation(e, l)).map((e) => ({ loc: localePath(eventUrl(e.slug), l), lastmod: e.updatedAt })),
|
|
59
|
+
]),
|
|
52
60
|
...(bookingsEnabled()
|
|
53
61
|
? [{ loc: CALENDAR.bookBase }, ...(await repo.listResources()).filter((r) => r.visibility === 'public').map((r) => ({ loc: resourceUrl(r.slug), lastmod: r.updatedAt }))]
|
|
54
62
|
: []),
|
package/src/styles/admin.css
CHANGED
|
@@ -756,6 +756,43 @@ dialog.modal[open] { animation: modal-in 0.16s ease-out; }
|
|
|
756
756
|
.login-wrap { background: var(--bg); }
|
|
757
757
|
.btn.block { width: 100%; justify-content: center; min-height: 38px; }
|
|
758
758
|
.login-note { margin-top: 14px; }
|
|
759
|
+
.login-for-app { text-align: center; margin: -8px 0 14px; color: var(--muted); }
|
|
760
|
+
|
|
761
|
+
/* editor-app sign-in (consent) — same paper card as login, a little wider */
|
|
762
|
+
.consent-wrap { align-items: start; padding-top: max(8vh, 20px); }
|
|
763
|
+
.consent-card { width: 100%; max-width: 440px; padding: 0; overflow: hidden; }
|
|
764
|
+
.consent-site { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--text-2); font-weight: 600; font-size: 13px; min-width: 0; }
|
|
765
|
+
.consent-site span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
766
|
+
.consent-body { padding: 22px 22px 18px; }
|
|
767
|
+
.consent-body h1 { font-size: 20px; line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 6px; overflow-wrap: anywhere; }
|
|
768
|
+
.consent-app { color: var(--text); }
|
|
769
|
+
.consent-lead { color: var(--muted); margin: 0 0 18px; }
|
|
770
|
+
.consent-lead b { color: var(--text-2); font-weight: 600; }
|
|
771
|
+
.consent-who { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 18px; min-width: 0; }
|
|
772
|
+
.consent-initial { flex: none; width: 36px; height: 36px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; font-size: 15px; }
|
|
773
|
+
.consent-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
|
|
774
|
+
.consent-id b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
775
|
+
.consent-id span { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
776
|
+
.consent-role { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); }
|
|
777
|
+
.consent-role i { width: 7px; height: 7px; border-radius: 2px; background: var(--blue); }
|
|
778
|
+
.consent-role i.is-owner { background: var(--accent); }
|
|
779
|
+
.consent-label { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
|
|
780
|
+
.consent-can { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
|
|
781
|
+
.consent-can li { position: relative; padding-left: 20px; color: var(--text-2); }
|
|
782
|
+
.consent-can li::before { content: ''; position: absolute; left: 3px; top: 0.45em; width: 8px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
|
|
783
|
+
.consent-device { margin-bottom: 16px; }
|
|
784
|
+
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
785
|
+
.consent-actions .btn { justify-content: center; min-height: 40px; }
|
|
786
|
+
.consent-meta { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 12px; }
|
|
787
|
+
.consent-meta div { display: flex; gap: 10px; min-width: 0; }
|
|
788
|
+
.consent-meta dt { color: var(--faint); flex: 0 0 76px; }
|
|
789
|
+
.consent-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text-2); }
|
|
790
|
+
.consent-meta code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; }
|
|
791
|
+
.consent-foot { margin: 12px 0 0; }
|
|
792
|
+
@media (max-width: 480px) {
|
|
793
|
+
.consent-wrap { padding: 0; align-items: stretch; }
|
|
794
|
+
.consent-card { max-width: none; border-radius: 0; border: 0; min-height: 100vh; box-shadow: none; }
|
|
795
|
+
}
|
|
759
796
|
|
|
760
797
|
/* recent list on dashboard */
|
|
761
798
|
.recent { list-style: none; margin: 0; padding: 0; }
|
|
@@ -1473,3 +1510,83 @@ a.bk-row:hover, .bk-row.is-sel { background: var(--hover); }
|
|
|
1473
1510
|
.dm-hist li { flex-direction: column; align-items: flex-start; }
|
|
1474
1511
|
.dm-status-actions { margin-left: 0; width: 100%; }
|
|
1475
1512
|
}
|
|
1513
|
+
|
|
1514
|
+
/* role: marker + text (no badges) */
|
|
1515
|
+
.role-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
|
|
1516
|
+
.role-mark i { width: 7px; height: 7px; border-radius: 2px; background: var(--blue); }
|
|
1517
|
+
.role-mark i.is-owner { background: var(--accent); }
|
|
1518
|
+
|
|
1519
|
+
/* Users → Signed-in apps */
|
|
1520
|
+
.devices-card { margin-top: 20px; }
|
|
1521
|
+
.devices-head { padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
|
|
1522
|
+
.devices-head h2 { font-size: 15px; margin: 0 0 2px; letter-spacing: -0.01em; }
|
|
1523
|
+
.devices-head .hint { margin: 0; }
|
|
1524
|
+
.devices-empty { color: var(--muted); padding: 18px 20px 20px; margin: 0; }
|
|
1525
|
+
.devices-group + .devices-group { border-top: 1px solid var(--line); }
|
|
1526
|
+
.devices-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px 2px; min-width: 0; }
|
|
1527
|
+
.devices-person > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1528
|
+
.devices-person .t-sub { color: var(--faint); font-size: 12px; }
|
|
1529
|
+
.devices-list { list-style: none; margin: 0; padding: 4px 8px 8px; }
|
|
1530
|
+
.device-row { display: grid; grid-template-columns: 32px minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); }
|
|
1531
|
+
.device-row:hover { background: var(--hover); }
|
|
1532
|
+
.device-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
|
|
1533
|
+
.device-main { display: flex; flex-direction: column; min-width: 0; }
|
|
1534
|
+
.device-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1535
|
+
.device-main .t-sub { color: var(--faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11.5px; }
|
|
1536
|
+
.device-when { display: flex; flex-wrap: wrap; column-gap: 16px; row-gap: 2px; color: var(--text-2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
|
|
1537
|
+
.device-when > span { white-space: nowrap; }
|
|
1538
|
+
.device-k { color: var(--faint); margin-right: 3px; }
|
|
1539
|
+
@media (max-width: 640px) {
|
|
1540
|
+
.device-row { grid-template-columns: 32px minmax(0, 1fr) auto; row-gap: 4px; }
|
|
1541
|
+
.device-when { grid-column: 2 / 4; grid-row: 2; }
|
|
1542
|
+
.device-action { grid-column: 3; grid-row: 1; }
|
|
1543
|
+
.devices-head, .devices-person { padding-left: 16px; padding-right: 16px; }
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/* calendar section header kit: icon button, "New ▾" menu, link-styled button */
|
|
1547
|
+
.btn.ico { padding-inline: 9px; min-width: 32px; justify-content: center; }
|
|
1548
|
+
.btn.ico svg { width: 15px; height: 15px; display: block; }
|
|
1549
|
+
.newmenu { position: relative; }
|
|
1550
|
+
.newmenu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
|
|
1551
|
+
.newmenu > summary::-webkit-details-marker { display: none; }
|
|
1552
|
+
.newmenu > summary svg { width: 13px; height: 13px; }
|
|
1553
|
+
.newmenu-pop {
|
|
1554
|
+
position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 240px; padding: 5px;
|
|
1555
|
+
background: var(--panel); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-pop);
|
|
1556
|
+
display: flex; flex-direction: column;
|
|
1557
|
+
}
|
|
1558
|
+
.newmenu-pop > * {
|
|
1559
|
+
display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px;
|
|
1560
|
+
background: none; border: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer; text-decoration: none;
|
|
1561
|
+
}
|
|
1562
|
+
.newmenu-pop > *:hover { background: var(--hover); }
|
|
1563
|
+
.newmenu-pop small { color: var(--muted); font-size: 11.5px; }
|
|
1564
|
+
.newmenu-pop kbd, .page-actions kbd { font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 4px; }
|
|
1565
|
+
.linklike { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
|
|
1566
|
+
.seg > a { text-decoration: none; }
|
|
1567
|
+
/* page-level text tabs (Bookings: Requests · Rooms & people) */
|
|
1568
|
+
.ptabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; font-size: 13.5px; }
|
|
1569
|
+
.ptabs a { padding: 0 0 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 7px; align-items: baseline; text-decoration: none; }
|
|
1570
|
+
.ptabs a:hover { color: var(--text); }
|
|
1571
|
+
.ptabs a[aria-current='page'] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
|
|
1572
|
+
.ptabs small { color: var(--faint); font-weight: 500; font-size: 12px; }
|
|
1573
|
+
.ptabs small.attn { color: var(--amber); }
|
|
1574
|
+
/* booking link → Approval (same pattern as Calendar settings → Booking approval) */
|
|
1575
|
+
.appr-choices { display: flex; flex-direction: column; gap: 8px; }
|
|
1576
|
+
.appr-choice { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
|
|
1577
|
+
.appr-choice:has(input:checked) { border-color: var(--accent-ring); background: var(--accent-soft); }
|
|
1578
|
+
.appr-choice input { accent-color: var(--accent); margin-top: 2px; }
|
|
1579
|
+
.appr-choice b { display: block; font-size: 13.5px; }
|
|
1580
|
+
.appr-choice small { color: var(--muted); font-size: 12px; }
|
|
1581
|
+
.appr-rules { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
|
|
1582
|
+
.appr-rules legend { color: var(--muted); font-size: 12px; padding: 0 4px; }
|
|
1583
|
+
.appr-check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
|
|
1584
|
+
.appr-check input[type='checkbox'] { accent-color: var(--accent); }
|
|
1585
|
+
.appr-check input[type='number'] { width: 70px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; }
|
|
1586
|
+
.appr-deadline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
|
|
1587
|
+
.appr-deadline select { width: auto; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
|
|
1588
|
+
.appr-now { margin: 10px 0 0; }
|
|
1589
|
+
.appr [hidden] { display: none !important; }
|
|
1590
|
+
/* Bookings → Day view: a room held by an event (tinted, dashed; links to the event) */
|
|
1591
|
+
.bk-blk.is-hold { background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border: 1px dashed var(--accent-ring); z-index: 0; }
|
|
1592
|
+
.bk-blk:not(.is-hold) { z-index: 1; }
|
package/src/styles/cards.css
CHANGED
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
.pc-image img { width: 100%; height: auto; border-radius: var(--r, 16px); display: block; box-shadow: var(--sh-1); }
|
|
10
10
|
.pc-image figcaption, .pc-embed figcaption, .pc-gallery figcaption { text-align: center; font-size: 0.82em; color: var(--muted); margin-top: 10px; }
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
/* space between paragraphs only — none at the edge of a section or page, and
|
|
13
|
+
zero-specificity so a theme's own class always wins */
|
|
14
|
+
:where(.pc-embed) { margin: 2em 0; }
|
|
15
|
+
:where(.pc-embed:first-child) { margin-top: 0; }
|
|
16
|
+
:where(.pc-embed:last-child) { margin-bottom: 0; }
|
|
13
17
|
.pc-embed-frame { width: 100%; border-radius: var(--r, 16px); overflow: hidden; background: #0d0e11; box-shadow: var(--sh-2); }
|
|
14
18
|
.pc-embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
|
|
15
19
|
|
package/src/styles/editor.css
CHANGED
|
@@ -1024,3 +1024,60 @@
|
|
|
1024
1024
|
.pe-evcard-one small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-deep); }
|
|
1025
1025
|
.pe-evcard-one b { display: block; font-size: 15px; color: var(--text); margin-top: 2px; }
|
|
1026
1026
|
.pe-evcard-one em { display: block; font-style: normal; font-size: 12px; color: var(--amber); margin-top: 3px; }
|
|
1027
|
+
|
|
1028
|
+
/* ---- translations: language switch + panel ---- */
|
|
1029
|
+
.pe-langs button { position: relative; padding: 4px 10px; font-weight: 600; letter-spacing: .02em; }
|
|
1030
|
+
.pe-lang-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 2px; background: var(--amber, #93660c); }
|
|
1031
|
+
.pe-trpanel { margin: 0 0 18px; padding: 14px 16px; border-radius: var(--r-md); background: var(--panel-2); font-size: 13px; color: var(--text-2); }
|
|
1032
|
+
.pe-tr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
|
|
1033
|
+
.pe-tr-head b { font-size: 14px; color: var(--text); }
|
|
1034
|
+
.pe-tr-states { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; }
|
|
1035
|
+
.pe-tr-states .is-missing { color: var(--red); }
|
|
1036
|
+
.pe-tr-states .is-outdated { color: var(--amber, #93660c); }
|
|
1037
|
+
.pe-tr-states .is-ai { color: var(--blue, #2f5fb3); }
|
|
1038
|
+
.pe-tr-states .is-reviewed { color: var(--green, #127442); }
|
|
1039
|
+
.pe-tr-note { margin: 6px 0 10px; color: var(--muted); font-size: 12.5px; }
|
|
1040
|
+
.pe-tr-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
|
|
1041
|
+
.pe-tr-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
|
|
1042
|
+
.pe-tr-fields input, .pe-tr-fields textarea { font: inherit; font-size: 13.5px; color: var(--text); padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); resize: vertical; }
|
|
1043
|
+
.pe-tr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
|
|
1044
|
+
.pe-tr-msg { font-size: 12.5px; color: var(--muted); }
|
|
1045
|
+
@media (max-width: 767px) { .pe-langs { order: 3; } .pe-tr-fields input, .pe-tr-fields textarea { font-size: 16px; } }
|
|
1046
|
+
.pe-seg button[aria-checked='true'] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
|
|
1047
|
+
:root[data-theme='dark'] .pe-seg button[aria-checked='true'] { background: #3a3632; }
|
|
1048
|
+
|
|
1049
|
+
/* Event settings → Rooms (components/calendar/RoomHolds.tsx) */
|
|
1050
|
+
.rh-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
|
|
1051
|
+
.rh-room { display: grid; grid-template-columns: 16px 1fr auto; gap: 9px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); cursor: pointer; }
|
|
1052
|
+
.rh-room:hover { border-color: var(--line-strong); }
|
|
1053
|
+
.rh-room.on { border-color: var(--accent-ring); background: var(--accent-soft); }
|
|
1054
|
+
.rh-room input { accent-color: var(--accent); margin: 0; }
|
|
1055
|
+
.rh-name { display: flex; flex-direction: column; min-width: 0; }
|
|
1056
|
+
.rh-name b { font-size: 13px; font-weight: 550; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1057
|
+
.rh-name small { font-size: 11.5px; color: var(--faint); }
|
|
1058
|
+
.rh-st { font-size: 11.5px; white-space: nowrap; }
|
|
1059
|
+
.rh-st.free { color: var(--green); }
|
|
1060
|
+
.rh-st.busy { color: var(--amber); }
|
|
1061
|
+
.rh-span { display: flex; gap: 1px; padding: 2px; border-radius: 9px; background: var(--sel); margin: 4px 0 8px; }
|
|
1062
|
+
.rh-span button { flex: 1; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); padding: 5px 8px; border-radius: 7px; cursor: pointer; }
|
|
1063
|
+
.rh-span button[aria-pressed='true'] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-sm); }
|
|
1064
|
+
.rh-buffers { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
|
|
1065
|
+
.rh-buffers input { width: 64px; margin: 0 4px; padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); color: var(--text); font: inherit; }
|
|
1066
|
+
.rh-conflict { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--amber-soft); font-size: 12.5px; color: var(--text); }
|
|
1067
|
+
.rh-conflict > b { display: block; margin-bottom: 4px; }
|
|
1068
|
+
.rh-bk { display: flex; flex-direction: column; padding: 5px 0; border-top: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); }
|
|
1069
|
+
.rh-bk small, .rh-more { color: var(--text-2); font-size: 11.5px; }
|
|
1070
|
+
.rh-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
|
|
1071
|
+
.rh-acts.end { justify-content: flex-end; }
|
|
1072
|
+
.rh-cancel textarea, .rh-msg { width: 100%; margin-top: 8px; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 12.5px; resize: vertical; }
|
|
1073
|
+
.rh-done { color: var(--green); }
|
|
1074
|
+
.rh-layer { position: fixed; inset: 0; z-index: 90; background: var(--dim); display: grid; place-items: center; padding: 16px; }
|
|
1075
|
+
.rh-dialog { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-pop); padding: 18px 20px; font-size: 13px; color: var(--text); }
|
|
1076
|
+
.rh-title { font-size: 15px; display: block; }
|
|
1077
|
+
.rh-sub { color: var(--muted); margin: 4px 0 12px; font-size: 12.5px; }
|
|
1078
|
+
.rh-rows { display: flex; flex-direction: column; gap: 6px; }
|
|
1079
|
+
.rh-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
|
|
1080
|
+
.rh-row span { display: flex; flex-direction: column; min-width: 0; }
|
|
1081
|
+
.rh-row small { color: var(--muted); font-size: 11.5px; }
|
|
1082
|
+
.rh-row select { padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--text); font: inherit; font-size: 12.5px; }
|
|
1083
|
+
@media (max-width: 640px) { .rh-layer { place-items: end stretch; padding: 0; } .rh-dialog { border-radius: 16px 16px 0 0; } .rh-row { grid-template-columns: 1fr; } }
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* Admin → Mobile app island. Scoped under .ma; admin.css tokens only, except
|
|
2
|
+
the lock-screen preview, which shows a phone (fixed device colors, like the
|
|
3
|
+
site previews). No pills: statuses are colored text, controls 10–12px rects. */
|
|
4
|
+
.ma { display: flex; flex-direction: column; gap: 16px; }
|
|
5
|
+
.ma .card + .card { margin-top: 0; }
|
|
6
|
+
.ma code { font-family: ui-monospace, 'SF Mono', monospace; font-size: 12px; }
|
|
7
|
+
.ma .flash { margin: 4px 0 0; }
|
|
8
|
+
.ma-kpis { margin-bottom: 2px; }
|
|
9
|
+
.ma-notice { margin: 0; }
|
|
10
|
+
.ma-notice b { font-size: 13.5px; }
|
|
11
|
+
.ma-notice p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
|
|
12
|
+
.ma-notice code { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
|
|
13
|
+
.ma-head { margin-bottom: 14px; }
|
|
14
|
+
.ma-head h2 { font-size: 14.5px; margin: 0; letter-spacing: -0.01em; }
|
|
15
|
+
.ma-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; max-width: 64ch; }
|
|
16
|
+
.ma-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
|
|
17
|
+
.ma-foot { margin: 0 2px; line-height: 1.5; }
|
|
18
|
+
|
|
19
|
+
/* skeleton */
|
|
20
|
+
.ma-skel { display: grid; gap: 12px; }
|
|
21
|
+
.ma-skel i { display: block; height: 64px; border-radius: var(--r-lg); background: var(--panel-2); animation: ma-pulse 1.2s ease-in-out infinite alternate; }
|
|
22
|
+
.ma-skel i:nth-child(2) { height: 360px; }
|
|
23
|
+
@keyframes ma-pulse { to { opacity: 0.45; } }
|
|
24
|
+
@media (prefers-reduced-motion: reduce) { .ma-skel i { animation: none; } }
|
|
25
|
+
|
|
26
|
+
/* composer */
|
|
27
|
+
.ma-compose { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
|
|
28
|
+
.ma-compose-form { min-width: 0; }
|
|
29
|
+
.ma label.field > span { display: flex; justify-content: space-between; gap: 8px; }
|
|
30
|
+
.ma-count { font-style: normal; color: var(--faint); font-variant-numeric: tabular-nums; font-weight: 400; }
|
|
31
|
+
.ma-linkhint { margin: -6px 0 12px; }
|
|
32
|
+
.ma-audience { border: 0; padding: 0; margin: 2px 0 14px; min-width: 0; }
|
|
33
|
+
.ma-audience legend { font-size: 12px; color: var(--muted); font-weight: 500; padding: 0; margin-bottom: 6px; }
|
|
34
|
+
.ma-audience .seg > button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 5px 12px; border-radius: 7px; cursor: pointer; }
|
|
35
|
+
.ma-audience .seg > button[aria-selected='true'] { color: var(--text); }
|
|
36
|
+
.ma-audience .seg > button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
37
|
+
.ma-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 10px; }
|
|
38
|
+
.ma-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; }
|
|
39
|
+
.ma-opt:hover { background: var(--hover); }
|
|
40
|
+
.ma-opt.on { background: var(--sel); color: var(--text); font-weight: 600; }
|
|
41
|
+
.ma-opt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
|
|
42
|
+
.ma-opt input { accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
|
|
43
|
+
.ma-opt span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
44
|
+
.ma-opt em { font-style: normal; font-weight: 500; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
|
|
45
|
+
.ma-send { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 12px; }
|
|
46
|
+
.ma-reach { color: var(--text-2); font-size: 13px; }
|
|
47
|
+
.ma-confirm { background: var(--panel-2); border-radius: var(--r-md); padding: 11px 13px; font-size: 13px; }
|
|
48
|
+
.ma-confirm b { display: block; }
|
|
49
|
+
.ma-confirm p { margin: 3px 0 6px; color: var(--text-2); overflow-wrap: anywhere; }
|
|
50
|
+
.ma-confirm small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
|
|
51
|
+
|
|
52
|
+
/* lock screen preview (device colors) */
|
|
53
|
+
.ma-preview { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; position: sticky; top: 72px; }
|
|
54
|
+
.ma-preview figcaption { border-top: 1px solid var(--line); padding-top: 10px; align-self: stretch; }
|
|
55
|
+
.ma-preview figcaption { text-align: center; }
|
|
56
|
+
/* the top of a phone: the lock screen is all that matters */
|
|
57
|
+
.ma-phone { width: 100%; max-width: 280px; height: 350px; border-radius: 42px 42px 0 0; padding: 9px 9px 0; background: #1d1c1a; box-shadow: inset 0 0 0 1px #34322e; }
|
|
58
|
+
.ma-phone-screen { height: 100%; border-radius: 34px 34px 0 0; background: #33424b; color: #f7f5f2; display: flex; flex-direction: column; align-items: center; padding: 46px 11px 16px; overflow: hidden; }
|
|
59
|
+
.ma-clock { text-align: center; }
|
|
60
|
+
.ma-clock small { display: block; font-size: 13px; font-weight: 500; opacity: 0.88; }
|
|
61
|
+
.ma-clock b { display: block; font-size: 62px; line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
|
|
62
|
+
.ma-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%); }
|
|
63
|
+
.ma-note-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #5d5a55; margin-bottom: 5px; }
|
|
64
|
+
.ma-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%); }
|
|
65
|
+
.ma-appicon svg { width: 13px; height: 13px; }
|
|
66
|
+
.ma-appicon img { width: 100%; height: 100%; object-fit: cover; }
|
|
67
|
+
.ma-appname { font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
68
|
+
.ma-now { margin-left: auto; flex: 0 0 auto; }
|
|
69
|
+
.ma-note-title { display: block; font-size: 13.5px; line-height: 1.3; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
70
|
+
.ma-note-body { margin: 1px 0 0; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
|
|
71
|
+
|
|
72
|
+
/* automatic rules */
|
|
73
|
+
.ma-rule { padding: 14px 0; border-top: 1px solid var(--line); }
|
|
74
|
+
.ma-rule:first-child { border-top: 0; padding-top: 0; }
|
|
75
|
+
.ma-rule-head b { display: block; font-size: 13.5px; }
|
|
76
|
+
.ma-rule-head small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
|
|
77
|
+
.ma-choices { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
|
|
78
|
+
.ma-check { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; font-size: 13px; color: var(--text-2); cursor: pointer; }
|
|
79
|
+
.ma-check input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
|
|
80
|
+
.ma-check:has(input:disabled) { cursor: default; opacity: 0.6; }
|
|
81
|
+
.ma-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
|
|
82
|
+
.ma-lead { max-width: 240px; margin: 10px 0 0; }
|
|
83
|
+
.ma .form-actions { margin-top: 6px; }
|
|
84
|
+
.ma-saved { color: var(--green); font-size: 12.5px; font-weight: 500; }
|
|
85
|
+
|
|
86
|
+
/* following */
|
|
87
|
+
.ma-bars { list-style: none; margin: 0; padding: 0; }
|
|
88
|
+
.ma-bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 48px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
|
|
89
|
+
.ma-bars li:last-child { border-bottom: 0; }
|
|
90
|
+
.ma-bar-label { min-width: 0; overflow-wrap: anywhere; }
|
|
91
|
+
.ma-bar-label code { display: block; font-size: 11px; color: var(--faint); }
|
|
92
|
+
.ma-bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
|
|
93
|
+
.ma-bar i { display: block; height: 100%; background: var(--muted); border-radius: 3px; }
|
|
94
|
+
.ma-bars b { text-align: right; font-variant-numeric: tabular-nums; }
|
|
95
|
+
.ma-aud-note { margin: 12px 0 0; }
|
|
96
|
+
|
|
97
|
+
/* delivery log */
|
|
98
|
+
.ma-log-head { padding-bottom: 0; margin-bottom: 4px; }
|
|
99
|
+
.ma-scroll { overflow-x: auto; }
|
|
100
|
+
.ma-table td { vertical-align: top; font-size: 13px; }
|
|
101
|
+
.ma-table th:first-child, .ma-table td:first-child { padding-left: 20px; }
|
|
102
|
+
.ma-when { white-space: nowrap; color: var(--muted); }
|
|
103
|
+
.ma-body { color: var(--text-2); font-size: 12.5px; max-width: 52ch; margin-top: 1px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
104
|
+
.ma-url { font-family: ui-monospace, 'SF Mono', monospace; font-size: 11.5px; overflow-wrap: anywhere; margin-top: 2px; }
|
|
105
|
+
.ma-aud { color: var(--text-2); min-width: 110px; }
|
|
106
|
+
.ma-result { white-space: nowrap; }
|
|
107
|
+
.ma-table th.num { text-align: right; }
|
|
108
|
+
.ma-result small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
|
|
109
|
+
.ma-result .ma-err { color: var(--red); white-space: normal; max-width: 220px; margin-left: auto; overflow-wrap: anywhere; }
|
|
110
|
+
.ma-st { font-weight: 600; font-size: 12.5px; color: var(--muted); }
|
|
111
|
+
.ma-st[data-tone='ok'] { color: var(--green); }
|
|
112
|
+
.ma-st[data-tone='warn'] { color: var(--amber); }
|
|
113
|
+
.ma-st[data-tone='bad'] { color: var(--red); }
|
|
114
|
+
.ma-st[data-tone='info'] { color: var(--blue); }
|
|
115
|
+
.ma-empty { margin: 0; padding: 14px 20px 22px; color: var(--muted); }
|
|
116
|
+
|
|
117
|
+
@media (max-width: 1100px) {
|
|
118
|
+
.ma-grid-2 { grid-template-columns: 1fr; }
|
|
119
|
+
}
|
|
120
|
+
@media (max-width: 900px) {
|
|
121
|
+
.ma-compose { grid-template-columns: 1fr; gap: 20px; }
|
|
122
|
+
.ma-preview { position: static; }
|
|
123
|
+
.ma-phone { max-width: 260px; height: 300px; }
|
|
124
|
+
.ma-clock b { font-size: 52px; }
|
|
125
|
+
}
|
|
126
|
+
@media (max-width: 767px) {
|
|
127
|
+
.ma-send { flex-direction: column; align-items: stretch; }
|
|
128
|
+
.ma-send .btn { justify-content: center; min-height: 44px; }
|
|
129
|
+
.ma-reach { text-align: center; }
|
|
130
|
+
.ma-topics { grid-template-columns: 1fr; }
|
|
131
|
+
.ma-audience .seg { display: flex; }
|
|
132
|
+
.ma-audience .seg > button { flex: 1; min-height: 36px; }
|
|
133
|
+
.ma-lead { max-width: none; }
|
|
134
|
+
}
|
|
135
|
+
@media (max-width: 1000px) {
|
|
136
|
+
/* log rows become stacked cards */
|
|
137
|
+
.ma-log { background: none; border: 0; box-shadow: none; }
|
|
138
|
+
.ma-log-head { padding: 0; }
|
|
139
|
+
.ma-scroll { overflow: visible; }
|
|
140
|
+
.ma-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
|
|
141
|
+
.ma-table, .ma-table tbody, .ma-table tr, .ma-table td { display: block; width: 100%; }
|
|
142
|
+
.ma-table tr { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 8px; padding: 6px 0; }
|
|
143
|
+
.ma-table td, .ma-table td:first-child { border: 0; padding: 4px 12px; text-align: left; }
|
|
144
|
+
.ma-table td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
|
|
145
|
+
.ma-table tr:hover td { background: none; }
|
|
146
|
+
.ma-result .ma-err { margin-left: 0; max-width: none; }
|
|
147
|
+
.ma-empty { padding: 4px 0 8px; }
|
|
148
|
+
.ma-result { white-space: normal; }
|
|
149
|
+
.ma-table td.num { text-align: left; }
|
|
150
|
+
.ma-result .ma-err { margin-left: 0; max-width: none; }
|
|
151
|
+
}
|