Skip to content

Commit 472b5e7

Browse files
Merge pull request #11 from dilanka-rathnasiri/projects
Complete basic css
2 parents b879552 + 98910b7 commit 472b5e7

14 files changed

+203
-10
lines changed

src/app/app.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div id="rootMainBox">
22
<app-nav-bar />
3-
<router-outlet id="rootContentBox" />
4-
<app-footer />
3+
<router-outlet />
4+
<app-footer id="rootFooter" />
55
</div>

src/app/app.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
height: 100%;
55
}
66

7-
#rootContentBox {
8-
flex-grow: 1;
7+
#rootFooter {
8+
margin-top: auto;
99
}

src/app/blog/blog.component.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
<p>blog works!</p>
1+
<div id="blogsMainBox" class="container">
2+
@for (blog of blogs; track blog.title) {
3+
<div class="card shadow">
4+
<div class="card-body">
5+
<h4>{{ blog.title }}</h4>
6+
<p class="card-text">{{ blog.description }}</p>
7+
<a [href]="blog.link" target="_blank" class="btn btn-primary">
8+
Read Article on <i class="fa-brands fa-dev"></i>
9+
</a>
10+
</div>
11+
</div>
12+
}
13+
</div>

src/app/blog/blog.component.scss

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#blogsMainBox {
2+
display: flex;
3+
margin-top: 2rem;
4+
margin-bottom: 2rem;
5+
gap: 2rem;
6+
flex-wrap: wrap;
7+
justify-content: center;
8+
9+
.card {
10+
width: 30%;
11+
}
12+
13+
.card-body {
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
18+
p {
19+
text-align: center;
20+
}
21+
}
22+
}

src/app/blog/blog.component.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
import { Component } from '@angular/core';
2+
import { BlogItem } from '../dto/BlogItem';
23

34
@Component({
45
selector: 'app-blog',
56
imports: [],
67
templateUrl: './blog.component.html',
78
styleUrl: './blog.component.scss',
89
})
9-
export class BlogComponent {}
10+
export class BlogComponent {
11+
blogs: BlogItem[] = [
12+
{
13+
title: 'Understanding Angular Signals',
14+
description:
15+
'A deep dive into Angular signals and how they improve reactivity in modern applications.',
16+
link: 'https://blog.example.com/angular-signals',
17+
},
18+
{
19+
title: 'Deploying with AWS Amplify',
20+
description:
21+
'Step-by-step guide to deploying your web app using AWS Amplify.',
22+
link: 'https://blog.example.com/aws-amplify-deploy',
23+
},
24+
{
25+
title: 'TypeScript Tips & Tricks',
26+
description:
27+
'Boost your productivity with these essential TypeScript tips.',
28+
link: 'https://blog.example.com/typescript-tips',
29+
},
30+
];
31+
}
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
<p>certifications works!</p>
1+
<div id="certificatesMainBox" class="container">
2+
@for (certificate of certificates; track certificate.title) {
3+
<div class="card shadow">
4+
<div class="card-body">
5+
<h4>{{ certificate.title }}</h4>
6+
<h4>{{ certificate.organization }}</h4>
7+
<h6 class="text-secondary">{{ certificate.time }}</h6>
8+
<a
9+
[href]="certificate.link"
10+
target="_blank"
11+
class="btn btn-primary"
12+
>
13+
View Certificate
14+
</a>
15+
</div>
16+
</div>
17+
}
18+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#certificatesMainBox {
2+
display: flex;
3+
margin-top: 2rem;
4+
margin-bottom: 2rem;
5+
gap: 2rem;
6+
flex-wrap: wrap;
7+
justify-content: center;
8+
9+
.card {
10+
width: 30%;
11+
}
12+
13+
.card-body {
14+
display: flex;
15+
flex-direction: column;
16+
align-items: center;
17+
18+
h4 {
19+
text-align: center;
20+
}
21+
}
22+
}
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
import { Component } from '@angular/core';
2+
import { CertificateItem } from '../dto/CertificateItem';
23

34
@Component({
45
selector: 'app-certifications',
56
imports: [],
67
templateUrl: './certifications.component.html',
78
styleUrl: './certifications.component.scss',
89
})
9-
export class CertificationsComponent {}
10+
export class CertificationsComponent {
11+
certificates: CertificateItem[] = [
12+
{
13+
title: 'AWS Certified Solutions Architect',
14+
organization: 'Amazon Web Services',
15+
time: 'Jan 2023',
16+
link: 'https://certificates.example.com/aws-solutions-architect',
17+
},
18+
{
19+
title: 'Google Cloud Professional Engineer',
20+
organization: 'Google Cloud',
21+
time: 'Mar 2022',
22+
link: 'https://certificates.example.com/gcp-professional',
23+
},
24+
{
25+
title: 'Certified Kubernetes Administrator',
26+
organization: 'Cloud Native Computing Foundation',
27+
time: 'Sep 2021',
28+
link: 'https://certificates.example.com/cka',
29+
},
30+
];
31+
}

src/app/dto/BlogItem.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export interface BlogItem {
2+
title: string;
3+
description: string;
4+
link: string;
5+
}

src/app/dto/CertificateItem.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface CertificateItem {
2+
title: string;
3+
organization: string;
4+
time: string;
5+
link: string;
6+
}

0 commit comments

Comments
 (0)