feat: implement top navigation (#2805)

* feat: implement top navigation

* chore: fix order
This commit is contained in:
Alex Inkin
2024-12-30 20:07:44 +04:00
committed by GitHub
parent 89ab67e067
commit 57e75e3614
42 changed files with 542 additions and 644 deletions

View File

@@ -1,13 +1,13 @@
<header>
<div class="title">
<store-icon
[class.tui-skeleton]="!registry"
[class.tui-skeleton_rounded]="!registry"
[tuiSkeleton]="!registry"
[style.border-radius.%]="!registry ? 100 : null"
size="60px"
[url]="registry?.url || ''"
[marketplace]="iconConfig"
/>
<h1 [class.tui-skeleton]="!registry">
<h1 [tuiSkeleton]="!registry">
{{ registry?.info?.name || 'Unnamed Registry' }}
</h1>
<!-- change registry modal -->
@@ -31,19 +31,18 @@
>
<store-icon
size="42px"
[style.height]="'42px'"
[style.border-radius]="'100%'"
[style.height.px]="42"
[style.border-radius.%]="100"
[url]="registry?.url || ''"
[marketplace]="iconConfig"
[class.tui-skeleton]="!registry"
[class.tui-skeleton_rounded]="!registry"
[tuiSkeleton]="!registry"
/>
<nav
*tuiSidebar="open; direction: 'right'; autoWidth: true"
class="nav-mobile-sidebar divide-bar"
>
<div class="nav-mobile-sidebar-top">
<h1 [class.tui-skeleton]="!registry">
<h1 [tuiSkeleton]="!registry">
{{ registry?.info?.name }}
</h1>
<button

View File

@@ -1,6 +1,7 @@
import { CommonModule } from '@angular/common'
import { NgModule } from '@angular/core'
import { SharedPipesModule } from '@start9labs/shared'
import { TuiSkeleton } from '@taiga-ui/kit'
import { MenuComponent } from './menu.component'
import { TuiLoader, TuiIcon, TuiButton, TuiAppearance } from '@taiga-ui/core'
@@ -25,6 +26,7 @@ import { StoreIconComponentModule } from '../store-icon/store-icon.component.mod
TuiLet,
TuiAppearance,
TuiIcon,
TuiSkeleton,
],
declarations: [MenuComponent],
exports: [MenuComponent],

View File

@@ -19,6 +19,7 @@ import { MarketplaceConfig, sameUrl } from '@start9labs/shared'
/>
</ng-template>
`,
styles: ':host { overflow: hidden; }',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StoreIconComponent {

View File

@@ -39,11 +39,11 @@ export class CategoriesComponent {
readonly categoryChange = new EventEmitter<string>()
readonly fallback: Record<string, T.Category> = {
a: { name: 'a', description: { short: 'a', long: 'a' } },
b: { name: 'a', description: { short: 'a', long: 'a' } },
c: { name: 'a', description: { short: 'a', long: 'a' } },
d: { name: 'a', description: { short: 'a', long: 'a' } },
e: { name: 'a', description: { short: 'a', long: 'a' } },
a: { name: '', description: { short: 'a', long: 'a' } },
b: { name: '', description: { short: 'a', long: 'a' } },
c: { name: '', description: { short: 'a', long: 'a' } },
d: { name: '', description: { short: 'a', long: 'a' } },
e: { name: '', description: { short: 'a', long: 'a' } },
}
switchCategory(category: string): void {