From 44af861034cc41dd6fb022b2ab6d2a46039925f5 Mon Sep 17 00:00:00 2001 From: Kyliux Date: Mon, 30 Dec 2024 18:54:55 +0800 Subject: [PATCH] add github logo --- showcase.json | 3 +- src/components/Spotlight/index.module.scss | 15 ++++++++ src/components/Spotlight/index.tsx | 12 +++++- static/icons/github_pink.svg | 43 ++++++++++++++++++++++ 4 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 static/icons/github_pink.svg diff --git a/showcase.json b/showcase.json index f088bb87..665080f9 100644 --- a/showcase.json +++ b/showcase.json @@ -34,7 +34,8 @@ "title": "Bicycle to Dfinity", "url": "https://m5rwi-daaaa-aaaal-acrpq-cai.icp0.io", "description": "An adventure around the world to meet great souls and promote good stuff.", - "img": "/showcase/aegir.jpg" + "img": "/showcase/aegir.jpg", + "github":"https://github.com/Kyliux/Icloud" }, { "title": "ICPFA", diff --git a/src/components/Spotlight/index.module.scss b/src/components/Spotlight/index.module.scss index 124747bc..7a9bdc66 100644 --- a/src/components/Spotlight/index.module.scss +++ b/src/components/Spotlight/index.module.scss @@ -60,4 +60,19 @@ word-break: break-word; white-space: pre-wrap; } + + h4 { + display: flex; + align-items: center; + justify-content: space-between; /* This pushes items to the edges */ + } + + .githubLogo { + width: 40px; /* Adjust the size of the logo */ + height: 40px; + } +} + +.githubLink { + margin-left: auto; /* Pushes the link to the right */ } diff --git a/src/components/Spotlight/index.tsx b/src/components/Spotlight/index.tsx index c6dcea20..650dbb7a 100644 --- a/src/components/Spotlight/index.tsx +++ b/src/components/Spotlight/index.tsx @@ -6,7 +6,8 @@ export default function Spotlight({ title, description, img, - url + url, + github }: ShowcaseSpotlight): JSX.Element { return ( @@ -22,7 +23,14 @@ export default function Spotlight({
-

{title}

+

+ {title} + {github && ( + + GitHub Logo + + )} +

{description}

diff --git a/static/icons/github_pink.svg b/static/icons/github_pink.svg new file mode 100644 index 00000000..27734df1 --- /dev/null +++ b/static/icons/github_pink.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file