Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #16

Merged
merged 5 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- name: Checkout 🛎️
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,25 @@ on:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]

steps:
- name: Checkout 🛎️
Expand All @@ -36,10 +47,12 @@ jobs:
npx next build && npx next export
touch out/.nojekyll
# CI: false # true -> fails on warning
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: out # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch
path: "out"
- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
Binary file added components/PublicationCard/0_Bqr-dMZplB-namyY.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/PublicationCard/0_gTl35Xy5zRcgu5wJ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added components/PublicationCard/0_o9UzuQyUwobacrCt.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions components/PublicationCard/PublicationCard.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@
}

h2 {
font-family: "Conduit ITC W04 Regular", 'system-ui';
font-family: "Conduit ITC W04 Regular", "system-ui";
font-size: 180%;
}
}

.publication-card--avatar {
background-color: $red;
background-size: 50px;
border-radius: 50%;
color: black;
height: 50px;
Expand All @@ -39,6 +38,16 @@
text-align: center;
font-size: 40px;
font-family: "Righteous", sans-serif;

.publication-card--avatar-img {
border-radius: 50%;
height: 50px;
width: 50px;
position: absolute;
top: 0;
background-size: 50px;
overflow: hidden;
}
}

.publication-card--author {
Expand Down
28 changes: 3 additions & 25 deletions components/PublicationCard/PublicationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,19 @@ import { formatDate } from "../../lib/formatDate";
import { IPublication } from "../../lib/publications/publications.types";
// import SanitizedHTML from 'react-sanitized-html';
import styles from "./PublicationCard.module.scss";
import { PublicationCardAvatar } from "./PublicationCardAvatar";

interface IPublicationCardProps {
publication: IPublication;
}

const avatars: Record<string, string> = {
mdworld: "https://miro.medium.com/fit/c/176/176/0*gTl35Xy5zRcgu5wJ.png",
"nathan perdijk":
"https://miro.medium.com/fit/c/88/88/0*Bqr-dMZplB-namyY.jpg",
"bjorn ‘bjeaurn’":
"https://miro.medium.com/fit/c/176/176/0*o9UzuQyUwobacrCt.jpeg",
"hamza haiken":
"https://miro.medium.com/fit/c/176/176/2*1JTGoMi8_nuGQVO1EoItXg.png",
"nick ten veen":
"https://miro.medium.com/fit/c/88/88/2*k7vMxGfKwfqJ86TcprDA_Q.jpeg",
};

const PublicationCard: FC<IPublicationCardProps> = ({ publication }) => {
const { title, author, uniqueSlug, latestPublishedAt } = publication;
const avatar = avatars[author.toLowerCase()];

return (
<a href={uniqueSlug} className={styles["publication-card"]}>
<section>
<div
className={styles["publication-card--avatar"]}
style={
avatar
? {
backgroundImage: `url(${avatar})`,
}
: {}
}
>
{avatar ? "" : author.slice(0, 1).toUpperCase()}
</div>
<PublicationCardAvatar author={author} />
<div>
<p className={styles["publication-card--author"]}>{author}</p>
<p className={styles["publication-card--date"]}>
Expand Down
30 changes: 30 additions & 0 deletions components/PublicationCard/PublicationCardAvatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { FC } from "react";
import styles from "./PublicationCard.module.scss";
import nathanImg from "./0_Bqr-dMZplB-namyY.jpg";
import mdworldImg from "./0_gTl35Xy5zRcgu5wJ.png";
import nickImg from "./2_k7vMxGfKwfqJ86TcprDA_Q.jpg";
import hamzaImg from "./2_1JTGoMi8_nuGQVO1EoItXg.png";
import bjornImg from "./0_o9UzuQyUwobacrCt.jpg";
import Image, { StaticImageData } from "next/image";

const avatars: Record<string, StaticImageData> = {
mdworld: mdworldImg,
"nathan perdijk": nathanImg,
"bjorn ‘bjeaurn’": bjornImg,
"hamza haiken": hamzaImg,
"nick ten veen": nickImg,
};

export const PublicationCardAvatar: FC<{ author: string }> = ({ author }) => {
const avatar = avatars[author.toLowerCase()];

return (
<div className={styles["publication-card--avatar"]}>
<div className="letter">{author.slice(0, 1).toUpperCase()}</div>

<div className={styles["publication-card--avatar-img"]}>
{avatar && <Image src={avatar} alt="avatar" width={50} height={50} />}
</div>
</div>
);
};
1 change: 1 addition & 0 deletions components/TopBar/TopBar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
a {
border-radius: 4px;
padding: 10px;
color: var(--cs-brutalist-creme);

&:hover {
background-color: #222;
Expand Down
4 changes: 3 additions & 1 deletion components/TopBar/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const TopBar: FC = () => {
</li>
<li>Codelancer</li> */}
<li>
<a href="https://www.ordina.nl/vakgebieden/scala/">Contact</a>
<a href="https://www.linkedin.com/company/codestar-powered-by-sopra-steria/">
Contact
</a>
</li>
</ul>
</div>
Expand Down
1 change: 1 addition & 0 deletions lib/publications/publications.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface IMediumRSSResponse {
id: string;
title: string;
author: string;
avatar?: string;
latestPublishedAt: string;
uniqueSlug: string;
paragraphs: string;
Expand Down