diff --git a/src/lib/types.ts b/src/lib/types.ts index 3280561..c28c77a 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -170,19 +170,9 @@ export type SignupStore = { } export type StandardTypes = - | `text` - | `email` - | `number` - | `date` - | `tel` - | `checkbox` + `text` | `email` | `number` | `date` | `tel` | `checkbox` export type CustomTypes = - | `select` - | `toggle` - | `singleRange` - | `doubleRange` - | `placeSelect` - | `radio` + `select` | `toggle` | `singleRange` | `doubleRange` | `placeSelect` | `radio` export type FormFieldType = StandardTypes | CustomTypes export type FormFieldProps = { @@ -280,6 +270,9 @@ export type Microcopy = { theme?: string chooseLocation?: string register?: string + statsLayout?: `default` | `grouped` + currentStatsTitle?: string + mediatedStatsTitle?: string boxes?: { locationsNumber?: number locationsName?: string diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index e2ed693..160152b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -33,43 +33,94 @@ {@html $microcopy?.indexPage?.theme} -
-
- {data.chapters.filter((ch) => ch.acceptsSignups).length} - - - {$microcopy?.indexPage?.boxes?.locationsName} -
-
- {$microcopy?.indexPage?.boxes?.studentsNumber} - - - {$microcopy?.indexPage?.boxes?.studentsName} -
-
- {$microcopy?.indexPage?.boxes?.pupilsNumber} - - - {$microcopy?.indexPage?.boxes?.pupilsName} -
-
- {$microcopy?.indexPage?.boxes?.scholarshipNumber} - - - {@html $microcopy?.indexPage?.boxes?.scholarshipName} - -
-
- {$microcopy?.indexPage?.boxes?.organizationMemberNumber} - - - {@html $microcopy?.indexPage?.boxes?.organizationMemberName} - -
-
+{#if $microcopy?.indexPage?.statsLayout === `grouped`} +
+
+

{$microcopy?.indexPage?.currentStatsTitle ?? `Wir sind aktuell`}

+
+
+ {data.chapters.filter((ch) => ch.acceptsSignups).length} + + + {$microcopy?.indexPage?.boxes?.locationsName} +
+
+ {$microcopy?.indexPage?.boxes?.organizationMemberNumber} + + + {@html $microcopy?.indexPage?.boxes?.organizationMemberName} + +
+
+
+ +
+

{$microcopy?.indexPage?.mediatedStatsTitle ?? `Wir vermittelten seit 2020:`}

+
+
+ {$microcopy?.indexPage?.boxes?.studentsNumber} + + + {$microcopy?.indexPage?.boxes?.studentsName} +
+
+ {$microcopy?.indexPage?.boxes?.pupilsNumber} + + + {$microcopy?.indexPage?.boxes?.pupilsName} +
+
+ {$microcopy?.indexPage?.boxes?.scholarshipNumber} + + + {@html $microcopy?.indexPage?.boxes?.scholarshipName} + +
+
+
+
+{:else} +
+
+ {data.chapters.filter((ch) => ch.acceptsSignups).length} + + + {$microcopy?.indexPage?.boxes?.locationsName} +
+
+ {$microcopy?.indexPage?.boxes?.studentsNumber} + + + {$microcopy?.indexPage?.boxes?.studentsName} +
+
+ {$microcopy?.indexPage?.boxes?.pupilsNumber} + + + {$microcopy?.indexPage?.boxes?.pupilsName} +
+
+ {$microcopy?.indexPage?.boxes?.scholarshipNumber} + + + {@html $microcopy?.indexPage?.boxes?.scholarshipName} + +
+
+ {$microcopy?.indexPage?.boxes?.organizationMemberNumber} + + + {@html $microcopy?.indexPage?.boxes?.organizationMemberName} + +
+
+{/if}

@@ -100,25 +151,45 @@ text-align: center; font-weight: lighter; } - section { + .stat-groups { display: flex; padding: 1em; place-content: center; + gap: 2.25em; + flex-direction: column; + color: white; + } + + .stat-group { + color: var(--text-color); + } + + .stat-group h2 { + margin: 0 0 0.75em; + text-decoration: underline; + text-underline-offset: 0.2em; + } + + .stat-row { + display: flex; gap: 2em; flex-wrap: wrap; - color: white; + justify-content: center; + white-space: nowrap; } - section div { + + .stat-box { + color: white; font-size: 2ex; text-align: center; - flex: 0 1 10%; + flex: 0 1 10em; padding: 1ex; border-radius: 1ex; font-weight: bold; display: flex; flex-direction: column; } - section div span { + .stat-box span { font-size: 3ex; display: block; } diff --git a/src/signup-form/de/smallTexts_unused.yml b/src/signup-form/de/smallTexts_unused.yml index 9c66021..42fed58 100644 --- a/src/signup-form/de/smallTexts_unused.yml +++ b/src/signup-form/de/smallTexts_unused.yml @@ -11,6 +11,9 @@ indexPage: register: 'Oder melde dich direkt bei uns an. ' + statsLayout: grouped + currentStatsTitle: Wir sind aktuell + mediatedStatsTitle: 'Wir vermittelten seit 2020:' boxes: locationsName: Standorte studentsName: Studierende