diff --git a/src/app/products/k b/src/app/products/k new file mode 100644 index 0000000..e69de29 diff --git a/src/app/products/products.component.css b/src/app/products/products.component.css index aa19098..b9d9ad3 100644 --- a/src/app/products/products.component.css +++ b/src/app/products/products.component.css @@ -67,3 +67,16 @@ display: none; /* Chrome, Safari, Opera */ } +.category-label { + display: inline-block; + background-color: var(--AJsystem-blue); /* O cualquier color que estés usando */ + color: white; + padding: 8px 20px; + font-size: 2rem; + font-weight: bold; + border-radius: 0px; + margin-bottom: 10px; + text-transform: uppercase; + font-family: var(--ff-calibri); + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); +} diff --git a/src/app/products/products.component.html b/src/app/products/products.component.html index 583aff5..aa658dc 100644 --- a/src/app/products/products.component.html +++ b/src/app/products/products.component.html @@ -71,11 +71,68 @@ --> +
Portatiles
+
+ +
+ +
+ +
+
Celulares
- + -
+
  • @@ -1260,7 +1317,7 @@
- +
\ No newline at end of file diff --git a/src/app/products/products.component.ts b/src/app/products/products.component.ts index c747282..592a943 100644 --- a/src/app/products/products.component.ts +++ b/src/app/products/products.component.ts @@ -8,29 +8,53 @@ import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core'; export class ProductsComponent implements AfterViewInit { @ViewChild('scrollBox', { static: false }) scrollBox!: ElementRef; + @ViewChild('scrollPortatiles', { static: false }) scrollPortatiles!: ElementRef; + @ViewChild('scrollCelulares', { static: false }) scrollCelulares!: ElementRef; + maxScrollLeft = 0; ngAfterViewInit() { setTimeout(() => { - this.maxScrollLeft = this.scrollBox.nativeElement.scrollWidth - this.scrollBox.nativeElement.clientWidth; + this.maxScrollLeft = this.scrollPortatiles.nativeElement.scrollWidth - this.scrollPortatiles.nativeElement.clientWidth; + }, 100); + setTimeout(() => { + this.maxScrollLeft = this.scrollCelulares.nativeElement.scrollWidth - this.scrollCelulares.nativeElement.clientWidth; }, 100); } - scrollLeft() { - if (this.scrollBox.nativeElement.scrollLeft <= 0) { - this.scrollBox.nativeElement.scrollTo({ left: this.maxScrollLeft, behavior: 'smooth' }); + scrollLeftPortatiles() { + if (this.scrollPortatiles.nativeElement.scrollLeft <= 0) { + this.scrollPortatiles.nativeElement.scrollTo({ left: this.maxScrollLeft, behavior: 'smooth' }); } else { - this.scrollBox.nativeElement.scrollBy({ left: -277, behavior: 'smooth' }); + this.scrollPortatiles.nativeElement.scrollBy({ left: -277, behavior: 'smooth' }); } } - scrollRight() { - const scroll = this.scrollBox.nativeElement; + scrollRightPortatiles() { + const scroll = this.scrollPortatiles.nativeElement; if (scroll.scrollLeft + scroll.clientWidth >= scroll.scrollWidth - 5) { scroll.scrollTo({ left: 0, behavior: 'smooth' }); } else { scroll.scrollBy({ left: 277, behavior: 'smooth' }); } } + + scrollLeftCelulares() { + if (this.scrollCelulares.nativeElement.scrollLeft <= 0) { + this.scrollCelulares.nativeElement.scrollTo({ left: this.maxScrollLeft, behavior: 'smooth' }); + } else { + this.scrollCelulares.nativeElement.scrollBy({ left: -277, behavior: 'smooth' }); + } + } + + scrollRightCelulares() { + const scroll = this.scrollCelulares.nativeElement; + if (scroll.scrollLeft + scroll.clientWidth >= scroll.scrollWidth - 5) { + scroll.scrollTo({ left: 0, behavior: 'smooth' }); + } else { + scroll.scrollBy({ left: 277, behavior: 'smooth' }); + } + } + } diff --git a/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.jpg b/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.jpg new file mode 100644 index 0000000..b38ff68 Binary files /dev/null and b/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.jpg differ diff --git a/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.webp b/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.webp new file mode 100644 index 0000000..d03cc00 Binary files /dev/null and b/src/assets/images/portatiles/ACER A314-36P-323FPURE SILVER.webp differ