Skip to content

Commit fadfcef

Browse files
committed
Merge branch 'release/0.7.0' into main
2 parents 7e1c7fa + ed8ecbc commit fadfcef

File tree

8 files changed

+329
-250
lines changed

8 files changed

+329
-250
lines changed

package.json

+6-4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@angular/router": "~11.0.0",
3838
"@angular/service-worker": "~11.0.0",
3939
"rxjs": "~6.6.3",
40+
"tailwindcss": "^2.0.2",
4041
"tslib": "^2.1.0",
4142
"zone.js": "~0.10.2"
4243
},
@@ -57,9 +58,9 @@
5758
"@types/node": "^14.14.22",
5859
"@typescript-eslint/eslint-plugin": "4.14.2",
5960
"@typescript-eslint/parser": "4.14.2",
60-
"codelyzer": "^6.0.1",
61-
"eslint-plugin-jsdoc": "31.6.0",
61+
"autoprefixer": "^10.2.4",
6262
"eslint": "^7.19.0",
63+
"eslint-plugin-jsdoc": "31.6.0",
6364
"eslint-plugin-prefer-arrow": "1.2.3",
6465
"husky": "^4.3.8",
6566
"jasmine-core": "~3.6.0",
@@ -70,11 +71,12 @@
7071
"karma-jasmine": "~4.0.1",
7172
"karma-jasmine-html-reporter": "^1.5.0",
7273
"lint-staged": "^10.5.3",
74+
"postcss": "^8.2.4",
75+
"postcss-cli": "^8.3.1",
7376
"postcss-import": "^12.0.1",
74-
"postcss-loader": "^5.0.0",
77+
"postcss-loader": "^4.2.0",
7578
"postcss-scss": "^3.0.4",
7679
"protractor": "~7.0.0",
77-
"tailwindcss": "^1.9.6",
7880
"ts-node": "~9.1.1",
7981
"typescript": "~4.0.5",
8082
"webpack-bundle-analyzer": "^4.4.0"
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
<div class="container grid h-full place-items-center">
2-
<button
3-
class="px-6 py-3 font-semibold text-white rounded-lg bg-primary-500 hover:bg-primary-400 transition ease-in-out duration-300"
4-
(click)="onClickSignIn()"
5-
>
6-
Sign in
7-
</button>
2+
<button class="btn btn-primary" (click)="onClickSignIn()">Sign in</button>
83
</div>

src/app/@components/header/header.component.html

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
<nav
33
class="container flex items-center justify-between h-full py-3 mx-auto center"
44
>
5-
<a routerLink="/" class="text-2xl font-bold no-underline cursor-pointer">
5+
<a
6+
[routerLink]="[path.Home]"
7+
class="text-2xl font-bold no-underline cursor-pointer"
8+
>
69
<span class="text-danger-400">Angular</span>
710
Boilerplate
811
</a>
@@ -30,12 +33,7 @@
3033
></path>
3134
</svg>
3235
</a>
33-
<button
34-
class="px-6 py-3 font-semibold text-white transition duration-300 ease-in-out rounded-lg bg-danger-500 hover:bg-danger-400"
35-
(click)="onClickLogout()"
36-
>
37-
Logout
38-
</button>
36+
<button class="btn btn-danger" (click)="onClickLogout()">Sign out</button>
3937
</div>
4038
</nav>
4139
</header>

src/app/@components/header/header.component.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output } from '@angular/core';
1+
import {
2+
ChangeDetectionStrategy,
3+
Component,
4+
EventEmitter,
5+
OnInit,
6+
Output,
7+
} from '@angular/core';
8+
import { Path } from '@app/@core/structs';
29

310
@Component({
411
selector: 'app-header',
@@ -9,6 +16,8 @@ import { ChangeDetectionStrategy, Component, EventEmitter, OnInit, Output } from
916
export class HeaderComponent implements OnInit {
1017
@Output() logout = new EventEmitter<void>();
1118

19+
path = Path;
20+
1221
constructor() {}
1322

1423
ngOnInit(): void {}
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { CommonModule } from '@angular/common';
22
import { NgModule } from '@angular/core';
3+
import { RouterModule } from '@angular/router';
34
import { HeaderComponent } from './header.component';
45

56
@NgModule({
67
declarations: [HeaderComponent],
7-
imports: [CommonModule],
8+
imports: [CommonModule, RouterModule],
89
exports: [HeaderComponent],
910
})
1011
export class HeaderModule {}

src/app/@containers/home/home.page.html

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<div class="-mt-20 text-center md:max-w-xl">
44
<h1 i18n class="mb-4">👋 Welcome to Angular Boilerplate.</h1>
55
<p i18n class="mb-12 text-xl">⚒️ Start building your SPA easily. ⚒️</p>
6+
<a [routerLink]="['/', path.App]" class="btn btn-primary">
7+
Go to dashboard
8+
</a>
69
</div>
710
</div>
811
</div>

src/css/06-components/button.scss

+51-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
// here goes your button styles
1+
.btn {
2+
@apply px-6;
3+
@apply py-3;
4+
@apply font-semibold;
5+
@apply text-white;
6+
@apply rounded-lg;
7+
}
8+
9+
.btn:focus {
10+
@apply ring-4;
11+
}
12+
13+
.btn-primary {
14+
@apply bg-primary-500;
15+
}
16+
17+
.btn-primary:hover {
18+
@apply bg-primary-400;
19+
}
20+
21+
.btn-secondary {
22+
@apply bg-gray-500;
23+
}
24+
25+
.btn-secondary:hover {
26+
@apply bg-gray-400;
27+
}
28+
29+
.btn-success {
30+
@apply bg-success-500;
31+
}
32+
33+
.btn-success:hover {
34+
@apply bg-success-400;
35+
}
36+
37+
.btn-warning {
38+
@apply bg-warning-500;
39+
}
40+
41+
.btn-warning:hover {
42+
@apply bg-warning-400;
43+
}
44+
45+
.btn-danger {
46+
@apply bg-danger-500;
47+
}
48+
49+
.btn-danger:hover {
50+
@apply bg-danger-400;
51+
}

0 commit comments

Comments
 (0)