CAtegory component making
This commit is contained in:
@@ -62,8 +62,8 @@
|
||||
</div>
|
||||
} @else {
|
||||
<div class="novo-categories-grid">
|
||||
@for (category of topLevelCategories(); track category.categoryID) {
|
||||
<a [routerLink]="['/category', category.categoryID] | langRoute" class="novo-category-card">
|
||||
@for (category of topLevelCategories(); track category.id) {
|
||||
<a [routerLink]="['/category', category.id] | langRoute" class="novo-category-card">
|
||||
<div class="novo-category-image">
|
||||
@if (category.icon) {
|
||||
<img [src]="category.icon" [alt]="categoryName(category)" loading="lazy" />
|
||||
@@ -75,8 +75,8 @@
|
||||
</div>
|
||||
<div class="novo-category-info">
|
||||
<h3>{{ categoryName(category) }}</h3>
|
||||
@if (getItemCount(category.categoryID)) {
|
||||
<p class="novo-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.categoryID) } }}</p>
|
||||
@if (getItemCount(category.id)) {
|
||||
<p class="novo-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.id) } }}</p>
|
||||
}
|
||||
</div>
|
||||
</a>
|
||||
@@ -150,14 +150,11 @@
|
||||
</div>
|
||||
} @else {
|
||||
<div class="dexar-categories-grid">
|
||||
@for (category of topLevelCategories(); track category.categoryID) {
|
||||
<a [routerLink]="['/category', category.categoryID] | langRoute"
|
||||
class="dexar-category-card"
|
||||
[class.dexar-category-card--wide]="isWideCategory(category.categoryID)">
|
||||
@for (category of topLevelCategories(); track category.id) {
|
||||
<a [routerLink]="['/category', category.id] | langRoute"
|
||||
class="dexar-category-card">
|
||||
<div class="dexar-category-image">
|
||||
@if (isWideCategory(category.categoryID) && category.wideBanner) {
|
||||
<img [src]="category.wideBanner" [alt]="categoryName(category)" loading="lazy" decoding="async" />
|
||||
} @else if (category.icon) {
|
||||
@if (category.icon) {
|
||||
<img [src]="category.icon" [alt]="categoryName(category)" loading="lazy" decoding="async" />
|
||||
} @else {
|
||||
<div class="dexar-category-fallback">{{ categoryName(category).charAt(0) }}</div>
|
||||
@@ -165,7 +162,7 @@
|
||||
</div>
|
||||
<div class="dexar-category-info">
|
||||
<h3 class="dexar-category-name">{{ categoryName(category) }}</h3>
|
||||
<p class="dexar-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.categoryID) } }}</p>
|
||||
<p class="dexar-category-count">{{ 'home.itemsCount' | translate:{ count: getItemCount(category.id) } }}</p>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user