Startseite frei gestalten, Neuigkeiten-Block mit Kategorien-Filter (0.26.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 5m21s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m55s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m25s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 5m21s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 4m55s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m42s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 7m25s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 7m57s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 6m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 5m34s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m14s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
6290e09074
commit
2c96fcce1c
151 changed files with 1515 additions and 317 deletions
|
|
@ -1,7 +1,9 @@
|
|||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useMediaQuery } from '@vueuse/core';
|
||||
import { Eye } from '@lucide/vue';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import PageContent from '@/pagebuilder/PageContent.vue';
|
||||
import { widgetComponent } from '@/lib/widgets';
|
||||
|
||||
/**
|
||||
|
|
@ -9,7 +11,10 @@ import { widgetComponent } from '@/lib/widgets';
|
|||
* Kacheln; diese Seite ordnet sie nur nach Bereichen an.
|
||||
*/
|
||||
const props = defineProps({
|
||||
widgets: { type: Array, required: true },
|
||||
widgets: { type: Array, default: () => [] },
|
||||
// Frei gestaltete Startseite (App\Dashboard\Homepage): Blöcke statt Kacheln
|
||||
content: { type: Object, default: null },
|
||||
preview: { type: Boolean, default: false },
|
||||
});
|
||||
|
||||
const desktop = useMediaQuery('(min-width: 1024px)');
|
||||
|
|
@ -22,6 +27,16 @@ const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.m
|
|||
|
||||
<template>
|
||||
<AppLayout title="Startseite">
|
||||
<template v-if="content">
|
||||
<div v-if="preview" class="mb-6 flex flex-wrap items-center gap-x-4 gap-y-2 rounded-lg border border-amber-300 bg-amber-50 px-4 py-2.5 text-sm text-amber-900 dark:border-amber-800 dark:bg-amber-950/50 dark:text-amber-100">
|
||||
<Eye class="size-4 shrink-0" />
|
||||
<span class="flex-1">Vorschau des Entwurfs – so sieht die Startseite nach dem Veröffentlichen aus (mit Ihren Rechten).</span>
|
||||
<a href="/startseite/gestalten" class="font-medium underline">Zurück zum Editor</a>
|
||||
</div>
|
||||
<PageContent :content="content" />
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<div v-if="desktop && inArea('top').length" class="mb-6 grid gap-6">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('top')" :key="widget.key" v-bind="widget.props" />
|
||||
</div>
|
||||
|
|
@ -48,5 +63,6 @@ const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.m
|
|||
<div v-else class="grid min-w-0 grid-cols-1 gap-6">
|
||||
<component :is="widgetComponent(widget.component)" v-for="widget in mobile" :key="widget.key" v-bind="widget.props" />
|
||||
</div>
|
||||
</template>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue