add computed to font base url for gh pages

This commit is contained in:
jrosh 2025-05-29 13:53:59 +02:00
commit 25c7b9c986
No known key found for this signature in database
GPG key ID: A4D68DCA6C9CCD2D

View file

@ -1,5 +1,5 @@
// src/composables/useStyles.ts // src/composables/useStyles.ts
import { ref, watch, nextTick } from 'vue'; import { ref, watch, nextTick, computed } from 'vue';
import { type RenditionTheme, type StylesOptions } from '../types/styles'; import { type RenditionTheme, type StylesOptions } from '../types/styles';
export function useStyles(options: StylesOptions = {}) { export function useStyles(options: StylesOptions = {}) {
@ -12,8 +12,9 @@ export function useStyles(options: StylesOptions = {}) {
const stylesModalOpen = ref(false); const stylesModalOpen = ref(false);
const rendition = ref<RenditionTheme | null>(null); const rendition = ref<RenditionTheme | null>(null);
const baseUrl = import.meta.env.VITE_BASE_URL; const baseUrl = computed(() => {
return import.meta.env.VITE_BASE_URL;
});
const customFonts = { const customFonts = {
'Fast Sans': `${baseUrl}fonts/Fast_Sans.ttf`, 'Fast Sans': `${baseUrl}fonts/Fast_Sans.ttf`,
'Fast Serif': `${baseUrl}fonts/Fast_Serif.ttf`, 'Fast Serif': `${baseUrl}fonts/Fast_Serif.ttf`,