Skip to content

Commit a6f7b94

Browse files
committed
feat: add daysiui
1 parent f3ca2ae commit a6f7b94

19 files changed

+104
-44
lines changed

angular.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@
6161
"extractLicenses": true,
6262
"sourceMap": true,
6363
"namedChunks": false,
64-
"aot": true
64+
"aot": false
6565
},
6666
"development": {
6767
"optimization": false,
6868
"verbose": false,
6969
"sourceMap": true,
7070
"namedChunks": true,
71-
"aot": true,
71+
"aot": false,
7272
"extractLicenses": false,
7373
"statsJson": false
7474
}

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@fortawesome/angular-fontawesome": "1.0",
3333
"@fortawesome/free-solid-svg-icons": "^7.0.0",
3434
"@tailwindcss/postcss": "^4.1.11",
35+
"daisyui": "^5.0.50",
3536
"postcss": "^8.5.6",
3637
"rxjs": "~7.8.0",
3738
"tailwindcss": "^4.1.11",
@@ -61,4 +62,4 @@
6162
"typescript": "~5.7.2",
6263
"typescript-eslint": "8.34.1"
6364
}
64-
}
65+
}

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { RouterOutlet } from "@angular/router";
66
imports: [RouterOutlet],
77
standalone: true,
88
template: `
9-
<h1 id="title">{{ title }}</h1>
9+
<h1 id="title" class="gradient-text text-center">{{ title }}</h1>
1010
<div class="!max-w-[1200px] mx-auto">
1111
<router-outlet></router-outlet>
1212
</div>

src/app/features/auth/pages/login.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import { SessionService } from "@core/services";
1010
template: `
1111
<div class="styled-box">Login Page</div>
1212
<div class="m-[10px] flex gap-[10px]">
13-
<button (click)="login('client')">Login</button>
14-
<button (click)="router.navigateByUrl('/auth/register')">Register</button>
15-
<button (click)="login('admin')">Admin Login</button>
13+
<button class="app-btn-primary" (click)="login('client')">Login</button>
14+
<button class="app-btn-primary" (click)="router.navigateByUrl('/auth/register')">
15+
Register
16+
</button>
17+
<button class="app-btn-accent" (click)="login('admin')">Admin Login</button>
1618
</div>
1719
`,
1820
})

src/app/features/auth/pages/register.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Router } from "@angular/router";
88
changeDetection: ChangeDetectionStrategy.OnPush,
99
template: `
1010
<div class="styled-box">Register Page</div>
11-
<button (click)="router.navigateByUrl('/auth/login')">login</button>
11+
<button class="app-btn-primary" (click)="router.navigateByUrl('/auth/login')">login</button>
1212
`,
1313
})
1414
export class RegisterComponent {

src/app/features/post/components/post.component.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ import { Post } from "../models";
99
template: `
1010
@defer (on viewport) {
1111
@let p = data();
12-
<div class="styled-box !min-h-full">
13-
<h3 class="underline">[Post {{ p.id }}] {{ p.title }}</h3>
14-
<div>{{ p.body }}</div>
15-
<button (click)="router.navigateByUrl('/home/post/' + p.id)">Read more</button>
12+
<div class="card bg-base-200 mb-[16px]">
13+
<div class="card-body">
14+
<h2 class="card-title text-warning">[Post {{ p.id }}] {{ p.title }}</h2>
15+
<p>{{ p.body }}</p>
16+
<div class="justify-end card-actions">
17+
<button class="app-btn-primary" (click)="router.navigateByUrl('/home/post/' + p.id)">
18+
Read more
19+
</button>
20+
</div>
21+
</div>
1622
</div>
1723
} @placeholder {
1824
<div class="h-[200px]"></div>

src/app/features/post/pages/post-detail.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { PostService } from "../services";
2424
<div>loading...</div>
2525
}
2626
</div>
27-
<button (click)="router.navigateByUrl('/home/post')">Back List</button>
27+
<button class="app-btn-primary" (click)="router.navigateByUrl('/home/post')">Back List</button>
2828
`,
2929
})
3030
export class PostDetailComponent implements OnInit {

src/app/features/post/pages/post-listing.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { PostService } from "../services";
1111
standalone: true,
1212
template: `
1313
<div class="styled-box">
14-
<div>Post Listing Page</div>
14+
<div class="divider text-accent">Post Listing Page</div>
1515
@let posts = posts$ | async;
1616
@let data = posts?.data;
1717
@if (data) {
@@ -23,7 +23,7 @@ import { PostService } from "../services";
2323
} @else if (posts?.error) {
2424
<div class="text-[red]">Loading posts failed....</div>
2525
} @else {
26-
<div class="text-center">Loading...</div>
26+
<span class="loading loading-spinner loading-xl"></span>
2727
}
2828
</div>
2929
`,

src/app/features/user/components/user.component.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ import { User } from "../models";
99
template: `
1010
@defer (on viewport) {
1111
@let u = data();
12-
<div class="styled-box !min-h-full">
13-
<h3 class="underline">[User {{ u.id }}] {{ u.name }}</h3>
14-
<div>{{ u.phone }}</div>
15-
<button (click)="router.navigateByUrl('/home/user/' + u.id)">Read more</button>
12+
<div class="card bg-base-200 mb-[16px]">
13+
<div class="card-body">
14+
<h2 class="card-title text-warning">[User {{ u.id }}] {{ u.name }}</h2>
15+
<p>{{ u.phone }}</p>
16+
<div class="justify-end card-actions">
17+
<button class="app-btn-primary" (click)="router.navigateByUrl('/home/user/' + u.id)">
18+
Read more
19+
</button>
20+
</div>
21+
</div>
1622
</div>
1723
} @placeholder {
1824
<div class="h-[200px]"></div>

0 commit comments

Comments
 (0)