101 lines
2.4 KiB
Vue
101 lines
2.4 KiB
Vue
<template>
|
|
<section
|
|
class="rounded-3xl mb-8 px-4 py-12 md:p-12 lg:p-16"
|
|
:class="{
|
|
'bg-gradient-conic-2': bgColor === 'conic-2',
|
|
'bg-background-light': bgColor === 'light'
|
|
}">
|
|
<div
|
|
class="flex justify-between"
|
|
:class="{
|
|
'flex-col lg:flex-row gap-4': position === 'left',
|
|
'flex-col lg:flex-row-reverse': position === 'right',
|
|
'items-center gap-12': image.display === 'circle',
|
|
}">
|
|
|
|
<div
|
|
v-if="image"
|
|
:class="{
|
|
'h-20.1 w-20.1 rounded-full overflow-hidden border-4 border-white': image.display === 'circle',
|
|
'h-fit w-full lg:w-auto': image.display === 'normal'
|
|
}">
|
|
<img
|
|
:src="`/img/${image.src}`"
|
|
:alt="image.alt"
|
|
class="w-full h-full"
|
|
:class="{
|
|
'object-cover': image.display === 'circle',
|
|
'object-contain': image.display === 'normal'
|
|
}"
|
|
/>
|
|
</div>
|
|
|
|
<div
|
|
class="flex flex-col gap-4 w-full"
|
|
:class="{
|
|
'lg:w-2/3': image.display === 'circle',
|
|
'lg:w-1/2': image.display === 'normal',
|
|
}">
|
|
<h2 class="font-bold ">{{ title }}</h2>
|
|
<ul v-if="paragraphs" class="flex flex-col gap-6">
|
|
<li v-for="(paragraph, index) in paragraphs" :key="`paragraph-${id}-${index}`">
|
|
<p class="text-lg" v-html="paragraph"></p>
|
|
</li>
|
|
</ul>
|
|
<ul v-if="list" class="flex flex-col gap-4">
|
|
<li
|
|
v-for="(item, index) in list"
|
|
:key="`item-list-${id}-${index}`"
|
|
:class="{
|
|
'list-disc ml-6': hasBullets,
|
|
}">
|
|
<p class="text-lg" v-html="item"></p>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
id: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
title: {
|
|
type: String,
|
|
default: 'title'
|
|
},
|
|
paragraphs: {
|
|
type: Array,
|
|
default: () => []
|
|
},
|
|
list: {
|
|
type: Array,
|
|
default: () => []
|
|
},
|
|
hasBullets: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
position: {
|
|
type: String,
|
|
default: 'left'
|
|
},
|
|
bgColor: {
|
|
type: String,
|
|
default: 'conic-2'
|
|
},
|
|
image: {
|
|
type: Object,
|
|
default: () => ({
|
|
src: '',
|
|
alt: '',
|
|
display: ''
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script> |