diff --git a/assets/scss/main.scss b/assets/scss/main.scss index db32c6b..00771a4 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -24,6 +24,7 @@ h3 { @include h3('h3'); } +//скроллбар ::-webkit-scrollbar { width: 8px; } @@ -52,4 +53,28 @@ h3 { body { -ms-overflow-style: -ms-autohiding-scrollbar; +} + +//swiper +.swiper { + width: 100%; + height: 100%; +} + +.swiper-slide { + text-align: center; + font-size: 18px; + background: #444; + + /* Center slide text vertically */ + display: flex; + justify-content: center; + align-items: center; +} + +.swiper-slide img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; } \ No newline at end of file diff --git a/components/ProductDescription.vue b/components/ProductDescription.vue index 3ef1df4..a5c1218 100644 --- a/components/ProductDescription.vue +++ b/components/ProductDescription.vue @@ -95,6 +95,11 @@ function addToCartBtn() { .product-description { width: 100%; max-width: 335px; + padding-top: 30px; + padding-inline: 30px; + display: flex; + flex-direction: column; + gap: 10px; @media (min-width: 768px) { position: sticky; @@ -104,12 +109,6 @@ function addToCartBtn() { max-height: calc(100vh - 80px); } - padding-top: 30px; - padding-inline: 30px; - display: flex; - flex-direction: column; - gap: 10px; - &__sizes { display: grid; grid-template-columns: repeat(4, 1fr); diff --git a/components/ProductImages.vue b/components/ProductImages.vue index b80a833..d01e53c 100644 --- a/components/ProductImages.vue +++ b/components/ProductImages.vue @@ -1,5 +1,5 @@ @@ -19,7 +41,7 @@ const { currentVariantImages } = useCurrentProduct() .product-images { position: relative; width: 100%; - display: flex; - flex-direction: column; + display: grid; + grid-template-columns: repeat(2, 1fr); } diff --git a/layouts/default.vue b/layouts/default.vue index 1159861..8c08e2b 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -32,9 +32,9 @@ - + + + diff --git a/package.json b/package.json index 5902cbb..16450f4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dayjs": "^1.11.13", "decimal.js": "^10.5.0", "nuxt": "^3.17.6", + "swiper": "^12.0.2", "typescript": "^5.6.3", "vue": "^3.5.17", "vue-router": "^4.5.1" diff --git a/pages/cart.vue b/pages/cart.vue index abbc09f..4c22df5 100644 --- a/pages/cart.vue +++ b/pages/cart.vue @@ -9,12 +9,15 @@ -
-
{{ `Товары: ${cart?.line_items?.length}` }}
+
+
+
{{ `Товары: ${cart?.line_items?.length}` }}
+
{{ `Сумма: ${cart?.line_items?.length}` }}
- - Перейти к оформлению - + + Перейти к оформлению + +
@@ -22,6 +25,7 @@ diff --git a/pages/product/[id].vue b/pages/product/[id].vue index d968845..30ffaba 100644 --- a/pages/product/[id].vue +++ b/pages/product/[id].vue @@ -1,14 +1,54 @@ -