2024-11-02 12:47:07 +01:00
|
|
|
<template>
|
2024-11-10 08:29:08 +01:00
|
|
|
<div class="flex flex-col md:flex-row gap-8 md:gap-4">
|
2024-11-03 13:13:36 +01:00
|
|
|
<NuxtPicture
|
|
|
|
loading="lazy"
|
2024-11-10 08:29:08 +01:00
|
|
|
class="w-full md:w-1/2 min-w-[50%] object-cover object-center"
|
2024-11-03 13:13:36 +01:00
|
|
|
:class="data?.image_left ? 'order-0' : 'order-1'"
|
|
|
|
:src="baseUrl + data?.image.url"
|
2024-11-10 08:29:08 +01:00
|
|
|
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
|
2024-11-03 13:13:36 +01:00
|
|
|
/>
|
|
|
|
<FieldContent :data="data?.text" />
|
|
|
|
</div>
|
2024-11-02 12:47:07 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import type { PropType } from "vue";
|
2025-02-14 13:57:55 +01:00
|
|
|
import type DynamicZoneColumnImageText from "../../types/component/dynamic-zone/columnImageText";
|
2024-11-02 12:47:07 +01:00
|
|
|
|
2024-11-05 18:31:12 +01:00
|
|
|
const runtimeConfig = useRuntimeConfig();
|
|
|
|
const baseUrl = runtimeConfig.public.strapi.url;
|
2024-11-03 13:13:36 +01:00
|
|
|
|
2024-11-02 12:47:07 +01:00
|
|
|
defineProps({
|
|
|
|
data: Object as PropType<DynamicZoneColumnImageText>,
|
|
|
|
});
|
|
|
|
</script>
|