feat: update security headers and improve content security policy; enhance hero image component and loading states in public news
This commit is contained in:
@@ -226,17 +226,39 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed, defineAsyncComponent, ref } from 'vue'
|
||||
import { computed, defineAsyncComponent, h, ref } from 'vue'
|
||||
import { SlidersHorizontal, X } from 'lucide-vue-next'
|
||||
import Hero from '~/components/Hero.vue'
|
||||
const HomeTermine = defineAsyncComponent(() => import('~/components/HomeTermine.vue'))
|
||||
const Spielplan = defineAsyncComponent(() => import('~/components/Spielplan.vue'))
|
||||
const PublicNews = defineAsyncComponent(() => import('~/components/PublicNews.vue'))
|
||||
const HomeActions = defineAsyncComponent(() => import('~/components/HomeActions.vue'))
|
||||
const HomeTrainingTeaser = defineAsyncComponent(() => import('~/components/HomeTrainingTeaser.vue'))
|
||||
const HomeLinksTeaser = defineAsyncComponent(() => import('~/components/HomeLinksTeaser.vue'))
|
||||
const HomeVereinsmeisterschaftenTeaser = defineAsyncComponent(() => import('~/components/HomeVereinsmeisterschaftenTeaser.vue'))
|
||||
const HomeSpielplanTeamWidget = defineAsyncComponent(() => import('~/components/HomeSpielplanTeamWidget.vue'))
|
||||
|
||||
const SectionLoadingPlaceholder = {
|
||||
name: 'SectionLoadingPlaceholder',
|
||||
render() {
|
||||
return h('section', { class: 'py-16 sm:py-20 bg-white' }, [
|
||||
h('div', { class: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8' }, [
|
||||
h('div', { class: 'h-10 max-w-xs mx-auto rounded bg-gray-200 animate-pulse mb-8' }),
|
||||
h('div', { class: 'h-56 rounded-2xl bg-gray-100 animate-pulse' })
|
||||
])
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
function loadHomeSection(loader) {
|
||||
return defineAsyncComponent({
|
||||
loader,
|
||||
loadingComponent: SectionLoadingPlaceholder,
|
||||
delay: 0,
|
||||
suspensible: false
|
||||
})
|
||||
}
|
||||
|
||||
const HomeTermine = loadHomeSection(() => import('~/components/HomeTermine.vue'))
|
||||
const Spielplan = loadHomeSection(() => import('~/components/Spielplan.vue'))
|
||||
const PublicNews = loadHomeSection(() => import('~/components/PublicNews.vue'))
|
||||
const HomeActions = loadHomeSection(() => import('~/components/HomeActions.vue'))
|
||||
const HomeTrainingTeaser = loadHomeSection(() => import('~/components/HomeTrainingTeaser.vue'))
|
||||
const HomeLinksTeaser = loadHomeSection(() => import('~/components/HomeLinksTeaser.vue'))
|
||||
const HomeVereinsmeisterschaftenTeaser = loadHomeSection(() => import('~/components/HomeVereinsmeisterschaftenTeaser.vue'))
|
||||
const HomeSpielplanTeamWidget = loadHomeSection(() => import('~/components/HomeSpielplanTeamWidget.vue'))
|
||||
|
||||
const { data: config } = await useFetch('/api/config')
|
||||
const { data: authStatus } = await useFetch('/api/auth/status')
|
||||
|
||||
Reference in New Issue
Block a user