Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 2m18s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 2m21s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 2m40s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 2m34s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 3m8s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 3m6s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 2m43s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 2m47s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m1s
- Formulare: Felder fest aus dem Profil (nicht änderbar, Server setzt den Profilwert ein), Hinweis bei fehlender Profilangabe - Geburtstage (optionales Plugin, standardmäßig aus): Tag und Monat freiwillig im Profil, Kachel, Liste /geburtstage, Pagebuilder-Block, Glückwunsch am eigenen Geburtstag; Sichtbarkeit alle/Abteilung/Standort - Startseite: Kacheln je Bereich sortieren und ausblenden; eigene Kacheln (Bild mit Link, Text, Hinweis) mit Zeitraum und Zielgruppe - Kern: optionale mitgelieferte Plugins, Startseitenbereich „top“, Profilabschnitte für Plugins, Kachel-Bezeichnungen Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
52 lines
2.4 KiB
Vue
52 lines
2.4 KiB
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import { useMediaQuery } from '@vueuse/core';
|
|
import AppLayout from '@/layouts/AppLayout.vue';
|
|
import { widgetComponent } from '@/lib/widgets';
|
|
|
|
/**
|
|
* Startseite aus Kacheln (App\Dashboard\Widgets). Kern und Plugins liefern die
|
|
* Kacheln; diese Seite ordnet sie nur nach Bereichen an.
|
|
*/
|
|
const props = defineProps({
|
|
widgets: { type: Array, required: true },
|
|
});
|
|
|
|
const desktop = useMediaQuery('(min-width: 1024px)');
|
|
|
|
const known = computed(() => props.widgets.filter((widget) => widgetComponent(widget.component)));
|
|
const inArea = (area) => known.value.filter((widget) => widget.area === area);
|
|
const hero = computed(() => inArea('hero')[0] ?? null);
|
|
const mobile = computed(() => [...known.value].sort((a, b) => a.mobileSort - b.mobileSort));
|
|
</script>
|
|
|
|
<template>
|
|
<AppLayout title="Startseite">
|
|
<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>
|
|
|
|
<div v-if="desktop" class="grid grid-cols-12 gap-6">
|
|
<div class="col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3">
|
|
<component :is="widgetComponent(hero.component)" v-if="hero" v-bind="hero.props" class="xl:col-span-2" />
|
|
<component
|
|
:is="widgetComponent(widget.component)"
|
|
v-for="widget in inArea('feed')"
|
|
:key="widget.key"
|
|
v-bind="widget.props"
|
|
:wide="!hero"
|
|
:class="hero ? 'xl:col-span-1' : 'xl:col-span-3'"
|
|
/>
|
|
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('main')" :key="widget.key" v-bind="widget.props" class="xl:col-span-3" />
|
|
</div>
|
|
|
|
<aside class="col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3">
|
|
<component :is="widgetComponent(widget.component)" v-for="widget in inArea('aside')" :key="widget.key" v-bind="widget.props" />
|
|
</aside>
|
|
</div>
|
|
|
|
<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>
|
|
</AppLayout>
|
|
</template>
|