feat: add preistraeger placeholder image and related database migrations
- Introduced a new SVG placeholder image for preistraeger without an image. - Created migration scripts to add download zip and gallery features to the preistraeger table. - Added site settings for preistraeger placeholder image in the database. - Implemented a utility function to retrieve the preistraeger placeholder image URL in the SPA.
This commit is contained in:
11
src/spa/preistraegerPlaceholder.ts
Normal file
11
src/spa/preistraegerPlaceholder.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { mediaUrl } from '@/spa/cmsMediaField'
|
||||
import { useCmsRoute } from '@/spa/cmsRoute'
|
||||
import { defaultSiteSettings } from '@/spa/siteSettings'
|
||||
|
||||
export const PREISTRAEGER_PLACEHOLDER_IMAGE = defaultSiteSettings.preistraegerPlaceholderImageUrl
|
||||
|
||||
export function usePreistraegerPlaceholderImage() {
|
||||
const siteSettings = useCmsRoute()?.siteSettings || defaultSiteSettings
|
||||
|
||||
return mediaUrl(siteSettings.preistraegerPlaceholderImage, siteSettings.preistraegerPlaceholderImageUrl)
|
||||
}
|
||||
Reference in New Issue
Block a user