updated carousel view

This commit is contained in:
sdarbinyan
2026-01-18 19:44:46 +04:00
parent bd80896886
commit 49d19181df
5 changed files with 825 additions and 1470 deletions

View File

@@ -7,7 +7,7 @@
} @else if (products().length > 0) {
<p-carousel
[value]="products()"
[numVisible]="4"
[numVisible]="6"
[numScroll]="1"
[circular]="true"
[responsiveOptions]="responsiveOptions"
@@ -32,20 +32,25 @@
<span class="rating-count">({{ product.callbacks?.length || 0 }})</span>
</div>
<div class="item-price">
@if (product.discount > 0) {
<span class="original-price">{{ product.price }} {{ product.currency }}</span>
<span class="discounted-price">{{ getDiscountedPrice(product) | number:'1.0-0' }} {{ product.currency }}</span>
} @else {
<span class="current-price">{{ product.price }} {{ product.currency }}</span>
}
<div class="item-price-row">
<div class="item-price">
@if (product.discount > 0) {
<span class="original-price">{{ product.price }} {{ product.currency }}</span>
<span class="discounted-price">{{ getDiscountedPrice(product) | number:'1.0-0' }} {{ product.currency }}</span>
} @else {
<span class="current-price">{{ product.price }} {{ product.currency }}</span>
}
</div>
<button class="cart-icon-btn" (click)="addToCart($event, product)" title="Добавить в корзину">
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="9" cy="21" r="1"></circle>
<circle cx="20" cy="21" r="1"></circle>
<path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path>
</svg>
</button>
</div>
</div>
</a>
<button class="add-to-cart-btn" (click)="addToCart(product)">
В корзину
</button>
</div>
</ng-template>