schon/storefront/app/components/skeletons/cards/product.vue
Alexandr SaVBaD Waltz 556354a44d feat(storefront): overhaul theming system and unify SCSS variables
Revamped the theming system with new SCSS variables for consistent styling across light and dark themes. Replaced static color values with dynamic variables for maintainability and improved theme adaptability. Updated components and layouts to use the new variables.

- Moved theme plugin logic for optimized handling of theme cookies and attributes.
- Enhanced `useThemes` composable for simplified client-side updates and SSR support.
- Replaced redundant SCSS color definitions with centralized variables.
- Improved page structure by introducing `ui-title` for reusable section headers.
- Unified transitions and border-radius for consistent design language.

Breaking Changes:
Theming system restructured—migrate to `$main`, `$primary`, and related variables for SCSS colors. Remove usage of `--color-*` variables in templates and styles.
2026-03-01 20:16:05 +03:00

169 lines
No EOL
2.9 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">
<div class="sk__content-inner">
<el-skeleton-item
variant="p"
class="sk__brand"
/>
<el-skeleton-item
variant="p"
class="sk__name"
/>
<el-skeleton-item
variant="p"
class="sk__rating"
/>
<el-skeleton-item
variant="p"
class="sk__price"
/>
</div>
<div class="sk__buttons">
<el-skeleton-item
variant="p"
class="sk__button"
/>
<el-skeleton-item
variant="p"
class="sk__button"
/>
</div>
</div>
</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;
border: 1px solid $border;
background-color: $skeleton;
display: flex;
flex-direction: column;
&__list {
flex-direction: row;
align-items: flex-start;
padding: 15px;
& .sk__content {
width: 100%;
display: flex;
flex-direction: row;
gap: 50px;
&-wrapper {
width: 100%;
padding: 0;
display: flex;
flex-direction: row;
align-items: flex-end;
justify-content: space-between;
}
&-inner {
align-self: flex-start;
}
}
& .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: 200px;
border-radius: $less_border_radius;
}
&__content {
&-wrapper {
padding: 10px 20px 20px 20px;
display: flex;
flex-direction: column;
gap: 16px;
}
&-inner {
display: flex;
flex-direction: column;
gap: 4px;
}
}
&__price {
width: 50px;
height: 20px;
}
&__name {
width: 100%;
height: 17px;
}
&__rating {
margin-block: 4px 10px;
width: 120px;
height: 16px;
}
&__brand {
width: 75px;
height: 15px;
}
&__buttons {
width: 100%;
display: flex;
flex-direction: column;
gap: 10px;
}
&__button {
width: 100%;
height: 40px;
}
}
</style>