feat(courses): add type, search, and pricing filters to org landing page

- Add Types section to the Filter sidebar with all 4 course types
- Add full-text search input centered in the hero (title + description)
- Add Pricing section (Free / Paid) based on course cost
- Compact hero prop across all 10 themes to halve vertical padding
- Children snippet support in all hero themes for the search input
- All filters are URL-driven (?types=, ?search=, ?tags=, ?pricing=)
- Full-stack: validation schema, DB queries, service, API route, server load, UI
This commit is contained in:
Rotimi Best
2026-07-01 10:36:53 +01:00
parent 8d2f2a6d2d
commit 78a2b85ad3
27 changed files with 464 additions and 97 deletions
@@ -10,16 +10,20 @@
labels?: OrgLandingPageProps['labels'];
navigation: Snippet;
showActions?: boolean;
compact?: boolean;
children?: Snippet;
}
let { hero, labels, navigation, showActions = true }: Props = $props();
let { hero, labels, navigation, showActions = true, compact = false, children }: Props = $props();
</script>
{@render navigation()}
<EditableLandingSection sectionKey="hero">
<section
class="ui:relative ui:px-6 ui:md:px-8 ui:pt-20 ui:md:pt-24 ui:pb-20 ui:md:pb-24 ui:bg-[var(--landing-bg)] ui:text-center"
class="ui:relative ui:px-6 ui:md:px-8 {compact
? 'ui:pt-10 ui:md:pt-12 ui:pb-10 ui:md:pb-12'
: 'ui:pt-20 ui:md:pt-24 ui:pb-20 ui:md:pb-24'} ui:bg-[var(--landing-bg)] ui:text-center"
>
<div class="ui:max-w-[1320px] ui:mx-auto">
<h1
@@ -36,6 +40,9 @@
{hero.subheading}
</p>
{#if children}
<div class="ui:flex ui:justify-center ui:w-full ui:mb-8">{@render children()}</div>
{/if}
{#if showActions}
<div class="ui:inline-flex ui:flex-wrap ui:justify-center ui:items-center ui:gap-3">
<Button