schon/storefront/components/skeletons/cards/product.vue
Alexandr SaVBaD Waltz 129ad1a6fa Features: 1) Build standalone pages for search, contact, catalog, category, brand, product, and home with localized metadata and scoped styles; 2) Add extensive TypeScript definitions for API and app-level structures, including products, orders, brands, and categories; 3) Implement i18n configuration with dynamic browser language detection and fallback system;
Fixes: None;

Extra: 1) Create Pinia stores for app, user, category, and company management; 2) Add utility functions for error handling and category slug lookups; 3) Include German locale file and robots.txt for improved SEO and accessibility; 4) Add SVG assets and improve general folder structure for better maintainability.
2025-06-27 00:10:35 +03:00

159 lines
No EOL
2.6 KiB
Vue

<template>
<el-skeleton
class="sk"
:class="[{'sk__list': isList }]"
animated
>
<template #template>
<div class="sk__content">
<el-skeleton-item
variant="image"
class="sk__image"
/>
<div class="sk__content-wrapper">
<el-skeleton-item
variant="p"
class="sk__price"
/>
<el-skeleton-item
variant="p"
class="sk__name"
/>
<el-skeleton-item
variant="p"
class="sk__rating"
/>
<el-skeleton-item
variant="p"
class="sk__quantity"
/>
</div>
</div>
<div class="sk__buttons">
<el-skeleton-item
variant="p"
class="sk__button"
/>
<el-skeleton-item
variant="p"
class="sk__button"
/>
</div>
</template>
</el-skeleton>
</template>
<script setup lang="ts">
const props = defineProps<{
isList?: boolean
}>()
</script>
<style lang="scss" scoped>
.sk {
width: 100%;
border-radius: $default_border_radius;
background-color: rgba(255, 255, 255, 0.61);
border: 2px solid $accent;
display: flex;
flex-direction: column;
&__list {
flex-direction: row;
align-items: flex-start;
padding: 10px;
& .sk__content {
width: 100%;
display: flex;
flex-direction: row;
&-wrapper {
width: 100%;
padding-top: 0;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 5px;
}
}
& .sk__image {
width: 150px;
height: 150px;
}
& .sk__price {
width: 100px;
}
& .sk__quantity {
width: 100px;
}
& .sk__buttons {
width: fit-content;
margin-top: 0;
flex-direction: column;
align-items: flex-end;
}
& .sk__button {
&:first-child {
width: 140px;
}
}
}
&__image {
width: 100%;
height: 220px;
border-radius: $default_border_radius;
}
&__content {
&-wrapper {
padding: 24px 20px 20px 20px;
}
}
&__price {
width: 35%;
height: 25px;
}
&__name {
width: 100%;
height: 75px;
}
&__rating {
width: 120px;
height: 40px;
}
&__quantity {
width: 50%;
height: 18px;
}
&__buttons {
width: 100%;
display: flex;
align-items: center;
gap: 10px;
margin-top: auto;
padding: 0 20px 20px 20px;
}
&__button {
width: 100%;
height: 34px;
&:last-child {
width: 34px;
flex-shrink: 0;
}
}
}
</style>