File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
cloud/functions/src/crawlers Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,10 @@ export const EVENT_THEME_PARSER = z.object({
6464 url : z . string ( ) ,
6565 descriptor : z . string ( ) . regex ( / \d (?: w | x ) / )
6666 } ) ) . min ( 1 ) . optional ( ) . nullable ( ) . default ( null ) ,
67- customGoogleFontFamilies : z . array ( z . string ( ) ) . optional ( ) . nullable ( ) . default ( null ) ,
67+ customImportedFonts : z . array ( z . object ( {
68+ provider : z . literal ( 'google-fonts' ) ,
69+ family : z . string ( ) ,
70+ } ) ) . optional ( ) . nullable ( ) . default ( null ) ,
6871} )
6972
7073export const SOCIAL_MEDIA_TYPE = z . union ( [
Original file line number Diff line number Diff line change @@ -119,6 +119,6 @@ export function toVoxxrinEventTheme(firestoreTheme: EventTheme): VoxxrinEventThe
119119 } ,
120120 headingCustomStyles : firestoreTheme . headingCustomStyles ,
121121 headingSrcSet : firestoreTheme . headingSrcSet ,
122- customGoogleFontFamilies : firestoreTheme . customGoogleFontFamilies ,
122+ customImportedFonts : firestoreTheme . customImportedFonts ,
123123 }
124124}
Original file line number Diff line number Diff line change 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` " />
4+ <link v-for =" customFontUrl in customFontUrls " :key =" customFontUrl " rel =" stylesheet" :href =" customFontUrl " />
55 </ion-page >
66</template >
77
@@ -12,6 +12,7 @@ import {useSharedConferenceDescriptor} from "@/state/useConferenceDescriptor";
1212import {computed , toValue } from " vue" ;
1313import {areFeedbacksEnabled } from " @/models/VoxxrinConferenceDescriptor" ;
1414import {getResolvedEventRootPathFromSpacedEventIdRef , useCurrentSpaceEventIdRef } from " @/services/Spaces" ;
15+ import {match } from " ts-pattern" ;
1516
1617const spacedEventIdRef = useCurrentSpaceEventIdRef ()
1718const {conferenceDescriptor : confDescriptorRef} = useSharedConferenceDescriptor (spacedEventIdRef );
@@ -38,6 +39,14 @@ const tabs = computed(() => {
3839 selectedIcon: ' /assets/icons/solid/info-circle.svg' ,
3940 }]: [])
4041})
42+
43+ const customFontUrls = computed (() => {
44+ const confDescriptor = toValue (confDescriptorRef );
45+ return (confDescriptor ?.theming ?.customImportedFonts || []).map (customFontDescriptor => match (customFontDescriptor )
46+ .with ({ provider: ' google-fonts' }, ({ family }) => ` https://fonts.googleapis.com/css2?family=${family }&display=swap ` )
47+ .exhaustive ()
48+ )
49+ })
4150 </script >
4251
4352<style lang="scss" scoped>
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ export type EventTheme = {
1515 banner : string | null ,
1616 } | null ,
1717 headingSrcSet : Array < { url : string , descriptor : string } > | null ,
18- customGoogleFontFamilies : string [ ] | null
18+ customImportedFonts : Array < {
19+ provider : 'google-fonts' ,
20+ family : string ,
21+ } > | null ,
1922}
2023
2124export type Day = {
You can’t perform that action at this time.
0 commit comments