This commit is contained in:
Sabrina Hennrich 2025-05-20 21:49:07 +02:00
parent 0a8b75750a
commit ddc44f434d

View File

@ -1,19 +1,7 @@
<template> <template>
<div class="homePage"> <div class="homePage">
<section class="heroBox" aria-labelledby="hero-heading"> <section class="heroBox" aria-labelledby="hero-heading">
<NuxtImg
provider="strapi"
src="/uploads/DML_Home_Hero_4f27bc7f8e.webp"
class="hero-bg"
format="webp"
sizes="100vw"
alt=""
aria-hidden="true"
priority
loading="eager"
preload
fetchpriority="high"
/>
<div class="container-10"> <div class="container-10">
<h1 id="hero-heading">{{ $t('home.heroBox.h1') }}</h1> <h1 id="hero-heading">{{ $t('home.heroBox.h1') }}</h1>
<h2>{{ $t('home.heroBox.h2') }}</h2> <h2>{{ $t('home.heroBox.h2') }}</h2>
@ -202,22 +190,19 @@ const canDoItems = [
<style lang="sass"> <style lang="sass">
.homePage .homePage
.heroBox .heroBox
position: relative background-image: url('https://strapi.digimedialoop.de/uploads/DML_Home_Hero_4f27bc7f8e.webp')
background-repeat: no-repeat
background-size: cover
background-position: right bottom
min-height: 35rem min-height: 35rem
height: 70vh height: 70vh
max-height: 200vw
display: flex display: flex
align-items: center align-items: center
justify-content: center justify-content: center
overflow: hidden // wichtig: Bild beschneiden position: relative
@media (max-width: $breakPointMD)
.hero-bg background-position: center bottom
position: absolute
inset: 0 // füllt Section komplett
width: 100%
height: 100%
object-fit: cover
object-position: center bottom
z-index: 0 // liegt unter Content
.container-10, h1, h2, h3 .container-10, h1, h2, h3
position: relative position: relative