Files
marketplaces/src/app/components/header/header.component.html

151 lines
6.1 KiB
HTML
Raw Normal View History

<!-- platform VERSION - Redesigned 2026 -->
<header class="platform-header" [class.platform-header--static]="headerConfig().sticky === false" [class.platform-header--centered]="headerConfig().layout === 'centered'">
<div class="platform-header-container">
2026-02-14 00:45:17 +04:00
<!-- Logo -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showLogo) {
<a [attr.href]="homeUrl" class="platform-logo" (click)="navigateHome($event)">
<app-logo />
</a>
}
2026-01-18 18:57:06 +04:00
2026-02-14 02:59:26 +04:00
<!-- Navigation Buttons (desktop) -->
<nav class="platform-nav">
<div class="platform-nav-group">
<a [routerLink]="'/' | langRoute" routerLinkActive="platform-active" [routerLinkActiveOptions]="{exact: true}"
(click)="closeMenu()" class="platform-nav-btn">
2026-02-26 23:09:20 +04:00
{{ 'header.home' | translate }}
2026-02-14 00:45:17 +04:00
</a>
2026-07-10 13:43:53 +04:00
@if (headerConfig().showCategories) {
<button type="button" (click)="navigateToCatalog()" class="platform-nav-btn">
2026-07-10 13:43:53 +04:00
{{ 'header.catalog' | translate }}
</button>
}
2026-07-10 13:52:01 +04:00
@for (page of headerPages(); track page.id) {
<button type="button" (click)="navigateToStatic(page.route)" class="platform-nav-btn">
2026-07-10 13:52:01 +04:00
{{ page.title }}
</button>
}
2026-02-14 00:45:17 +04:00
</div>
</nav>
2026-02-14 02:34:11 +04:00
<!-- Search Box (desktop) -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showSearch) {
<div class="platform-search-wrapper">
<div class="platform-search-box">
<app-icon name="search" [size]="20" class="platform-search-icon" />
<input type="text" [placeholder]="'header.searchPlaceholder' | translate" class="platform-search-input" (click)="navigateToSearch()" readonly />
2026-02-14 00:45:17 +04:00
</div>
</div>
2026-07-10 13:43:53 +04:00
}
2026-02-14 00:45:17 +04:00
2026-02-14 02:34:11 +04:00
<!-- Search Icon (mobile only) -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showSearch) {
<button class="platform-search-mobile" (click)="navigateToSearch()" [attr.aria-label]="'header.search' | translate">
<app-icon name="search" [size]="18" />
2026-02-14 02:34:11 +04:00
</button>
2026-07-10 13:43:53 +04:00
}
2026-02-14 02:34:11 +04:00
2026-02-14 00:45:17 +04:00
<!-- Right Actions -->
<div class="platform-actions">
2026-07-10 15:55:38 +04:00
@if (headerConfig().showWishlist && features().wishlist && userExperienceConfig().wishlist.enabled) {
<button type="button" class="platform-ux-btn" (click)="navigateToWishlist()" [attr.aria-label]="'header.wishlist' | translate">
<app-icon name="heart" [size]="16" class="platform-ux-icon" />
2026-07-10 13:43:53 +04:00
@if (userExperienceConfig().wishlist.headerBadgeEnabled && wishlistCount() > 0) {
<span class="platform-ux-badge">{{ wishlistCount() }}</span>
}
</button>
}
2026-07-10 15:55:38 +04:00
@if (headerConfig().showCompare && features().compare && userExperienceConfig().compare.enabled) {
<button type="button" class="platform-ux-btn" (click)="navigateToCompare()" [attr.aria-label]="'header.compare' | translate">
<app-icon name="scale" [size]="16" class="platform-ux-icon" />
@if (compareCount() > 0) {
<span class="platform-ux-badge">{{ compareCount() }}</span>
}
</button>
}
2026-02-14 00:45:17 +04:00
<!-- Cart Button -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showCart) {
<a [routerLink]="'/cart' | langRoute" routerLinkActive="platform-cart-active" class="platform-cart-btn" (click)="closeMenu()">
<span class="platform-cart-icon">
<app-icon name="cart" [size]="24" />
2026-06-20 14:00:28 +04:00
@if (cartItemCount() > 0) {
<span class="platform-cart-badge">{{ cartItemCount() }}</span>
2026-06-20 14:00:28 +04:00
}
</span>
2026-01-18 18:57:06 +04:00
@if (cartItemCount() > 0) {
<span class="platform-cart-total">{{ formatCartTotal(cartTotal()) }}</span>
2026-01-18 18:57:06 +04:00
}
</a>
2026-07-10 13:43:53 +04:00
}
2026-01-18 18:57:06 +04:00
2026-02-28 17:18:24 +04:00
<!-- Region Selector (desktop only) -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showRegion) {
<div class="platform-region-selector platform-lang-desktop">
2026-02-28 17:18:24 +04:00
<app-region-selector />
</div>
2026-07-10 13:43:53 +04:00
}
2026-02-28 17:18:24 +04:00
2026-02-14 02:59:26 +04:00
<!-- Language Selector (desktop only) -->
2026-07-10 13:43:53 +04:00
@if (headerConfig().showLanguages) {
<div class="platform-lang-selector platform-lang-desktop">
2026-02-14 00:45:17 +04:00
<app-language-selector />
</div>
2026-07-10 13:43:53 +04:00
}
2026-01-18 18:57:06 +04:00
2026-02-14 00:45:17 +04:00
<!-- Mobile Menu Toggle -->
<button class="platform-menu-toggle" (click)="toggleMenu()" [class.active]="menuOpen" [attr.aria-label]="menuOpen ? ('header.closeMenu' | translate) : ('header.openMenu' | translate)" [attr.aria-expanded]="menuOpen">
2026-02-14 00:45:17 +04:00
<span></span>
<span></span>
<span></span>
</button>
2026-01-18 18:57:06 +04:00
</div>
</div>
</header>
2026-02-14 02:59:26 +04:00
<!-- Mobile Menu Backdrop (outside header to blur page content) -->
@if (menuOpen) {
<div class="platform-menu-backdrop" (click)="closeMenu()"></div>
2026-02-14 02:59:26 +04:00
}
<!-- Mobile Menu Panel (outside header for correct stacking) -->
<div class="platform-mobile-menu" [class.platform-mobile-menu-open]="menuOpen">
<a [routerLink]="'/' | langRoute" routerLinkActive="platform-mobile-active" [routerLinkActiveOptions]="{exact: true}"
(click)="closeMenu()" class="platform-mobile-item">
<app-icon name="home" [size]="24" />
2026-02-26 23:09:20 +04:00
<span>{{ 'header.home' | translate }}</span>
<app-icon name="chevronRight" [size]="16" class="platform-mobile-chevron" />
2026-02-14 02:59:26 +04:00
</a>
2026-07-10 13:43:53 +04:00
@if (headerConfig().showCategories) {
<button type="button" (click)="navigateToCatalog()" class="platform-mobile-item">
<app-icon name="layoutGrid" [size]="24" />
2026-02-26 23:09:20 +04:00
<span>{{ 'header.catalog' | translate }}</span>
<app-icon name="chevronRight" [size]="16" class="platform-mobile-chevron" />
</button>
2026-07-10 13:43:53 +04:00
}
2026-02-14 02:59:26 +04:00
2026-07-10 13:52:01 +04:00
@for (page of headerPages(); track page.id) {
<button type="button" (click)="navigateToStatic(page.route)" class="platform-mobile-item">
2026-07-10 13:52:01 +04:00
<span>{{ page.title }}</span>
<app-icon name="chevronRight" [size]="16" class="platform-mobile-chevron" />
</button>
2026-07-10 13:52:01 +04:00
}
2026-02-14 02:59:26 +04:00
<div class="platform-mobile-controls">
2026-07-10 13:43:53 +04:00
@if (headerConfig().showRegion) {
<div class="platform-mobile-lang">
2026-06-10 17:49:22 +04:00
<app-region-selector />
</div>
2026-07-10 13:43:53 +04:00
}
@if (headerConfig().showLanguages) {
<div class="platform-mobile-lang">
2026-06-10 17:49:22 +04:00
<app-language-selector />
</div>
2026-07-10 13:43:53 +04:00
}
2026-02-14 02:59:26 +04:00
</div>
</div>