Skip to content

Commit e9a2d30

Browse files
committed
introduced theming.customGoogleFontFamilies allowing to import custom fonts within an event space
1 parent 0754b12 commit e9a2d30

File tree

5 files changed

+4
-1
lines changed

5 files changed

+4
-1
lines changed

cloud/functions/src/crawlers/crawler-parsers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export const EVENT_THEME_PARSER = z.object({
6060
subTitle: z.string().nullable(),
6161
banner: z.string().nullable(),
6262
}).optional().nullable().default(null),
63+
customGoogleFontFamilies: z.array(z.string()).optional().nullable().default(null),
6364
})
6465

6566
export const SOCIAL_MEDIA_TYPE = z.union([

mobile/src/components/events/CurrentEventHeader.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<ion-button class="viewsHeader-back" @click="backButtonClicked" shape="round" :aria-label="LL.Back_List_Events()" data-testid="back-to-events-list">
66
<ion-icon src="/assets/icons/solid/checkbox-list.svg"></ion-icon>
77
</ion-button>
8-
<!-- NOTE (!) See how to manage the dynamic import of font familly via a URL. -->
98
<div class="viewsHeader-title">
109
<span class="viewsHeader-name" :style="confDescriptor.theming.headingCustomStyles?.title || ''">{{ confDescriptor.headingTitle }}</span>
1110
<span v-if="confDescriptor.headingSubTitle"

mobile/src/models/VoxxrinEvent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,6 @@ export function toVoxxrinEventTheme(firestoreTheme: EventTheme): VoxxrinEventThe
118118
tertiaryContrastRGB: hexToRGB(firestoreTheme.colors.tertiaryContrastHex),
119119
},
120120
headingCustomStyles: firestoreTheme.headingCustomStyles,
121+
customGoogleFontFamilies: firestoreTheme.customGoogleFontFamilies,
121122
}
122123
}

mobile/src/views/event/_BaseEventPages.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<ion-page>
33
<event-tabs :tabs="tabs" :spaced-event-id="spacedEventIdRef"></event-tabs>
4+
<link v-for="googleFontUrl in confDescriptorRef?.theming.customGoogleFontFamilies || []" :key="googleFontUrl" rel="stylesheet" :href="`https://fonts.googleapis.com/css2?family=${googleFontUrl}&display=swap`" />
45
</ion-page>
56
</template>
67

shared/event-list.firestore.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type EventTheme = {
1414
subTitle: string|null,
1515
banner: string|null,
1616
}|null,
17+
customGoogleFontFamilies: string[]|null
1718
}
1819

1920
export type Day = {

0 commit comments

Comments
 (0)