changed header and hero img
This commit is contained in:
@@ -49,48 +49,67 @@
|
||||
</div>
|
||||
</header>
|
||||
} @else {
|
||||
<!-- DEXAR VERSION - Original -->
|
||||
<header class="header">
|
||||
<div class="header-container">
|
||||
<a routerLink="/" class="logo" (click)="closeMenu()">
|
||||
<!-- DEXAR VERSION - Redesigned 2026 -->
|
||||
<header class="dexar-header">
|
||||
<div class="dexar-header-container">
|
||||
<!-- Logo -->
|
||||
<a routerLink="/" class="dexar-logo" (click)="closeMenu()">
|
||||
<app-logo />
|
||||
<!-- <span class="logo-text">{{ brandName }}</span> -->
|
||||
</a>
|
||||
|
||||
<nav class="nav" [class.nav-open]="menuOpen">
|
||||
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}" (click)="closeMenu()">
|
||||
<span class="nav-icon">🏠</span>
|
||||
<span class="nav-text">Главная</span>
|
||||
</a>
|
||||
<a routerLink="/search" routerLinkActive="active" (click)="closeMenu()">
|
||||
<span class="nav-icon">🔍</span>
|
||||
<span class="nav-text">Поиск</span>
|
||||
</a>
|
||||
<a routerLink="/cart" routerLinkActive="active" class="cart-link" (click)="closeMenu()">
|
||||
<span class="nav-icon">🛒</span>
|
||||
<span class="nav-text">Корзина</span>
|
||||
@if (cartItemCount() > 0) {
|
||||
<span class="cart-badge">{{ cartItemCount() }}</span>
|
||||
}
|
||||
</a>
|
||||
<!-- Navigation Buttons -->
|
||||
<nav class="dexar-nav" [class.dexar-nav-open]="menuOpen">
|
||||
<div class="dexar-nav-group">
|
||||
<a routerLink="/" routerLinkActive="dexar-active" [routerLinkActiveOptions]="{exact: true}"
|
||||
(click)="closeMenu()" class="dexar-nav-btn dexar-nav-btn-left">
|
||||
Главная
|
||||
</a>
|
||||
<a routerLink="/about" (click)="closeMenu()" class="dexar-nav-btn dexar-nav-btn-middle">
|
||||
О нас
|
||||
</a>
|
||||
<a routerLink="/contacts" (click)="closeMenu()" class="dexar-nav-btn dexar-nav-btn-right">
|
||||
Контакты
|
||||
</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<a routerLink="/cart" routerLinkActive="active" class="cart-link-mobile" (click)="closeMenu()">
|
||||
<span class="cart-icon">🛒</span>
|
||||
@if (cartItemCount() > 0) {
|
||||
<span class="cart-badge">{{ cartItemCount() }}</span>
|
||||
}
|
||||
</a>
|
||||
|
||||
<div class="header-actions">
|
||||
<app-language-selector />
|
||||
<!-- Search Box -->
|
||||
<div class="dexar-search-wrapper">
|
||||
<div class="dexar-search-box">
|
||||
<svg class="dexar-search-icon" width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z" fill="#576463" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.2929 18.2929C18.6834 17.9024 19.3166 17.9024 19.7071 18.2929L25.7071 24.2929C26.0976 24.6834 26.0976 25.3166 25.7071 25.7071C25.3166 26.0976 24.6834 26.0976 24.2929 25.7071L18.2929 19.7071C17.9024 19.3166 17.9024 18.6834 18.2929 18.2929Z" fill="#576463" />
|
||||
</svg>
|
||||
<input type="text" placeholder="Искать..." class="dexar-search-input" (click)="navigateToSearch()" readonly />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="menu-toggle" (click)="toggleMenu()" [class.active]="menuOpen">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<!-- Right Actions -->
|
||||
<div class="dexar-actions">
|
||||
<!-- Cart Button -->
|
||||
<a routerLink="/cart" routerLinkActive="dexar-cart-active" class="dexar-cart-btn" (click)="closeMenu()">
|
||||
<svg width="48" height="32" viewBox="0 0 48 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 0.5H36C42.3513 0.5 47.5 5.64873 47.5 12V20C47.5 26.3513 42.3513 31.5 36 31.5H12C5.64873 31.5 0.5 26.3513 0.5 20V12C0.5 5.64873 5.64873 0.5 12 0.5Z" fill="#497671" fill-opacity="0.3" />
|
||||
<path d="M12 0.5H36C42.3513 0.5 47.5 5.64873 47.5 12V20C47.5 26.3513 42.3513 31.5 36 31.5H12C5.64873 31.5 0.5 26.3513 0.5 20V12C0.5 5.64873 5.64873 0.5 12 0.5Z" stroke="#677B78" />
|
||||
<path d="M10 3.9C10 3.40294 10.4029 3 10.9 3H13.6C14.013 3 14.373 3.28107 14.4731 3.68172L15.2027 6.6H36.1C36.3677 6.6 36.6216 6.7192 36.7925 6.92523C36.9635 7.13125 37.0339 7.40271 36.9846 7.66586L34.2846 22.0659C34.2048 22.4915 33.8331 22.8 33.4 22.8H31.6H19H17.2C16.7669 22.8 16.3952 22.4915 16.3154 22.0659L13.6204 7.69224L12.8973 4.8H10.9C10.4029 4.8 10 4.39706 10 3.9ZM15.5844 8.4L17.9469 21H32.6531L35.0156 8.4H15.5844ZM19 22.8C17.0118 22.8 15.4 24.4118 15.4 26.4C15.4 28.3882 17.0118 30 19 30C20.9882 30 22.6 28.3882 22.6 26.4C22.6 24.4118 20.9882 22.8 19 22.8ZM31.6 22.8C29.6118 22.8 28 24.4118 28 26.4C28 28.3882 29.6118 30 31.6 30C33.5882 30 35.2 28.3882 35.2 26.4C35.2 24.4118 33.5882 22.8 31.6 22.8ZM19 24.6C19.9941 24.6 20.8 25.4059 20.8 26.4C20.8 27.3941 19.9941 28.2 19 28.2C18.0059 28.2 17.2 27.3941 17.2 26.4C17.2 25.4059 18.0059 24.6 19 24.6ZM31.6 24.6C32.5941 24.6 33.4 25.4059 33.4 26.4C33.4 27.3941 32.5941 28.2 31.6 28.2C30.6059 28.2 29.8 27.3941 29.8 26.4C29.8 25.4059 30.6059 24.6 31.6 24.6Z" fill="#1E3C38" />
|
||||
</svg>
|
||||
@if (cartItemCount() > 0) {
|
||||
<span class="dexar-cart-badge">{{ cartItemCount() }}</span>
|
||||
}
|
||||
</a>
|
||||
|
||||
<!-- Language Selector -->
|
||||
<div class="dexar-lang-selector">
|
||||
<app-language-selector />
|
||||
</div>
|
||||
|
||||
<!-- Mobile Menu Toggle -->
|
||||
<button class="dexar-menu-toggle" (click)="toggleMenu()" [class.active]="menuOpen">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
}
|
||||
|
||||
@@ -449,3 +449,358 @@
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
|
||||
// ========== DEXAR REDESIGN 2026 STYLES ==========
|
||||
.dexar-header {
|
||||
background: rgba(117, 121, 124, 0.1);
|
||||
padding: 14px 0;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.dexar-header-container {
|
||||
max-width: 1440px;
|
||||
margin: 0 auto;
|
||||
padding: 0 56px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 57px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.dexar-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
flex-shrink: 0;
|
||||
|
||||
::ng-deep .logo-img {
|
||||
width: 148px;
|
||||
height: 48px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
// Navigation Buttons Group
|
||||
.dexar-nav {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dexar-nav-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dexar-nav-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10px 48px;
|
||||
height: 49px;
|
||||
border: 1px solid #d3dad9;
|
||||
background: rgba(255, 255, 255, 0.74);
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
color: #1e3c38;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s ease;
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover {
|
||||
background: #a1b4b5;
|
||||
color: #1e3c38;
|
||||
}
|
||||
|
||||
&.dexar-active {
|
||||
background: #497671;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-nav-btn-left {
|
||||
border-radius: 13px 0 0 13px;
|
||||
padding: 10px 48px;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-middle {
|
||||
padding: 10px 63px;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-right {
|
||||
border-radius: 0 13px 13px 0;
|
||||
padding: 10px 42px;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
// Search Box
|
||||
.dexar-search-wrapper {
|
||||
flex: 1;
|
||||
max-width: 234px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.dexar-search-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 49px;
|
||||
background: rgba(255, 255, 255, 0.74);
|
||||
border: 1px solid #d2dad9;
|
||||
border-radius: 22px;
|
||||
box-shadow: 0 3px 4px rgba(0, 0, 0, 0.15);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.dexar-search-icon {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dexar-search-input {
|
||||
flex: 1;
|
||||
border: none;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
color: #828e8d;
|
||||
cursor: pointer;
|
||||
|
||||
&::placeholder {
|
||||
color: #828e8d;
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
.dexar-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dexar-cart-btn {
|
||||
position: relative;
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: opacity 0.3s ease;
|
||||
|
||||
svg {
|
||||
width: 48px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
&.dexar-cart-active {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-cart-badge {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
font-size: 0.75rem;
|
||||
padding: 2px 6px;
|
||||
border-radius: 10px;
|
||||
min-width: 18px;
|
||||
text-align: center;
|
||||
box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
|
||||
border: 2px solid white;
|
||||
}
|
||||
|
||||
.dexar-lang-selector {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dexar-menu-toggle {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
|
||||
span {
|
||||
width: 25px;
|
||||
height: 3px;
|
||||
background: #1e3c38;
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
&.active {
|
||||
span:nth-child(1) {
|
||||
transform: rotate(45deg) translate(7px, 4.5px);
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
span:nth-child(3) {
|
||||
transform: rotate(-45deg) translate(7px, -4.5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Responsive Design
|
||||
@media (max-width: 1200px) {
|
||||
.dexar-header-container {
|
||||
padding: 0 32px;
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
.dexar-nav-btn {
|
||||
font-size: 18px;
|
||||
padding: 8px 32px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-left {
|
||||
padding: 8px 32px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-middle {
|
||||
padding: 8px 40px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-right {
|
||||
padding: 8px 28px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.dexar-header-container {
|
||||
padding: 0 20px;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.dexar-logo ::ng-deep .logo-img {
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.dexar-nav-btn {
|
||||
font-size: 16px;
|
||||
padding: 8px 24px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-left {
|
||||
padding: 8px 24px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-middle {
|
||||
padding: 8px 28px !important;
|
||||
}
|
||||
|
||||
.dexar-nav-btn-right {
|
||||
padding: 8px 20px !important;
|
||||
}
|
||||
|
||||
.dexar-search-box {
|
||||
height: 42px;
|
||||
}
|
||||
|
||||
.dexar-search-input {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.dexar-header-container {
|
||||
gap: 12px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.dexar-nav {
|
||||
position: fixed;
|
||||
top: 84px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: white;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease;
|
||||
|
||||
&.dexar-nav-open {
|
||||
max-height: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-nav-group {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.dexar-nav-btn {
|
||||
width: 100%;
|
||||
border-radius: 0 !important;
|
||||
border: none;
|
||||
border-bottom: 1px solid #d3dad9;
|
||||
padding: 16px !important;
|
||||
font-size: 18px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(161, 180, 181, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-nav-btn-left,
|
||||
.dexar-nav-btn-middle,
|
||||
.dexar-nav-btn-right {
|
||||
padding: 16px !important;
|
||||
}
|
||||
|
||||
.dexar-search-wrapper {
|
||||
flex: 1;
|
||||
max-width: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dexar-search-box {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.dexar-search-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.dexar-search-input {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.dexar-menu-toggle {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.dexar-logo ::ng-deep .logo-img {
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterLink, RouterLinkActive } from '@angular/router';
|
||||
import { Router, RouterLink, RouterLinkActive } from '@angular/router';
|
||||
import { CartService } from '../../services';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { LogoComponent } from '../logo/logo.component';
|
||||
@@ -20,7 +20,7 @@ export class HeaderComponent {
|
||||
logo = environment.logo;
|
||||
isnovo = environment.theme === 'novo';
|
||||
|
||||
constructor(private cartService: CartService) {
|
||||
constructor(private cartService: CartService, private router: Router) {
|
||||
this.cartItemCount = this.cartService.itemCount;
|
||||
}
|
||||
|
||||
@@ -31,4 +31,8 @@ export class HeaderComponent {
|
||||
closeMenu(): void {
|
||||
this.menuOpen = false;
|
||||
}
|
||||
|
||||
navigateToSearch(): void {
|
||||
this.router.navigate(['/search']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,6 +152,73 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Dexar header specific styles
|
||||
:host-context(.dexar-header) {
|
||||
.language-selector {
|
||||
width: 67px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.language-button {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 6px;
|
||||
gap: 8px;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border: 1px solid #677b78;
|
||||
border-radius: 12px;
|
||||
color: #1e3c38;
|
||||
justify-content: center;
|
||||
|
||||
&:hover {
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
border-color: #677b78;
|
||||
}
|
||||
|
||||
.language-flag {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.language-code {
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 24px;
|
||||
color: #1e3c38;
|
||||
letter-spacing: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.dropdown-arrow {
|
||||
display: block;
|
||||
width: 9px;
|
||||
height: 14px;
|
||||
opacity: 1;
|
||||
|
||||
path {
|
||||
stroke: #1e3c38;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.language-dropdown {
|
||||
background: #ffffff;
|
||||
border-color: #d3dad9;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.language-option {
|
||||
color: #1e3c38;
|
||||
|
||||
&:hover:not(.disabled) {
|
||||
background: rgba(161, 180, 181, 0.2);
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: rgba(73, 118, 113, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mobile responsiveness
|
||||
@media (max-width: 768px) {
|
||||
.language-button {
|
||||
@@ -177,4 +244,15 @@
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
:host-context(.dexar-header) {
|
||||
.language-selector {
|
||||
width: 56px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.language-button .language-code {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@ import { environment } from '../../../environments/environment';
|
||||
@Component({
|
||||
selector: 'app-logo',
|
||||
standalone: true,
|
||||
template: `<img [src]="logoPath" [alt]="brandName + ' logo'" class="logo-img" width="120" height="40" fetchpriority="high" />`,
|
||||
template: `<img [src]="logoPath" [alt]="brandName + ' logo'" class="logo-img" fetchpriority="high" />`,
|
||||
styles: [`
|
||||
.logo-img {
|
||||
height: 40px;
|
||||
width: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
`]
|
||||
})
|
||||
|
||||
@@ -72,55 +72,73 @@
|
||||
}
|
||||
</div>
|
||||
} @else {
|
||||
<!-- DEXAR VERSION - Original -->
|
||||
<div class="home-container">
|
||||
<header class="hero hero-compact">
|
||||
<h1>{{ brandName }}</h1>
|
||||
<p>Ваш маркетплейс товаров и услуг</p>
|
||||
</header>
|
||||
<!-- 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">
|
||||
<h1 class="dexar-hero-title">Здесь ты найдёшь всё</h1>
|
||||
<p class="dexar-hero-subtitle">Тысячи товаров в одном месте</p>
|
||||
<p class="dexar-hero-tagline">просто и удобно</p>
|
||||
|
||||
<div class="dexar-hero-actions">
|
||||
<a routerLink="/search" class="dexar-btn-primary">
|
||||
Перейти в каталог
|
||||
</a>
|
||||
<button (click)="navigateToSearch()" class="dexar-btn-secondary">
|
||||
Найти товар
|
||||
<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>
|
||||
|
||||
<!-- Items Carousel -->
|
||||
<app-items-carousel />
|
||||
|
||||
@if (loading()) {
|
||||
<div class="loading">
|
||||
<div class="spinner"></div>
|
||||
<div class="dexar-loading">
|
||||
<div class="dexar-spinner"></div>
|
||||
<p>Загрузка категорий...</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (error()) {
|
||||
<div class="error">
|
||||
<div class="dexar-error">
|
||||
<p>{{ error() }}</p>
|
||||
<button (click)="loadCategories()">Попробовать снова</button>
|
||||
<button (click)="loadCategories()" class="dexar-retry-btn">Попробовать снова</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!loading() && !error()) {
|
||||
<section class="categories">
|
||||
<h2>Категории</h2>
|
||||
<section class="dexar-categories">
|
||||
<h2 class="dexar-categories-title">Категории</h2>
|
||||
@if (getTopLevelCategories().length === 0) {
|
||||
<div class="empty-categories">
|
||||
<div class="empty-icon">📦</div>
|
||||
<div class="dexar-empty-categories">
|
||||
<div class="dexar-empty-icon">📦</div>
|
||||
<h3>Категории пока отсутствуют</h3>
|
||||
<p>Скоро здесь появятся категории товаров</p>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="categories-grid">
|
||||
<div class="dexar-categories-grid">
|
||||
@for (category of getTopLevelCategories(); track category.categoryID) {
|
||||
<div class="category-card">
|
||||
<a [routerLink]="['/category', category.categoryID]" class="category-link">
|
||||
<div class="category-media">
|
||||
@if (category.icon) {
|
||||
<img [src]="category.icon" [alt]="category.name" loading="lazy" decoding="async" />
|
||||
} @else {
|
||||
<div class="category-fallback">{{ category.name }}</div>
|
||||
}
|
||||
</div>
|
||||
<h3>{{ category.name }}</h3>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
<div class="dexar-category-card">
|
||||
<a [routerLink]="['/category', category.categoryID]" class="dexar-category-link">
|
||||
<div class="dexar-category-media">
|
||||
@if (category.icon) {
|
||||
<img [src]="category.icon" [alt]="category.name" loading="lazy" decoding="async" />
|
||||
} @else {
|
||||
<div class="dexar-category-fallback">{{ category.name }}</div>
|
||||
}
|
||||
</div>
|
||||
<h3>{{ category.name }}</h3>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
|
||||
@@ -701,3 +701,500 @@
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
// ========== DEXAR REDESIGN 2026 STYLES ==========
|
||||
.dexar-home {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Hero Section
|
||||
.dexar-hero {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
background-image: url('/assets/images/hero_background_desktop.webp');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
overflow: hidden;
|
||||
|
||||
// Mobile hero image
|
||||
@media (max-width: 768px) {
|
||||
background-image: url('/assets/images/hero_background_mobile.webp');
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-hero-overlay {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(255, 255, 255, 0.9) 0%,
|
||||
rgba(255, 255, 255, 0.7) 50%,
|
||||
rgba(255, 255, 255, 0.3) 100%
|
||||
);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 56px;
|
||||
}
|
||||
|
||||
.dexar-hero-content {
|
||||
max-width: 660px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
animation: fadeInUp 0.8s ease-out;
|
||||
}
|
||||
|
||||
@keyframes fadeInUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-hero-title {
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 57px;
|
||||
color: #1e3c38;
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
animation: fadeInUp 0.8s ease-out 0.1s both;
|
||||
}
|
||||
|
||||
.dexar-hero-subtitle {
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #1e3c38;
|
||||
line-height: 1.3;
|
||||
margin: 0;
|
||||
animation: fadeInUp 0.8s ease-out 0.2s both;
|
||||
}
|
||||
|
||||
.dexar-hero-tagline {
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #1e3c38;
|
||||
line-height: 1.3;
|
||||
margin: 0;
|
||||
animation: fadeInUp 0.8s ease-out 0.3s both;
|
||||
}
|
||||
|
||||
.dexar-hero-actions {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
margin-top: 20px;
|
||||
animation: fadeInUp 0.8s ease-out 0.4s both;
|
||||
}
|
||||
|
||||
.dexar-btn-primary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 337px;
|
||||
height: 60px;
|
||||
background: linear-gradient(360deg, #497671 0%, #a7ceca 100%);
|
||||
border: 1px solid #d3dad9;
|
||||
border-radius: 13px;
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 27px;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
letter-spacing: 1.08px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 12px rgba(73, 118, 113, 0.3);
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 16px rgba(73, 118, 113, 0.4);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0px);
|
||||
box-shadow: 0 2px 8px rgba(73, 118, 113, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-btn-secondary {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 9px;
|
||||
width: 264px;
|
||||
height: 60px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #d3dad9;
|
||||
border-radius: 13px;
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 27px;
|
||||
color: #1e3c38;
|
||||
letter-spacing: 1.08px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
|
||||
svg {
|
||||
width: 11px;
|
||||
height: 16px;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: #ffffff;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
|
||||
|
||||
svg {
|
||||
transform: translateX(3px);
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0px);
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
// Loading & Error States
|
||||
.dexar-loading,
|
||||
.dexar-error {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.dexar-spinner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 4px solid #f3f3f3;
|
||||
border-top: 4px solid #497671;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
.dexar-error {
|
||||
button {
|
||||
margin-top: 20px;
|
||||
padding: 12px 28px;
|
||||
background: #497671;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 13px;
|
||||
cursor: pointer;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
|
||||
&:hover {
|
||||
background: #3d635f;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(73, 118, 113, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Categories Section
|
||||
.dexar-categories {
|
||||
max-width: 1200px;
|
||||
margin: 50px auto;
|
||||
padding: 0 56px;
|
||||
}
|
||||
|
||||
.dexar-categories-title {
|
||||
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
font-size: 2.5rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 40px;
|
||||
color: #1e3c38;
|
||||
}
|
||||
|
||||
.dexar-empty-categories {
|
||||
text-align: center;
|
||||
padding: 80px 20px;
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||
|
||||
.dexar-empty-icon {
|
||||
font-size: 4rem;
|
||||
margin-bottom: 20px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.8rem;
|
||||
color: #1e3c38;
|
||||
margin: 0 0 12px 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #667a77;
|
||||
font-size: 1.1rem;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-categories-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 30px;
|
||||
animation: fadeIn 0.6s ease-in 0.3s both;
|
||||
}
|
||||
|
||||
.dexar-category-card {
|
||||
background: white;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
background: linear-gradient(90deg, #497671 0%, #a7ceca 100%);
|
||||
transform: scaleX(0);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 12px 32px rgba(73, 118, 113, 0.2);
|
||||
|
||||
&::before {
|
||||
transform: scaleX(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-category-link {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
padding: 20px;
|
||||
|
||||
h3 {
|
||||
font-size: 1.3rem;
|
||||
font-weight: 600;
|
||||
color: #1e3c38;
|
||||
margin: 16px 0 0 0;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
&:hover h3 {
|
||||
color: #497671;
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-category-media {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
background: #f5f5f5;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
&:hover img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
.dexar-category-fallback {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
color: #497671;
|
||||
background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
|
||||
}
|
||||
|
||||
// Responsive Design
|
||||
@media (max-width: 1200px) {
|
||||
.dexar-hero {
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.dexar-hero-overlay {
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
.dexar-hero-title {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.dexar-hero-subtitle,
|
||||
.dexar-hero-tagline {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.dexar-categories {
|
||||
padding: 0 40px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.dexar-hero {
|
||||
height: 450px;
|
||||
}
|
||||
|
||||
.dexar-hero-overlay {
|
||||
padding: 0 32px;
|
||||
}
|
||||
|
||||
.dexar-hero-title {
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
.dexar-hero-subtitle,
|
||||
.dexar-hero-tagline {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.dexar-btn-primary {
|
||||
width: 280px;
|
||||
height: 54px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.dexar-btn-secondary {
|
||||
width: 220px;
|
||||
height: 54px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.dexar-categories {
|
||||
padding: 0 32px;
|
||||
}
|
||||
|
||||
.dexar-categories-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.dexar-hero {
|
||||
height: 400px;
|
||||
background-position: right center;
|
||||
}
|
||||
|
||||
.dexar-hero-overlay {
|
||||
padding: 0 20px;
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(255, 255, 255, 0.95) 0%,
|
||||
rgba(255, 255, 255, 0.85) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.dexar-hero-title {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.dexar-hero-subtitle,
|
||||
.dexar-hero-tagline {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.dexar-hero-actions {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dexar-btn-primary,
|
||||
.dexar-btn-secondary {
|
||||
width: 100%;
|
||||
max-width: 320px;
|
||||
height: 50px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.dexar-categories {
|
||||
margin: 40px auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.dexar-categories-title {
|
||||
font-size: 2rem;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.dexar-categories-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.dexar-category-media {
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.dexar-hero {
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.dexar-hero-title {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.dexar-hero-subtitle,
|
||||
.dexar-hero-tagline {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.dexar-hero-actions {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.dexar-btn-primary,
|
||||
.dexar-btn-secondary {
|
||||
height: 46px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.dexar-categories-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.dexar-category-card:hover {
|
||||
transform: translateY(-4px);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit, signal, computed, ChangeDetectionStrategy } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterLink } from '@angular/router';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { ApiService } from '../../services';
|
||||
import { Category } from '../../models';
|
||||
import { environment } from '../../../environments/environment';
|
||||
@@ -40,7 +40,7 @@ export class HomeComponent implements OnInit {
|
||||
return cache;
|
||||
});
|
||||
|
||||
constructor(private apiService: ApiService) {}
|
||||
constructor(private apiService: ApiService, private router: Router) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadCategories();
|
||||
@@ -68,4 +68,8 @@ export class HomeComponent implements OnInit {
|
||||
getSubCategories(parentID: number): Category[] {
|
||||
return this.subcategoriesCache().get(parentID) || [];
|
||||
}
|
||||
|
||||
navigateToSearch(): void {
|
||||
this.router.navigate(['/search']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
/* PrimeNG and PrimeIcons */
|
||||
@import 'primeicons/primeicons.css';
|
||||
|
||||
/* Google Fonts - DM Sans for Dexar redesign */
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
|
||||
|
||||
/* Font optimization */
|
||||
@font-face {
|
||||
font-family: system-ui;
|
||||
|
||||
@@ -1,36 +1,38 @@
|
||||
// Dexar Theme - Purple/Violet Colors
|
||||
// Dexar Theme - Redesigned 2026 - Green/Teal Colors
|
||||
:root {
|
||||
--primary-color: #667eea;
|
||||
--primary-hover: #5568d3;
|
||||
--secondary-color: #764ba2;
|
||||
--secondary-hover: #653a8e;
|
||||
--accent-color: #f093fb;
|
||||
--accent-hover: #e07ff0;
|
||||
--primary-color: #497671;
|
||||
--primary-hover: #3d635f;
|
||||
--secondary-color: #a1b4b5;
|
||||
--secondary-hover: #8da3a4;
|
||||
--accent-color: #a7ceca;
|
||||
--accent-hover: #91b9b5;
|
||||
|
||||
--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
||||
--gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
--gradient-primary: linear-gradient(360deg, #497671 0%, #a7ceca 100%);
|
||||
--gradient-secondary: linear-gradient(135deg, #a1b4b5 0%, #677b78 100%);
|
||||
--gradient-hero: linear-gradient(360deg, #497671 0%, #a7ceca 100%);
|
||||
|
||||
--text-primary: #333333;
|
||||
--text-secondary: #666666;
|
||||
--text-light: #999999;
|
||||
--text-primary: #1e3c38;
|
||||
--text-secondary: #667a77;
|
||||
--text-light: #828e8d;
|
||||
|
||||
--bg-primary: #ffffff;
|
||||
--bg-secondary: #f6f7fb;
|
||||
--bg-tertiary: #e9ecf5;
|
||||
--bg-secondary: rgba(255, 255, 255, 0.74);
|
||||
--bg-tertiary: #f5f5f5;
|
||||
--bg-header: rgba(117, 121, 124, 0.1);
|
||||
|
||||
--success-color: #10b981;
|
||||
--warning-color: #f59e0b;
|
||||
--error-color: #ef4444;
|
||||
--info-color: #3b82f6;
|
||||
|
||||
--border-color: #e5e7eb;
|
||||
--border-color: #d3dad9;
|
||||
--border-dark: #677b78;
|
||||
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
--shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
--shadow-lg: 0 12px 40px rgba(102, 126, 234, 0.25);
|
||||
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
--shadow-lg: 0 12px 32px rgba(73, 118, 113, 0.2);
|
||||
|
||||
--radius-sm: 8px;
|
||||
--radius-md: 12px;
|
||||
--radius-lg: 16px;
|
||||
--radius-xl: 20px;
|
||||
--radius-lg: 13px;
|
||||
--radius-xl: 22px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user