Enhancements: - Introduced `wishlist.vue` for displaying and managing the wishlist. - Added guest cart and wishlist handling via cookies for unauthenticated users. - Implemented synchronization logic for wishlist and cart (`useOrderSync` and `useWishlistSync`) upon user login. - Updated `cart.vue` layout with a bulk 'add all to cart' button for wishlist items. - Enhanced `post.vue` prop handling for improved type safety. Fixes: - Fixed breadcrumbs console log removal in `useBreadcrumbs.ts`. - Corrected and unified translations in `en-gb.json` for cart and wishlist descriptions. - Fixed stale routes in footer (`terms-and-condition` -> `terms-and-conditions`, etc.). Extras: - Refactored composables `useWishlistOverwrite` and `useOrderOverwrite` for cookie-based fallback. - Applied code styling improvements, organized imports, and optimized API requests in Apollo plugin.
63 lines
No EOL
1.1 KiB
Vue
63 lines
No EOL
1.1 KiB
Vue
<template>
|
|
<div class="card">
|
|
<p class="card__title">{{ post.title }}</p>
|
|
<nuxt-link-locale :to="`/blog/${post.slug}`" class="card__button">{{ t('buttons.readMore') }}</nuxt-link-locale>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type {IPost} from '@types';
|
|
|
|
const props = defineProps<{
|
|
post: IPost;
|
|
}>();
|
|
|
|
const {t} = useI18n();
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
|
|
&__title {
|
|
color: #1a1a1a;
|
|
font-family: "Playfair Display", sans-serif;
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
&__button {
|
|
width: fit-content;
|
|
position: relative;
|
|
color: #1a1a1a;
|
|
transition: 0.2s;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
letter-spacing: -0.5px;
|
|
|
|
&::after {
|
|
content: "";
|
|
position: absolute;
|
|
bottom: -3px;
|
|
left: 0;
|
|
height: 2px;
|
|
width: 0;
|
|
transition: all .3s ease;
|
|
background-color: #1f2937;
|
|
}
|
|
|
|
&.active::after {
|
|
width: 100%;
|
|
}
|
|
|
|
@include hover {
|
|
&::after {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |