| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <LayoutContainer>
- <v-row>
- <table>
- <thead>
- <tr>
- <th/>
- <th>
- <p class="standard">Standard</p>
- <p class="from">À partir de</p>
- <p class="price">
- {{ standardPrice }} <span class="ttc">ttc</span>
- </p>
- <p class="month">/mois</p>
- </th>
- <th class="premium-column">
- <p class="standard">Premium</p>
- <p class="from">À partir de</p>
- <p class="price">
- {{ premiumPrice }} <span class="ttc">ttc</span>
- </p>
- <p class="month">/mois</p>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr
- v-for="(item, index) in items"
- :key="item.label"
- >
- <td class="label-column">
- {{ item.label }}
- </td>
- <td>
- <v-icon
- v-if="item.includedInStandard === true"
- icon="far fa-check-circle"
- size="18"
- />
- <v-icon
- v-else-if="item.includedInStandard === false"
- icon="far fa-times-circle"
- size="18"
- color="red"
- />
- <span v-else>
- {{ item.includedInStandard }}
- </span>
- </td>
- <td>
- <v-icon
- v-if="item.includedInPremium === true"
- icon="far fa-check-circle"
- size="18"
- />
- <v-icon
- v-else-if="item.includedInPremium === false"
- icon="far fa-times-circle"
- size="18"
- color="red"
- />
- <span v-else>
- {{ item.includedInPremium }}
- </span>
- </td>
- </tr>
- </tbody>
- </table>
- </v-row>
- </LayoutContainer>
- </template>
- <script setup lang="ts">
- import type { ComparisonItem } from "~/types/interface";
- const props = defineProps({
- standardPrice: {
- type: String,
- required: true
- },
- premiumPrice: {
- type: String,
- required: true
- },
- items: {
- type: Array as PropType<Array<ComparisonItem>>,
- required: true
- }
- });
- </script>
- <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;
- }
- 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 {
- font-style: normal;
- font-weight: 600;
- font-size: 12px;
- line-height: 16px;
- text-align: center;
- letter-spacing: 0.18em;
- text-transform: uppercase;
- color: var(--primary-color);
- padding-right: 5rem;
- margin-bottom: 1rem;
- }
- .from,
- .ttc {
- font-weight: 300;
- font-size: 12px;
- line-height: 14px;
- text-align: center;
- color: var(--on-neutral-color-alt);
- padding-right: 5rem;
- }
- .ttc {
- text-transform: uppercase;
- }
- .price,
- .month {
- font-size: 30px;
- line-height: 34px;
- text-align: center;
- color: var(--on-neutral-color-alt);
- }
- .month {
- padding-right: 5rem;
- }
- </style>
|