BackdropImage.vue 684 Bytes
<script lang="ts" setup>
//#region --Props--.
defineProps({
  src: {
    type: String,
    required: true,
    nullable: false,
  },
  title: {
    type: String,
    required: true,
    nullable: false,
  },
});
//#endregion

//#region --Declaration--.
const w: Window = window;
//#endregion
</script>

<template>
  <section class="absolute inset-0 h-[500px] overflow-hidden z-0">
    <v-img
      v-if="src"
      :alt="title"
      :src="`https://image.tmdb.org/t/p/original${src}`"
      :width="w.screen.width"
      aspect-ratio="16/9"
      class="w-full h-full object-cover opacity-30"
      cover
      max-height="500"
    />
  </section>
</template>

<style scoped></style>