|
@@ -1,20 +1,22 @@
|
|
|
<template>
|
|
<template>
|
|
|
<LayoutContainer>
|
|
<LayoutContainer>
|
|
|
- <v-row class="row-custom">
|
|
|
|
|
- <table class="table-comparatif">
|
|
|
|
|
|
|
+ <v-row>
|
|
|
|
|
+ <table>
|
|
|
<thead>
|
|
<thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <th class="thead" />
|
|
|
|
|
- <th class="thead">
|
|
|
|
|
- <p class="standard" :style="{ color: color }">Standard</p>
|
|
|
|
|
|
|
+ <th/>
|
|
|
|
|
+
|
|
|
|
|
+ <th>
|
|
|
|
|
+ <p class="standard">Standard</p>
|
|
|
<p class="from">À partir de</p>
|
|
<p class="from">À partir de</p>
|
|
|
<p class="price">
|
|
<p class="price">
|
|
|
{{ standardPrice }} <span class="ttc">ttc</span>
|
|
{{ standardPrice }} <span class="ttc">ttc</span>
|
|
|
</p>
|
|
</p>
|
|
|
<p class="month">/mois</p>
|
|
<p class="month">/mois</p>
|
|
|
</th>
|
|
</th>
|
|
|
- <th class="thead premium-column">
|
|
|
|
|
- <p class="standard" :style="{ color: color }">Premium</p>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <th class="premium-column">
|
|
|
|
|
+ <p class="standard">Premium</p>
|
|
|
<p class="from">À partir de</p>
|
|
<p class="from">À partir de</p>
|
|
|
<p class="price">
|
|
<p class="price">
|
|
|
{{ premiumPrice }} <span class="ttc">ttc</span>
|
|
{{ premiumPrice }} <span class="ttc">ttc</span>
|
|
@@ -23,43 +25,52 @@
|
|
|
</th>
|
|
</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
- <tbody class="table-body">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <tbody>
|
|
|
<tr
|
|
<tr
|
|
|
- v-for="(row, index) in tableData"
|
|
|
|
|
- :key="row.id"
|
|
|
|
|
- class="table-row"
|
|
|
|
|
- :style="{
|
|
|
|
|
- backgroundColor: index % 2 !== 0 ? stripeColor : 'white',
|
|
|
|
|
- }"
|
|
|
|
|
|
|
+ v-for="(item, index) in items"
|
|
|
|
|
+ :key="item.label"
|
|
|
>
|
|
>
|
|
|
- <td class="table-data-left">{{ row.column1 }}</td>
|
|
|
|
|
- <td class="table-data-second">
|
|
|
|
|
|
|
+ <td class="label-column">
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </td>
|
|
|
|
|
+
|
|
|
|
|
+ <td>
|
|
|
<v-icon
|
|
<v-icon
|
|
|
- v-if="row.column2 === 'check'"
|
|
|
|
|
|
|
+ v-if="item.includedInStandard === true"
|
|
|
|
|
+ icon="far fa-check-circle"
|
|
|
size="18"
|
|
size="18"
|
|
|
- class="far fa-check-circle"
|
|
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
<v-icon
|
|
<v-icon
|
|
|
- v-else-if="row.column2 === 'cross'"
|
|
|
|
|
|
|
+ v-else-if="item.includedInStandard === false"
|
|
|
|
|
+ icon="far fa-times-circle"
|
|
|
size="18"
|
|
size="18"
|
|
|
- class="far fa-times-circle"
|
|
|
|
|
color="red"
|
|
color="red"
|
|
|
/>
|
|
/>
|
|
|
- <span v-else>{{ row.column2 }}</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ {{ item.includedInStandard }}
|
|
|
|
|
+ </span>
|
|
|
</td>
|
|
</td>
|
|
|
- <td class="table-data-second">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <td>
|
|
|
<v-icon
|
|
<v-icon
|
|
|
- v-if="row.column3 === 'check'"
|
|
|
|
|
|
|
+ v-if="item.includedInPremium === true"
|
|
|
|
|
+ icon="far fa-check-circle"
|
|
|
size="18"
|
|
size="18"
|
|
|
- class="far fa-check-circle"
|
|
|
|
|
/>
|
|
/>
|
|
|
|
|
+
|
|
|
<v-icon
|
|
<v-icon
|
|
|
- v-else-if="row.column3 === 'cross'"
|
|
|
|
|
|
|
+ v-else-if="item.includedInPremium === false"
|
|
|
|
|
+ icon="far fa-times-circle"
|
|
|
size="18"
|
|
size="18"
|
|
|
- class="far fa-times-circle"
|
|
|
|
|
color="red"
|
|
color="red"
|
|
|
/>
|
|
/>
|
|
|
- <span v-else>{{ row.column3 }}</span>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <span v-else>
|
|
|
|
|
+ {{ item.includedInPremium }}
|
|
|
|
|
+ </span>
|
|
|
</td>
|
|
</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
@@ -68,8 +79,9 @@
|
|
|
</LayoutContainer>
|
|
</LayoutContainer>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<script setup>
|
|
|
|
|
-import { ref } from "vue";
|
|
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+
|
|
|
|
|
+import { ComparisonItem } from "~/types/interface";
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
standardPrice: {
|
|
standardPrice: {
|
|
@@ -80,27 +92,69 @@ const props = defineProps({
|
|
|
type: String,
|
|
type: String,
|
|
|
default: "46,20€",
|
|
default: "46,20€",
|
|
|
},
|
|
},
|
|
|
- color: {
|
|
|
|
|
- type: String,
|
|
|
|
|
- default: "#0e2d32",
|
|
|
|
|
- },
|
|
|
|
|
- stripeColor: {
|
|
|
|
|
- type: String,
|
|
|
|
|
- default: "rgba(32, 147, 190, 0.2)",
|
|
|
|
|
- },
|
|
|
|
|
- tableData: {
|
|
|
|
|
- type: Array,
|
|
|
|
|
- default: () => [],
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ items: {
|
|
|
|
|
+ type: Array as PropType<Array<ComparisonItem>>,
|
|
|
|
|
+ required: true
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
-<style scoped>
|
|
|
|
|
|
|
|
|
|
-.table-data-second {
|
|
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+.v-row {
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ margin-left: auto;
|
|
|
|
|
+ margin-right: auto;
|
|
|
|
|
+ width: 90%;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+table {
|
|
|
|
|
+ width: 70%;
|
|
|
|
|
+ margin-top: 1rem;
|
|
|
|
|
+ margin-right: auto;
|
|
|
|
|
+ margin-left: auto;
|
|
|
|
|
+ border: none;
|
|
|
|
|
+ border-collapse: collapse;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+th {
|
|
|
|
|
+ height: 8rem;
|
|
|
|
|
+ font-family: "Barlow", serif;
|
|
|
|
|
+ font-style: normal;
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ line-height: 34px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+tr {
|
|
|
|
|
+ height: 3rem;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+tbody tr:nth-child(even) {
|
|
|
|
|
+ background-color: var(--secondary-color);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+td {
|
|
|
padding-right: 5rem;
|
|
padding-right: 5rem;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+td:first-child {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ padding-left: 20px;
|
|
|
|
|
+ font-family: "Barlow", serif;
|
|
|
|
|
+ font-style: normal;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ line-height: 16px;
|
|
|
|
|
+ letter-spacing: 0.18em;
|
|
|
|
|
+ text-transform: uppercase;
|
|
|
|
|
+ color: var(--on-neutral-color-alt);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.standard {
|
|
.standard {
|
|
|
- font-family: "Barlow";
|
|
|
|
|
font-style: normal;
|
|
font-style: normal;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
@@ -108,20 +162,18 @@ const props = defineProps({
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
letter-spacing: 0.18em;
|
|
letter-spacing: 0.18em;
|
|
|
text-transform: uppercase;
|
|
text-transform: uppercase;
|
|
|
- color: #0e2d32;
|
|
|
|
|
|
|
+ color: var(--primary-color);
|
|
|
padding-right: 5rem;
|
|
padding-right: 5rem;
|
|
|
margin-bottom: 1rem;
|
|
margin-bottom: 1rem;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.from,
|
|
.from,
|
|
|
.ttc {
|
|
.ttc {
|
|
|
- font-family: "Barlow";
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
font-weight: 300;
|
|
font-weight: 300;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
|
line-height: 14px;
|
|
line-height: 14px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- color: #454545;
|
|
|
|
|
|
|
+ color: var(--on-neutral-color-alt);
|
|
|
padding-right: 5rem;
|
|
padding-right: 5rem;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -131,67 +183,13 @@ const props = defineProps({
|
|
|
|
|
|
|
|
.price,
|
|
.price,
|
|
|
.month {
|
|
.month {
|
|
|
- font-family: "Barlow";
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
font-size: 30px;
|
|
font-size: 30px;
|
|
|
line-height: 34px;
|
|
line-height: 34px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
- color: #454545;
|
|
|
|
|
|
|
+ color: var(--on-neutral-color-alt);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.month {
|
|
.month {
|
|
|
padding-right: 5rem;
|
|
padding-right: 5rem;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.table-data-left {
|
|
|
|
|
- text-align: left;
|
|
|
|
|
- padding-left: 20px;
|
|
|
|
|
- font-family: "Barlow";
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- line-height: 16px;
|
|
|
|
|
-
|
|
|
|
|
- letter-spacing: 0.18em;
|
|
|
|
|
- text-transform: uppercase;
|
|
|
|
|
- color: #454545;
|
|
|
|
|
-}
|
|
|
|
|
-.table-data {
|
|
|
|
|
- text-align: left;
|
|
|
|
|
- padding-left: 20px;
|
|
|
|
|
- font-family: "Barlow";
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- line-height: 16px;
|
|
|
|
|
-
|
|
|
|
|
- letter-spacing: 0.18em;
|
|
|
|
|
- text-transform: uppercase;
|
|
|
|
|
- color: #454545;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-.thead {
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- height: 8rem;
|
|
|
|
|
- font-family: "Barlow";
|
|
|
|
|
- font-style: normal;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- font-size: 30px;
|
|
|
|
|
- line-height: 34px;
|
|
|
|
|
-}
|
|
|
|
|
-.table-comparatif {
|
|
|
|
|
- width: 70%;
|
|
|
|
|
- margin-top: 1rem;
|
|
|
|
|
- margin-right: auto;
|
|
|
|
|
- margin-left: auto;
|
|
|
|
|
- border: none;
|
|
|
|
|
- border-collapse: collapse;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-.table-body .table-row:nth-child(odd) {
|
|
|
|
|
- background-color: rgba(190, 32, 77, 0.2);
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
</style>
|
|
</style>
|