2026-01-18 18:57:06 +04:00
|
|
|
|
<!-- novo VERSION - Modern Grid Layout -->
|
|
|
|
|
|
@if (isnovo) {
|
|
|
|
|
|
<div class="novo-home">
|
|
|
|
|
|
<section class="novo-hero novo-hero-compact">
|
|
|
|
|
|
<div class="novo-hero-content">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h1 class="novo-hero-title">{{ 'home.welcomeTo' | translate:{ brand: brandName } }}</h1>
|
|
|
|
|
|
<p class="novo-hero-subtitle">{{ 'home.subtitle' | translate }}</p>
|
2026-02-26 22:23:08 +04:00
|
|
|
|
<a [routerLink]="'/search' | langRoute" class="novo-hero-btn">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
{{ 'home.startSearch' | translate }}
|
2026-01-18 18:57:06 +04:00
|
|
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
|
|
|
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
|
|
|
|
<polyline points="12 5 19 12 12 19"></polyline>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Items Carousel -->
|
|
|
|
|
|
<app-items-carousel />
|
|
|
|
|
|
|
|
|
|
|
|
@if (loading()) {
|
|
|
|
|
|
<div class="novo-loading">
|
|
|
|
|
|
<div class="novo-spinner"></div>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<p>{{ 'home.loading' | translate }}</p>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@if (error()) {
|
|
|
|
|
|
<div class="novo-error">
|
|
|
|
|
|
<div class="novo-error-icon">⚠️</div>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h3>{{ 'home.errorTitle' | translate }}</h3>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
<p>{{ error() }}</p>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<button (click)="loadCategories()" class="novo-retry-btn">{{ 'home.retry' | translate }}</button>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@if (!loading() && !error()) {
|
|
|
|
|
|
<section class="novo-categories">
|
|
|
|
|
|
<div class="novo-section-header">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h2>{{ 'home.categoriesTitle' | translate }}</h2>
|
|
|
|
|
|
<p>{{ 'home.categoriesSubtitle' | translate }}</p>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-02-19 01:23:25 +04:00
|
|
|
|
@if (topLevelCategories().length === 0) {
|
2026-01-18 18:57:06 +04:00
|
|
|
|
<div class="novo-empty">
|
|
|
|
|
|
<div class="novo-empty-icon">📦</div>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h3>{{ 'home.categoriesEmpty' | translate }}</h3>
|
|
|
|
|
|
<p>{{ 'home.categoriesEmptyDesc' | translate }}</p>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
} @else {
|
|
|
|
|
|
<div class="novo-categories-grid">
|
2026-02-19 01:23:25 +04:00
|
|
|
|
@for (category of topLevelCategories(); track category.categoryID) {
|
2026-02-26 22:23:08 +04:00
|
|
|
|
<a [routerLink]="['/category', category.categoryID] | langRoute" class="novo-category-card">
|
2026-01-18 18:57:06 +04:00
|
|
|
|
<div class="novo-category-image">
|
|
|
|
|
|
@if (category.icon) {
|
|
|
|
|
|
<img [src]="category.icon" [alt]="category.name" loading="lazy" />
|
|
|
|
|
|
} @else {
|
|
|
|
|
|
<div class="novo-category-placeholder">
|
|
|
|
|
|
<span>{{ category.name.charAt(0) }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="novo-category-info">
|
|
|
|
|
|
<h3>{{ category.name }}</h3>
|
|
|
|
|
|
<span class="novo-category-arrow">→</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</a>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
</section>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
} @else {
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<!-- DEXAR VERSION - Redesigned 2026 -->
|
|
|
|
|
|
<div class="dexar-home">
|
|
|
|
|
|
<!-- Hero Section with Full Width Image -->
|
|
|
|
|
|
<section class="dexar-hero">
|
|
|
|
|
|
<div class="dexar-hero-overlay">
|
|
|
|
|
|
<div class="dexar-hero-content">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h1 class="dexar-hero-title">{{ 'home.dexarHeroTitle' | translate }}</h1>
|
|
|
|
|
|
<p class="dexar-hero-subtitle">{{ 'home.dexarHeroSubtitle' | translate }}</p>
|
|
|
|
|
|
<p class="dexar-hero-tagline">{{ 'home.dexarHeroTagline' | translate }}</p>
|
2026-02-14 00:45:17 +04:00
|
|
|
|
|
|
|
|
|
|
<div class="dexar-hero-actions">
|
2026-02-14 01:28:08 +04:00
|
|
|
|
<a (click)="scrollToCatalog()" class="dexar-btn-primary">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
{{ 'home.goToCatalog' | translate }}
|
2026-02-14 00:45:17 +04:00
|
|
|
|
</a>
|
|
|
|
|
|
<button (click)="navigateToSearch()" class="dexar-btn-secondary">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
{{ 'home.findProduct' | translate }}
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<svg width="11" height="16" viewBox="0 0 11 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
|
|
<path d="M1 1L9 8L1 15" stroke="#1E3C38" stroke-width="2"/>
|
|
|
|
|
|
</svg>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
|
|
|
|
|
|
<!-- Items Carousel -->
|
|
|
|
|
|
<app-items-carousel />
|
|
|
|
|
|
|
|
|
|
|
|
@if (loading()) {
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<div class="dexar-loading">
|
|
|
|
|
|
<div class="dexar-spinner"></div>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<p>{{ 'home.loadingDexar' | translate }}</p>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@if (error()) {
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<div class="dexar-error">
|
2026-01-18 18:57:06 +04:00
|
|
|
|
<p>{{ error() }}</p>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<button (click)="loadCategories()" class="dexar-retry-btn">{{ 'home.retry' | translate }}</button>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@if (!loading() && !error()) {
|
2026-02-14 01:28:08 +04:00
|
|
|
|
<section class="dexar-categories" id="catalog">
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h2 class="dexar-categories-title">{{ 'home.catalogTitle' | translate }}</h2>
|
2026-02-19 01:23:25 +04:00
|
|
|
|
@if (topLevelCategories().length === 0) {
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<div class="dexar-empty-categories">
|
|
|
|
|
|
<div class="dexar-empty-icon">📦</div>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<h3>{{ 'home.emptyCategoriesDexar' | translate }}</h3>
|
|
|
|
|
|
<p>{{ 'home.categoriesSoonDexar' | translate }}</p>
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
} @else {
|
2026-02-14 00:45:17 +04:00
|
|
|
|
<div class="dexar-categories-grid">
|
2026-02-19 01:23:25 +04:00
|
|
|
|
@for (category of topLevelCategories(); track category.categoryID) {
|
2026-02-26 22:23:08 +04:00
|
|
|
|
<a [routerLink]="['/category', category.categoryID] | langRoute"
|
2026-02-14 02:34:11 +04:00
|
|
|
|
class="dexar-category-card"
|
|
|
|
|
|
[class.dexar-category-card--wide]="isWideCategory(category.categoryID)">
|
2026-02-14 01:28:08 +04:00
|
|
|
|
<div class="dexar-category-image">
|
2026-02-26 21:54:21 +04:00
|
|
|
|
@if (isWideCategory(category.categoryID) && category.wideBanner) {
|
2026-02-14 02:34:11 +04:00
|
|
|
|
<img [src]="category.wideBanner" [alt]="category.name" loading="lazy" decoding="async" />
|
|
|
|
|
|
} @else if (category.icon) {
|
2026-02-14 01:28:08 +04:00
|
|
|
|
<img [src]="category.icon" [alt]="category.name" loading="lazy" decoding="async" />
|
|
|
|
|
|
} @else {
|
|
|
|
|
|
<div class="dexar-category-fallback">{{ category.name.charAt(0) }}</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="dexar-category-info">
|
|
|
|
|
|
<h3 class="dexar-category-name">{{ category.name }}</h3>
|
2026-02-26 23:09:20 +04:00
|
|
|
|
<p class="dexar-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.categoryID) } }}</p>
|
2026-02-14 01:28:08 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
</a>
|
2026-02-14 00:45:17 +04:00
|
|
|
|
}
|
2026-01-18 18:57:06 +04:00
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
</section>
|
|
|
|
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|