Skip to content

Commit a1997c7

Browse files
committed
feat(docs): Added benefits & attribution to ngx-bootstrap
1 parent bad6c06 commit a1997c7

3 files changed

Lines changed: 110 additions & 9 deletions

File tree

projects/ngqp-demo/src/app/home/home.component.html

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,23 @@ <h1>ngqp</h1>
1111
</div>
1212
</section>
1313

14-
<!--
15-
Easy to use: minimum setup, intuitive API based on Forms
16-
Powerful: feature-rich, highly customisable
17-
Free: Open source on Github, MIT license, forever free
18-
Well-Documented, Tested
19-
-->
20-
</main>
14+
<section class="benefits container-fluid">
15+
<div class="benefits__content">
16+
<div class="row">
17+
<div *ngFor="let benefit of benefits" class="col-12 col-sm-6 d-flex flex-wrap">
18+
<div class="benefit__icon">
19+
<fa-icon [icon]="benefit.icon" size="3x" class="text-primary"></fa-icon>
20+
</div>
21+
<div class="benefit__text">
22+
<h4>{{ benefit.title }}</h4>
23+
<p>{{ benefit.description }}</p>
24+
</div>
25+
</div>
26+
</div>
27+
</div>
28+
</section>
29+
</main>
30+
31+
<footer class="footer">
32+
Design inspired by <a href="https://valor-software.com/ngx-bootstrap">ngx-bootstrap</a>.
33+
</footer>

projects/ngqp-demo/src/app/home/home.component.scss

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
}
99

1010
.btn-block {
11-
margin-top: 2rem;
12-
margin-bottom: 1rem;
11+
margin: 2rem 0;
1312

1413
.btn {
1514
min-width: 240px;
@@ -29,4 +28,48 @@
2928
}
3029
}
3130
}
31+
}
32+
33+
.benefits {
34+
background: #f5f5f5;
35+
36+
&__content {
37+
padding: 2rem;
38+
39+
.col-12 {
40+
padding-bottom: 2rem;
41+
}
42+
}
43+
44+
.benefit__icon {
45+
flex: 0 0 80px;
46+
max-width: 80px;
47+
height: 60px;
48+
margin-bottom: 15px;
49+
padding-right: 10px;
50+
51+
img {
52+
display: block;
53+
max-width: 100%;
54+
}
55+
}
56+
57+
.benefit__text {
58+
flex: 0 0 calc(100% - 80px);
59+
max-width: calc(100% - 80px);
60+
61+
h4 {
62+
color: #333;
63+
}
64+
65+
p {
66+
margin: 15px 0 0;
67+
color: #666;
68+
}
69+
}
70+
}
71+
72+
.footer {
73+
padding: 1rem;
74+
text-align: center;
3275
}

projects/ngqp-demo/src/app/home/home.component.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
import { Component } from '@angular/core';
2+
import { IconDefinition, faGlassCheers, faCogs, faHeart, faAlignLeft } from '@fortawesome/free-solid-svg-icons';
3+
4+
interface BenefitItem {
5+
icon: IconDefinition;
6+
title: string;
7+
description: string;
8+
}
29

310
@Component({
411
selector: 'demo-home',
@@ -7,4 +14,42 @@ import { Component } from '@angular/core';
714
})
815
export class HomeComponent {
916

17+
public benefits: BenefitItem[] = [
18+
{
19+
icon: faGlassCheers,
20+
title: 'Simple',
21+
description: `
22+
We know that you expect things to just work. That's why ngqp requires almost no setup and is easy to use while
23+
giving you the flexibility to configure it to your needs. The API feels familiar because it is designed after
24+
the Forms API.
25+
`,
26+
},
27+
{
28+
icon: faCogs,
29+
title: 'Powerful',
30+
description: `
31+
Dependencies should earn their keep; that's why ngqp ships with a lot of features packed into an intuitive API
32+
that allow you to do exactly what you need to do.
33+
`,
34+
},
35+
{
36+
icon: faAlignLeft,
37+
title: 'Documented',
38+
description: `
39+
No one should have a hard time learning how to use something. We provide rich documentation with many examples,
40+
guides and tips & tricks. If you have any issue getting something to work, the community will be right by your
41+
side and help you out.
42+
`,
43+
},
44+
{
45+
icon: faHeart,
46+
title: 'Free',
47+
description: `
48+
We ❤️ the open-source community, so there are no hidden fees or strings attached. ngqp is free, open-source and
49+
MIT-licensed. Find the source code on Github, fork it, or help improving it by contributing documentation,
50+
bug fixes or features.
51+
`,
52+
},
53+
];
54+
1055
}

0 commit comments

Comments
 (0)