Loheide-eu-mitarbeiterplatt.../resources/js/components/CoverBanner.vue
Friederich Loheide 05b4b79cb3
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m47s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m41s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 4m8s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 4m6s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 5m25s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 5m23s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 4m39s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 4m40s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m8s
Titelbild im Profil, durchsuchbare Baum-Auswahl im IT-Ticket (0.20.1)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 05:20:19 +00:00

26 lines
1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script setup>
import { computed } from 'vue';
import { usePage } from '@inertiajs/vue3';
/**
* Titelbild (Profil, Begrüßung): eigenes Bild der Person oder das Standardbild aus
* dem Erscheinungsbild – immer unter einer leicht durchsichtigen Fläche in der Markenfarbe.
*/
const props = defineProps({
image: { type: String, default: null },
});
const cover = computed(() => usePage().props.branding?.profile_cover ?? {});
const src = computed(() => props.image || cover.value.image_url || null);
</script>
<template>
<div class="relative isolate overflow-hidden bg-brand">
<template v-if="src">
<img :src="src" alt="" class="absolute inset-0 -z-10 size-full object-cover" loading="lazy" />
<div class="absolute inset-0 -z-10 bg-brand" :style="{ opacity: cover.overlay ?? 0.7 }" />
</template>
<div v-else class="absolute inset-0 -z-10" style="background-image: linear-gradient(120deg, transparent 40%, rgb(255 255 255 / 0.08))" />
<slot />
</div>
</template>