fullSizeBannerText1.vue 858 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <section class="img--section--full">
  3. <div>
  4. <picture>
  5. <source media="(max-width: 768px)" :srcset="`${imagePath}?width=768`" />
  6. <source media="(max-width: 1024px)" :srcset="`${imagePath}?width=1024`" />
  7. <source media="(max-width: 1440px)" :srcset="`${imagePath}?width=1440`" />
  8. <source media="(min-width: 1440px)" :srcset="`${imagePath}?width=1920`" />
  9. <img data-object-fit="true" :src="imagePath" :alt="altText" loading="lazy" />
  10. </picture>
  11. <div class="alt--text">{{ altText }}</div>
  12. </div>
  13. </section>
  14. </template>
  15. <script setup>
  16. // Props 정의
  17. const props = defineProps({
  18. imagePath: {
  19. type: String,
  20. default: "/img/exclusive/1920X1080_exclusive_edited_v2.jpg",
  21. },
  22. altText: {
  23. type: String,
  24. default: "Banner Image",
  25. },
  26. });
  27. </script>