Skip to content

Commit 15e794f

Browse files
authored
Merge pull request #29 from diprefranco/main-projects-layout
Main projects layout
2 parents ac0b5c0 + 1a78c87 commit 15e794f

File tree

10 files changed

+46
-27
lines changed

10 files changed

+46
-27
lines changed

docs/assets/img/404-pages.jpg

63.6 KB
Loading

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@
5959

6060
<body>
6161
<app-root></app-root>
62-
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-3AW54RXE.js" type="module"></script></body>
62+
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-L4JF7ILD.js" type="module"></script></body>
6363

6464
</html>
Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://diprefranco.github.io/</loc>
5-
<lastmod>2025-02-20</lastmod>
5+
<lastmod>2025-02-21</lastmod>
66
<changefreq>monthly</changefreq>
77
<priority>1.0</priority>
88
</url>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface Project {
2+
description: string;
3+
imgSrc: string;
4+
demoUrl: string;
5+
codeUrl: string;
6+
}

src/app/pages/home/projects/projects.component.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
padding: 20px 20px 40px 20px;
1616
background-color: var(--colorp2);
1717
border-radius: 10px;
18-
flex: 1;
19-
min-width: 280px;
20-
max-width: 700px;
18+
flex: 1 1 400px;
19+
max-width: 400px;
2120
}
2221

2322
.projects div a {
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
<div id="projects">
22
<h2>Projects</h2>
33
</div>
4+
45
<section class="projects">
5-
<div>
6-
<web-img [src]="'assets/img/angular-template-my-website.jpg'" [width]="700" [height]="395"
7-
[alt]="'Screenshot of an Angular template for building a personal website.'"></web-img>
8-
<p>Angular template to start a personal website</p>
6+
<div *ngFor="let project of projects">
7+
<web-img [src]="project.imgSrc" [width]="700" [height]="395" alt="Project screenshot"></web-img>
8+
<p>{{project.description}}</p>
99
<br />
10-
<a href="https://diprefranco.github.io/angular-template-my-website/" target="_blank" aria-label="Go to a demo">Demo</a>
11-
<a href="https://github.com/diprefranco/angular-template-my-website" target="_blank" aria-label="View the code on GitHub">Code</a>
12-
</div>
13-
<div>
14-
<web-img [src]="'assets/img/random-me.jpg'" [width]="700" [height]="395"
15-
[alt]="'Screenshot of a fun app showing a random photo of me on every visit or refresh.'"></web-img>
16-
<p>A fun app showing a random photo of me on every visit or refresh</p>
17-
<br />
18-
<a href="https://diprefranco.github.io/random-me/" target="_blank" aria-label="Go to a demo">Demo</a>
19-
<a href="https://github.com/diprefranco/random-me" target="_blank" aria-label="View the code on GitHub">Code</a>
10+
<a href="{{project.demoUrl}}" target="_blank" aria-label="Go to a demo">Demo</a>
11+
<a href="{{project.codeUrl}}" target="_blank" aria-label="View the code on GitHub">Code</a>
2012
</div>
2113
</section>
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,34 @@
11
import { Component } from '@angular/core';
2+
import { CommonModule } from '@angular/common';
23
import { ImgComponent } from '../../../shared/img/img.component';
4+
import { Project } from './project';
35

46
@Component({
57
selector: 'web-projects',
68
standalone: true,
7-
imports: [ImgComponent],
9+
imports: [CommonModule, ImgComponent],
810
templateUrl: './projects.component.html',
911
styleUrl: './projects.component.css'
1012
})
1113
export class ProjectsComponent {
14+
projects: Project[] = [
15+
{
16+
description: 'Angular template to start a personal website',
17+
imgSrc: 'assets/img/angular-template-my-website.jpg',
18+
demoUrl: 'https://diprefranco.github.io/angular-template-my-website/',
19+
codeUrl: 'https://github.com/diprefranco/angular-template-my-website'
20+
},
21+
{
22+
description: 'A fun app showing a random photo of me on every visit or refresh',
23+
imgSrc: 'assets/img/random-me.jpg',
24+
demoUrl: 'https://diprefranco.github.io/random-me/',
25+
codeUrl: 'https://github.com/diprefranco/random-me'
26+
},
27+
{
28+
description: 'A collection of creative and themed 404 pages',
29+
imgSrc: 'assets/img/404-pages.jpg',
30+
demoUrl: 'https://diprefranco.github.io/404-pages/',
31+
codeUrl: 'https://github.com/diprefranco/404-pages'
32+
}
33+
];
1234
}

src/assets/img/404-pages.jpg

63.6 KB
Loading

src/assets/sitemap.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
33
<url>
44
<loc>https://diprefranco.github.io/</loc>
5-
<lastmod>2025-02-20</lastmod>
5+
<lastmod>2025-02-21</lastmod>
66
<changefreq>monthly</changefreq>
77
<priority>1.0</priority>
88
</url>

0 commit comments

Comments
 (0)