Skip to content

Commit 8bd5bc1

Browse files
authored
Merge pull request #16 from code-star/main
Release
2 parents 58df7e9 + e6daf5e commit 8bd5bc1

13 files changed

+71
-37
lines changed

.github/workflows/prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [16.x]
18+
node-version: [20.x]
1919

2020
steps:
2121
- name: Checkout 🛎️

.github/workflows/test.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,25 @@ on:
55
branches:
66
- main
77

8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
820
jobs:
921
build:
10-
1122
runs-on: ubuntu-latest
1223

1324
strategy:
1425
matrix:
15-
node-version: [16.x]
26+
node-version: [20.x]
1627

1728
steps:
1829
- name: Checkout 🛎️
@@ -36,10 +47,12 @@ jobs:
3647
npx next build && npx next export
3748
touch out/.nojekyll
3849
# CI: false # true -> fails on warning
39-
- name: Deploy 🚀
40-
uses: JamesIves/github-pages-deploy-action@v4
50+
- name: Setup Pages
51+
uses: actions/configure-pages@v5
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
4154
with:
42-
token: ${{ secrets.GITHUB_TOKEN }}
43-
branch: gh-pages # The branch the action should deploy to.
44-
folder: out # The folder the action should deploy.
45-
clean: true # Automatically remove deleted files from the deploy branch
55+
path: "out"
56+
- name: Deploy to GitHub Pages 🚀
57+
id: deployment
58+
uses: actions/deploy-pages@v4
Loading
Loading
Loading
Loading
Loading

components/PublicationCard/PublicationCard.module.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
}
2424

2525
h2 {
26-
font-family: "Conduit ITC W04 Regular", 'system-ui';
26+
font-family: "Conduit ITC W04 Regular", "system-ui";
2727
font-size: 180%;
2828
}
2929
}
3030

3131
.publication-card--avatar {
3232
background-color: $red;
33-
background-size: 50px;
3433
border-radius: 50%;
3534
color: black;
3635
height: 50px;
@@ -39,6 +38,16 @@
3938
text-align: center;
4039
font-size: 40px;
4140
font-family: "Righteous", sans-serif;
41+
42+
.publication-card--avatar-img {
43+
border-radius: 50%;
44+
height: 50px;
45+
width: 50px;
46+
position: absolute;
47+
top: 0;
48+
background-size: 50px;
49+
overflow: hidden;
50+
}
4251
}
4352

4453
.publication-card--author {

components/PublicationCard/PublicationCard.tsx

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,19 @@ import { formatDate } from "../../lib/formatDate";
33
import { IPublication } from "../../lib/publications/publications.types";
44
// import SanitizedHTML from 'react-sanitized-html';
55
import styles from "./PublicationCard.module.scss";
6+
import { PublicationCardAvatar } from "./PublicationCardAvatar";
67

78
interface IPublicationCardProps {
89
publication: IPublication;
910
}
1011

11-
const avatars: Record<string, string> = {
12-
mdworld: "https://miro.medium.com/fit/c/176/176/0*gTl35Xy5zRcgu5wJ.png",
13-
"nathan perdijk":
14-
"https://miro.medium.com/fit/c/88/88/0*Bqr-dMZplB-namyY.jpg",
15-
"bjorn ‘bjeaurn’":
16-
"https://miro.medium.com/fit/c/176/176/0*o9UzuQyUwobacrCt.jpeg",
17-
"hamza haiken":
18-
"https://miro.medium.com/fit/c/176/176/2*1JTGoMi8_nuGQVO1EoItXg.png",
19-
"nick ten veen":
20-
"https://miro.medium.com/fit/c/88/88/2*k7vMxGfKwfqJ86TcprDA_Q.jpeg",
21-
};
22-
2312
const PublicationCard: FC<IPublicationCardProps> = ({ publication }) => {
2413
const { title, author, uniqueSlug, latestPublishedAt } = publication;
25-
const avatar = avatars[author.toLowerCase()];
14+
2615
return (
2716
<a href={uniqueSlug} className={styles["publication-card"]}>
2817
<section>
29-
<div
30-
className={styles["publication-card--avatar"]}
31-
style={
32-
avatar
33-
? {
34-
backgroundImage: `url(${avatar})`,
35-
}
36-
: {}
37-
}
38-
>
39-
{avatar ? "" : author.slice(0, 1).toUpperCase()}
40-
</div>
18+
<PublicationCardAvatar author={author} />
4119
<div>
4220
<p className={styles["publication-card--author"]}>{author}</p>
4321
<p className={styles["publication-card--date"]}>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { FC } from "react";
2+
import styles from "./PublicationCard.module.scss";
3+
import nathanImg from "./0_Bqr-dMZplB-namyY.jpg";
4+
import mdworldImg from "./0_gTl35Xy5zRcgu5wJ.png";
5+
import nickImg from "./2_k7vMxGfKwfqJ86TcprDA_Q.jpg";
6+
import hamzaImg from "./2_1JTGoMi8_nuGQVO1EoItXg.png";
7+
import bjornImg from "./0_o9UzuQyUwobacrCt.jpg";
8+
import Image, { StaticImageData } from "next/image";
9+
10+
const avatars: Record<string, StaticImageData> = {
11+
mdworld: mdworldImg,
12+
"nathan perdijk": nathanImg,
13+
"bjorn ‘bjeaurn’": bjornImg,
14+
"hamza haiken": hamzaImg,
15+
"nick ten veen": nickImg,
16+
};
17+
18+
export const PublicationCardAvatar: FC<{ author: string }> = ({ author }) => {
19+
const avatar = avatars[author.toLowerCase()];
20+
21+
return (
22+
<div className={styles["publication-card--avatar"]}>
23+
<div className="letter">{author.slice(0, 1).toUpperCase()}</div>
24+
25+
<div className={styles["publication-card--avatar-img"]}>
26+
{avatar && <Image src={avatar} alt="avatar" width={50} height={50} />}
27+
</div>
28+
</div>
29+
);
30+
};

components/TopBar/TopBar.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
a {
3131
border-radius: 4px;
3232
padding: 10px;
33+
color: var(--cs-brutalist-creme);
3334

3435
&:hover {
3536
background-color: #222;

components/TopBar/TopBar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const TopBar: FC = () => {
1818
</li>
1919
<li>Codelancer</li> */}
2020
<li>
21-
<a href="https://www.ordina.nl/vakgebieden/scala/">Contact</a>
21+
<a href="https://www.linkedin.com/company/codestar-powered-by-sopra-steria/">
22+
Contact
23+
</a>
2224
</li>
2325
</ul>
2426
</div>

lib/publications/publications.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface IMediumRSSResponse {
1717
id: string;
1818
title: string;
1919
author: string;
20+
avatar?: string;
2021
latestPublishedAt: string;
2122
uniqueSlug: string;
2223
paragraphs: string;

0 commit comments

Comments
 (0)