feat: certificates, landing pages, ai tutor, website update, compliance

This commit is contained in:
Rotimi Best
2026-05-18 03:47:22 +01:00
parent c31ad63955
commit ac3a2c14a7
644 changed files with 56050 additions and 5439 deletions
@@ -0,0 +1,29 @@
import { getContext, setContext } from 'svelte';
import type { Component } from 'svelte';
/**
* Sections in the org landing page that the editor allows you to click in the preview
* to open. Matches the keys used by the editor's section list.
*/
export type LandingSectionKey = 'hero' | 'navigation' | 'callout' | 'embed' | 'links' | 'footer';
export interface LandingPageEditContext {
/** Reactive read of the currently selected section (or null if none). */
selectedKey: () => LandingSectionKey | null;
/** Sets the selected section. Pass `null` to deselect. */
selectKey: (key: LandingSectionKey | null) => void;
/** Human-readable label for the section cap (typically translated). */
labelFor: (key: LandingSectionKey) => string;
/** Icon component rendered inside the section cap. */
iconFor: (key: LandingSectionKey) => Component;
}
const KEY = Symbol('orgLandingPageEdit');
export function setLandingPageEditContext(ctx: LandingPageEditContext): void {
setContext(KEY, ctx);
}
export function getLandingPageEditContext(): LandingPageEditContext | null {
return getContext<LandingPageEditContext | null>(KEY) ?? null;
}