added translations
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<div class="novo-home">
|
||||
<section class="novo-hero novo-hero-compact">
|
||||
<div class="novo-hero-content">
|
||||
<h1 class="novo-hero-title">Добро пожаловать в {{ brandName }}</h1>
|
||||
<p class="novo-hero-subtitle">Найдите всё, что нужно, в одном месте</p>
|
||||
<h1 class="novo-hero-title">{{ 'home.welcomeTo' | translate:{ brand: brandName } }}</h1>
|
||||
<p class="novo-hero-subtitle">{{ 'home.subtitle' | translate }}</p>
|
||||
<a [routerLink]="'/search' | langRoute" class="novo-hero-btn">
|
||||
Начать поиск
|
||||
{{ 'home.startSearch' | translate }}
|
||||
<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>
|
||||
@@ -21,31 +21,31 @@
|
||||
@if (loading()) {
|
||||
<div class="novo-loading">
|
||||
<div class="novo-spinner"></div>
|
||||
<p>Загружаем категории...</p>
|
||||
<p>{{ 'home.loading' | translate }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (error()) {
|
||||
<div class="novo-error">
|
||||
<div class="novo-error-icon">⚠️</div>
|
||||
<h3>Что-то пошло не так</h3>
|
||||
<h3>{{ 'home.errorTitle' | translate }}</h3>
|
||||
<p>{{ error() }}</p>
|
||||
<button (click)="loadCategories()" class="novo-retry-btn">Попробовать снова</button>
|
||||
<button (click)="loadCategories()" class="novo-retry-btn">{{ 'home.retry' | translate }}</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!loading() && !error()) {
|
||||
<section class="novo-categories">
|
||||
<div class="novo-section-header">
|
||||
<h2>Категории товаров</h2>
|
||||
<p>Выберите интересующую категорию</p>
|
||||
<h2>{{ 'home.categoriesTitle' | translate }}</h2>
|
||||
<p>{{ 'home.categoriesSubtitle' | translate }}</p>
|
||||
</div>
|
||||
|
||||
@if (topLevelCategories().length === 0) {
|
||||
<div class="novo-empty">
|
||||
<div class="novo-empty-icon">📦</div>
|
||||
<h3>Категории скоро появятся</h3>
|
||||
<p>Мы работаем над наполнением каталога</p>
|
||||
<h3>{{ 'home.categoriesEmpty' | translate }}</h3>
|
||||
<p>{{ 'home.categoriesEmptyDesc' | translate }}</p>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="novo-categories-grid">
|
||||
@@ -78,16 +78,16 @@
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<div class="dexar-hero-actions">
|
||||
<a (click)="scrollToCatalog()" class="dexar-btn-primary">
|
||||
Перейти в каталог
|
||||
{{ 'home.goToCatalog' | translate }}
|
||||
</a>
|
||||
<button (click)="navigateToSearch()" class="dexar-btn-secondary">
|
||||
Найти товар
|
||||
{{ 'home.findProduct' | translate }}
|
||||
<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>
|
||||
@@ -103,25 +103,25 @@
|
||||
@if (loading()) {
|
||||
<div class="dexar-loading">
|
||||
<div class="dexar-spinner"></div>
|
||||
<p>Загрузка категорий...</p>
|
||||
<p>{{ 'home.loadingDexar' | translate }}</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (error()) {
|
||||
<div class="dexar-error">
|
||||
<p>{{ error() }}</p>
|
||||
<button (click)="loadCategories()" class="dexar-retry-btn">Попробовать снова</button>
|
||||
<button (click)="loadCategories()" class="dexar-retry-btn">{{ 'home.retry' | translate }}</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!loading() && !error()) {
|
||||
<section class="dexar-categories" id="catalog">
|
||||
<h2 class="dexar-categories-title">Каталог товаров</h2>
|
||||
<h2 class="dexar-categories-title">{{ 'home.catalogTitle' | translate }}</h2>
|
||||
@if (topLevelCategories().length === 0) {
|
||||
<div class="dexar-empty-categories">
|
||||
<div class="dexar-empty-icon">📦</div>
|
||||
<h3>Категории пока отсутствуют</h3>
|
||||
<p>Скоро здесь появятся категории товаров</p>
|
||||
<h3>{{ 'home.emptyCategoriesDexar' | translate }}</h3>
|
||||
<p>{{ 'home.categoriesSoonDexar' | translate }}</p>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="dexar-categories-grid">
|
||||
@@ -140,7 +140,7 @@
|
||||
</div>
|
||||
<div class="dexar-category-info">
|
||||
<h3 class="dexar-category-name">{{ category.name }}</h3>
|
||||
<p class="dexar-category-count">{{ getItemCount(category.categoryID) }} товаров</p>
|
||||
<p class="dexar-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.categoryID) } }}</p>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
|
||||
@@ -5,10 +5,11 @@ import { Category } from '../../models';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { ItemsCarouselComponent } from '../../components/items-carousel/items-carousel.component';
|
||||
import { LangRoutePipe } from '../../pipes/lang-route.pipe';
|
||||
import { TranslatePipe } from '../../i18n/translate.pipe';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
imports: [RouterLink, ItemsCarouselComponent, LangRoutePipe],
|
||||
imports: [RouterLink, ItemsCarouselComponent, LangRoutePipe, TranslatePipe],
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
|
||||
Reference in New Issue
Block a user