-
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aecd360
commit 0658abc
Showing
38 changed files
with
6,835 additions
and
9,252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
<app-header></app-header> | ||
<div class="flex"> | ||
<div class="w-1/6 h-100"> | ||
<app-sidebar></app-sidebar> | ||
</div> | ||
<div class="w-5/6 "> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> | ||
<router-outlet></router-outlet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
import {Routes} from '@angular/router'; | ||
import {ListComponent} from "./components/{{lc}}/list/list.component"; | ||
import {ShowComponent} from "./components/{{lc}}/show/show.component"; | ||
import {EditComponent} from "./components/{{lc}}/edit/edit.component"; | ||
import {CreateComponent} from "./components/{{lc}}/create/create.component"; | ||
import {ListComponent} from "@components/foo/list/list.component"; | ||
import {ShowComponent} from "@components/foo/show/show.component"; | ||
import {EditComponent} from "@components/foo/edit/edit.component"; | ||
import {CreateComponent} from "@components/foo/create/create.component"; | ||
import {LayoutComponent} from "@components/common/layout/layout.component"; | ||
|
||
export const routes: Routes = [ | ||
{ | ||
path: '{{lc}}', | ||
component: ListComponent | ||
}, | ||
{ | ||
path: '{{lc}}/add', | ||
component: CreateComponent | ||
}, | ||
{ | ||
path: '{{lc}}/:id', | ||
component: ShowComponent, | ||
}, | ||
{ | ||
path: '{{lc}}/:id/edit', | ||
component: EditComponent | ||
}, | ||
path: '', | ||
component: LayoutComponent, | ||
children: [ | ||
{ | ||
path: '{{lc}}', | ||
component: ListComponent | ||
}, | ||
{ | ||
path: '{{lc}}/add', | ||
component: CreateComponent | ||
}, | ||
{ | ||
path: '{{lc}}/:id', | ||
component: ShowComponent, | ||
}, | ||
{ | ||
path: '{{lc}}/:id/edit', | ||
component: EditComponent | ||
}, | ||
] | ||
} | ||
]; |
4 changes: 2 additions & 2 deletions
4
templates/angular/app/components/common/delete/delete.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<button | ||
(click)="deleteAction()" | ||
[className]="!disabled ? | ||
'py-2 px-4 bg-red-600 text-white text-sm rounded shadow-md hover:bg-red-700' : | ||
'py-2 px-4 bg-red-600 text-white text-sm rounded shadow-md opacity-25'" | ||
'py-2 px-6 bg-red-600 text-white text-sm rounded shadow-md hover:bg-red-700' : | ||
'py-2 px-6 bg-red-600 text-white text-sm rounded shadow-md opacity-25'" | ||
[disabled]="disabled"> | ||
Delete | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
templates/angular/app/components/common/form/form.component.html
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
templates/angular/app/components/common/form/form.component.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ | |
} | ||
|
||
.menu { | ||
padding: 8px; | ||
padding: 8px; | ||
cursor: pointer; | ||
} |
23 changes: 0 additions & 23 deletions
23
templates/angular/app/components/common/header/header.component.spec.ts
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
templates/angular/app/components/common/header/header.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
templates/angular/app/components/common/layout/layout.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<app-header></app-header> | ||
<div class="flex"> | ||
<div class="w-1/6 h-100"> | ||
<app-sidebar></app-sidebar> | ||
</div> | ||
<div class="w-5/6 "> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</div> |
17 changes: 17 additions & 0 deletions
17
templates/angular/app/components/common/layout/layout.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {Component} from '@angular/core'; | ||
import {RouterOutlet} from "@angular/router"; | ||
import {HeaderComponent} from "@components/common/header/header.component"; | ||
import {SidebarComponent} from "@components/common/sidebar/sidebar.component"; | ||
|
||
@Component({ | ||
selector: 'app-layout', | ||
standalone: true, | ||
imports: [ | ||
HeaderComponent, | ||
RouterOutlet, | ||
SidebarComponent | ||
], | ||
templateUrl: './layout.component.html', | ||
}) | ||
export class LayoutComponent { | ||
} |
16 changes: 5 additions & 11 deletions
16
templates/angular/app/components/common/sidebar/sidebar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
<div class="sidebar px-3 py-6"> | ||
<ul> | ||
{{#each apiResource}} | ||
<li class="py-2 hover:bg-neutral-100"> | ||
<a routerLink="/heroes" [routerLinkActive]="['active']"> | ||
<a routerLink="/{{lowercase this}}" [routerLinkActive]="['active']"> | ||
<div class="flex just-center items-center px-4 text-lg"> | ||
<app-list-svg/> | ||
<span class="ml-4">Heroes</span> | ||
</div> | ||
</a> | ||
</li> | ||
<li class="py-2 hover:bg-neutral-100"> | ||
<a routerLink="/heroes2" [routerLinkActive]="['active']"> | ||
<div class="flex just-center items-center px-4 text-lg"> | ||
<app-list-svg/> | ||
<span class="ml-4">Heroes</span> | ||
<app-list-svg></app-list-svg> | ||
<span class="ml-4">{{this}}</span> | ||
</div> | ||
</a> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</div> |
3 changes: 1 addition & 2 deletions
3
templates/angular/app/components/common/sidebar/sidebar.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.