|
3 | 3 | <div class="bg-md-sys-color-surface-container shadow-elevation-2 border-b border-md-sys-color-outline-variant"> |
4 | 4 | <div class="flex items-center h-16 px-4"> |
5 | 5 | <button class="md-button md-button-text p-2 rounded-full mr-2" (click)="toggleSidenav()" aria-label="Toggle navigation"> |
6 | | - <mat-icon class="text-md-sys-color-on-surface">menu</mat-icon> |
| 6 | + <mat-icon class="w-6 h-6 text-md-sys-color-on-surface">menu</mat-icon> |
7 | 7 | </button> |
8 | 8 | <h1 class="md-typescale-title-large text-md-sys-color-on-surface flex-1">Dimiplan 관리자 패널</h1> |
9 | 9 | </div> |
10 | 10 | </div> |
11 | 11 |
|
12 | 12 | <div class="flex"> |
13 | 13 | <!-- Navigation Rail --> |
14 | | - <nav [class]="sidenavOpened ? 'w-80' : 'w-20'" class="bg-md-sys-color-surface-container border-r border-md-sys-color-outline-variant transition-all duration-300 ease-in-out overflow-hidden"> |
15 | | - <div class="p-4"> |
16 | | - <h3 *ngIf="sidenavOpened" class="md-typescale-title-medium text-md-sys-color-on-surface mb-4">관리 메뉴</h3> |
| 14 | + <nav [class]="sidenavOpened ? 'w-80' : 'w-20'" class="bg-md-sys-color-surface-container border-r border-md-sys-color-outline-variant transition-all duration-300 ease-in-out overflow-hidden min-h-full flex flex-col"> |
| 15 | + <!-- Collapsed state header --> |
| 16 | + <div class="p-4 flex justify-center" *ngIf="!sidenavOpened"> |
| 17 | + <div class="w-10 h-10 bg-md-sys-color-primary rounded-full flex items-center justify-center"> |
| 18 | + <mat-icon class="w-6 h-6 text-md-sys-color-on-primary">admin_panel_settings</mat-icon> |
| 19 | + </div> |
17 | 20 | </div> |
18 | 21 |
|
19 | | - <div class="space-y-2 px-2"> |
| 22 | + <!-- Expanded state header --> |
| 23 | + <div class="p-4" *ngIf="sidenavOpened"> |
| 24 | + <div class="flex items-center gap-3 mb-6"> |
| 25 | + <div class="w-8 h-8 bg-md-sys-color-primary rounded-full flex items-center justify-center"> |
| 26 | + <mat-icon class="w-5 h-5 text-md-sys-color-on-primary">admin_panel_settings</mat-icon> |
| 27 | + </div> |
| 28 | + <div> |
| 29 | + <h3 class="md-typescale-title-medium text-md-sys-color-on-surface">관리 메뉴</h3> |
| 30 | + <p class="md-typescale-body-small text-md-sys-color-on-surface-variant">시스템 관리</p> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + </div> |
| 34 | + |
| 35 | + <div class="space-y-1" [class.px-3]="sidenavOpened" [class.px-2]="!sidenavOpened"> |
20 | 36 | <a routerLink="/dashboard" |
21 | 37 | routerLinkActive="active" |
22 | | - class="nav-item flex items-center gap-4 p-3 rounded-xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high" |
| 38 | + class="nav-item group flex items-center gap-4 p-3 mx-1 rounded-2xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high relative overflow-hidden" |
23 | 39 | [class.bg-md-sys-color-secondary-container]="router.url === '/dashboard'" |
24 | | - [class.text-md-sys-color-on-secondary-container]="router.url === '/dashboard'"> |
25 | | - <mat-icon class="min-w-[24px]" [class.text-md-sys-color-on-secondary-container]="router.url === '/dashboard'">dashboard</mat-icon> |
26 | | - <span *ngIf="sidenavOpened" class="md-typescale-label-large">대시보드</span> |
| 40 | + [class.text-md-sys-color-on-secondary-container]="router.url === '/dashboard'" |
| 41 | + [class.shadow-sm]="router.url === '/dashboard'" |
| 42 | + [title]="!sidenavOpened ? '대시보드' : ''"> |
| 43 | + <div class="relative z-10 flex items-center" [class.justify-center]="!sidenavOpened" [class.w-full]="!sidenavOpened"> |
| 44 | + <mat-icon class="w-6 h-6 flex-shrink-0" [class.text-md-sys-color-on-secondary-container]="router.url === '/dashboard'">dashboard</mat-icon> |
| 45 | + <span *ngIf="sidenavOpened" class="md-typescale-label-large ml-4">대시보드</span> |
| 46 | + </div> |
| 47 | + <div *ngIf="router.url === '/dashboard'" class="absolute inset-0 bg-gradient-to-r from-md-sys-color-secondary-container/20 to-transparent"></div> |
27 | 48 | </a> |
28 | 49 |
|
29 | 50 | <a routerLink="/logs" |
30 | 51 | routerLinkActive="active" |
31 | | - class="nav-item flex items-center gap-4 p-3 rounded-xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high" |
| 52 | + class="nav-item group flex items-center gap-4 p-3 mx-1 rounded-2xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high relative overflow-hidden" |
32 | 53 | [class.bg-md-sys-color-secondary-container]="router.url === '/logs'" |
33 | | - [class.text-md-sys-color-on-secondary-container]="router.url === '/logs'"> |
34 | | - <mat-icon class="min-w-[24px]" [class.text-md-sys-color-on-secondary-container]="router.url === '/logs'">article</mat-icon> |
35 | | - <span *ngIf="sidenavOpened" class="md-typescale-label-large">로그 관리</span> |
| 54 | + [class.text-md-sys-color-on-secondary-container]="router.url === '/logs'" |
| 55 | + [class.shadow-sm]="router.url === '/logs'" |
| 56 | + [title]="!sidenavOpened ? '로그 관리' : ''"> |
| 57 | + <div class="relative z-10 flex items-center" [class.justify-center]="!sidenavOpened" [class.w-full]="!sidenavOpened"> |
| 58 | + <mat-icon class="w-6 h-6 flex-shrink-0" [class.text-md-sys-color-on-secondary-container]="router.url === '/logs'">article</mat-icon> |
| 59 | + <span *ngIf="sidenavOpened" class="md-typescale-label-large ml-4">로그 관리</span> |
| 60 | + </div> |
| 61 | + <div *ngIf="router.url === '/logs'" class="absolute inset-0 bg-gradient-to-r from-md-sys-color-secondary-container/20 to-transparent"></div> |
36 | 62 | </a> |
37 | 63 |
|
38 | 64 | <a routerLink="/database" |
39 | 65 | routerLinkActive="active" |
40 | | - class="nav-item flex items-center gap-4 p-3 rounded-xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high" |
| 66 | + class="nav-item group flex items-center gap-4 p-3 mx-1 rounded-2xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high relative overflow-hidden" |
41 | 67 | [class.bg-md-sys-color-secondary-container]="router.url === '/database'" |
42 | | - [class.text-md-sys-color-on-secondary-container]="router.url === '/database'"> |
43 | | - <mat-icon class="min-w-[24px]" [class.text-md-sys-color-on-secondary-container]="router.url === '/database'">storage</mat-icon> |
44 | | - <span *ngIf="sidenavOpened" class="md-typescale-label-large">데이터베이스</span> |
| 68 | + [class.text-md-sys-color-on-secondary-container]="router.url === '/database'" |
| 69 | + [class.shadow-sm]="router.url === '/database'" |
| 70 | + [title]="!sidenavOpened ? '데이터베이스' : ''"> |
| 71 | + <div class="relative z-10 flex items-center" [class.justify-center]="!sidenavOpened" [class.w-full]="!sidenavOpened"> |
| 72 | + <mat-icon class="w-6 h-6 flex-shrink-0" [class.text-md-sys-color-on-secondary-container]="router.url === '/database'">storage</mat-icon> |
| 73 | + <span *ngIf="sidenavOpened" class="md-typescale-label-large ml-4">데이터베이스</span> |
| 74 | + </div> |
| 75 | + <div *ngIf="router.url === '/database'" class="absolute inset-0 bg-gradient-to-r from-md-sys-color-secondary-container/20 to-transparent"></div> |
45 | 76 | </a> |
46 | 77 |
|
47 | 78 | <a routerLink="/api-docs" |
48 | 79 | routerLinkActive="active" |
49 | | - class="nav-item flex items-center gap-4 p-3 rounded-xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high" |
| 80 | + class="nav-item group flex items-center gap-4 p-3 mx-1 rounded-2xl transition-all duration-200 text-md-sys-color-on-surface hover:bg-md-sys-color-surface-container-high relative overflow-hidden" |
50 | 81 | [class.bg-md-sys-color-secondary-container]="router.url === '/api-docs'" |
51 | | - [class.text-md-sys-color-on-secondary-container]="router.url === '/api-docs'"> |
52 | | - <mat-icon class="min-w-[24px]" [class.text-md-sys-color-on-secondary-container]="router.url === '/api-docs'">code</mat-icon> |
53 | | - <span *ngIf="sidenavOpened" class="md-typescale-label-large">API 문서</span> |
| 82 | + [class.text-md-sys-color-on-secondary-container]="router.url === '/api-docs'" |
| 83 | + [class.shadow-sm]="router.url === '/api-docs'" |
| 84 | + [title]="!sidenavOpened ? 'API 문서' : ''"> |
| 85 | + <div class="relative z-10 flex items-center" [class.justify-center]="!sidenavOpened" [class.w-full]="!sidenavOpened"> |
| 86 | + <mat-icon class="w-6 h-6 flex-shrink-0" [class.text-md-sys-color-on-secondary-container]="router.url === '/api-docs'">code</mat-icon> |
| 87 | + <span *ngIf="sidenavOpened" class="md-typescale-label-large ml-4">API 문서</span> |
| 88 | + </div> |
| 89 | + <div *ngIf="router.url === '/api-docs'" class="absolute inset-0 bg-gradient-to-r from-md-sys-color-secondary-container/20 to-transparent"></div> |
54 | 90 | </a> |
55 | 91 | </div> |
56 | 92 |
|
57 | | - <div class="border-t border-md-sys-color-outline-variant mt-8 pt-4"> |
58 | | - <div class="px-4"> |
59 | | - <small *ngIf="sidenavOpened" class="md-typescale-body-small text-md-sys-color-on-surface-variant">버전 1.0.0</small> |
60 | | - <mat-icon *ngIf="!sidenavOpened" class="text-md-sys-color-on-surface-variant w-full text-center" title="버전 1.0.0">info</mat-icon> |
| 93 | + <div class="border-t border-md-sys-color-outline-variant/30 mt-auto pt-6 pb-4"> |
| 94 | + <div class="px-4" *ngIf="sidenavOpened"> |
| 95 | + <div class="flex items-center gap-2 p-2 rounded-lg bg-md-sys-color-surface-container-low"> |
| 96 | + <mat-icon class="w-4 h-4 text-md-sys-color-on-surface-variant">info</mat-icon> |
| 97 | + <small class="md-typescale-body-small text-md-sys-color-on-surface-variant">버전 1.0.0</small> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + <div class="flex justify-center px-4" *ngIf="!sidenavOpened"> |
| 101 | + <div class="w-8 h-8 flex items-center justify-center rounded-lg bg-md-sys-color-surface-container-low"> |
| 102 | + <mat-icon class="w-4 h-4 text-md-sys-color-on-surface-variant" title="버전 1.0.0">info</mat-icon> |
| 103 | + </div> |
61 | 104 | </div> |
62 | 105 | </div> |
63 | 106 | </nav> |
|
0 commit comments