diff --git a/projects/docs/src/app/shared/components/header/header.html b/projects/docs/src/app/shared/components/header/header.html index 239fdc0..088f731 100644 --- a/projects/docs/src/app/shared/components/header/header.html +++ b/projects/docs/src/app/shared/components/header/header.html @@ -2,17 +2,14 @@ \ No newline at end of file diff --git a/projects/docs/src/app/shared/components/sidebar/sidebar.html b/projects/docs/src/app/shared/components/sidebar/sidebar.html index ad18b14..0844b23 100644 --- a/projects/docs/src/app/shared/components/sidebar/sidebar.html +++ b/projects/docs/src/app/shared/components/sidebar/sidebar.html @@ -2,12 +2,20 @@
- - Slate UI - - - +
+
diff --git a/projects/docs/src/app/shared/components/sidebar/sidebar.ts b/projects/docs/src/app/shared/components/sidebar/sidebar.ts index 0db45c9..c58d6f6 100644 --- a/projects/docs/src/app/shared/components/sidebar/sidebar.ts +++ b/projects/docs/src/app/shared/components/sidebar/sidebar.ts @@ -1,8 +1,11 @@ import { NgTemplateOutlet } from '@angular/common'; -import { Component, model, signal } from '@angular/core'; +import { Component, inject, model, signal } from '@angular/core'; import { RouterLink, RouterLinkActive } from '@angular/router'; +import { bootstrapGithub, bootstrapTwitterX } from '@ng-icons/bootstrap-icons'; import { NgIcon, provideIcons } from '@ng-icons/core'; import { lucideX } from '@ng-icons/lucide'; +import { tablerBlur } from '@ng-icons/tabler-icons'; +import { ThemeService } from '@slateui/theme'; import { UiButton } from 'ui'; interface NavLink { @@ -21,10 +24,11 @@ interface NavSection { selector: 'docs-sidebar', standalone: true, imports: [RouterLink, NgIcon, NgTemplateOutlet, RouterLinkActive, UiButton], - viewProviders: [provideIcons({ lucideX })], + viewProviders: [provideIcons({ lucideX, bootstrapGithub, bootstrapTwitterX, tablerBlur })], templateUrl: './sidebar.html' }) export class Sidebar { + themeService = inject(ThemeService); // Two-way binding model signal for menu state readonly menuOpen = model(false); @@ -85,4 +89,10 @@ export class Sidebar { closeMenu(): void { this.menuOpen.set(false); } + + toggleTheme() { + this.themeService.setTheme( + this.themeService.isDark() ? 'light' : 'dark' + ); + } }