From d2c3e696681bff4a999a275a3238b864092d62c6 Mon Sep 17 00:00:00 2001 From: Ayo Date: Fri, 20 Oct 2023 15:27:16 +0200 Subject: [PATCH] refactor: data and styles - add constant for projects - update styles for now:status --- src/constants/links.ts | 2 +- src/constants/stuff.ts | 47 +++++++++++++++++++++++++++++++ src/pages/index.astro | 64 ++++++++++++++++++------------------------ 3 files changed, 75 insertions(+), 38 deletions(-) create mode 100644 src/constants/stuff.ts diff --git a/src/constants/links.ts b/src/constants/links.ts index 11ca27e..3b41e9b 100644 --- a/src/constants/links.ts +++ b/src/constants/links.ts @@ -6,7 +6,7 @@ export type Link = { }; -const links: Link[] = [ +export const links: Link[] = [ { url: "https://ayos.blog", icon: "blog", diff --git a/src/constants/stuff.ts b/src/constants/stuff.ts new file mode 100644 index 0000000..b12c519 --- /dev/null +++ b/src/constants/stuff.ts @@ -0,0 +1,47 @@ + +export const stuff: { + icon: string; + text: string; + link?: {url: string, text: string}; +}[] = [ + { + icon: '🧐', + text: 'Software Extraordinaire' + }, + { + icon: '🕵🏻‍♂️', + text: 'Frontend Detective' + }, + { + icon: '😱', + text: 'Building', + link: { + url: 'https://mc-fly.vercel.app', + text: 'McFly' + } + }, + { + icon: '🚀', + text: 'Creator of', + link: { + url: 'https://cozy-reader.vercel.app', + text: 'Cozy' + } + }, + { + icon: '🧱', + text: '...and some', + link: { + url: '/stuff', + text: 'small stuff' + } + }, + { + icon: '🦌', + text: 'Contributor to', + link: { + url: 'https://elk.zone/@ayo@ayco.io', + text: 'Elk.zone' + } + } +] \ No newline at end of file diff --git a/src/pages/index.astro b/src/pages/index.astro index 3ed6fc0..3f6d8bf 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -2,17 +2,7 @@ import Layout from "../layouts/Layout.astro"; import Card from "../components/Card.astro"; import Footer from "../components/Footer.astro"; - -const response = await fetch( - "https://social.ayco.io/api/v1/accounts/109547735999980313" -); -let { display_name, avatar, note } = await response.json(); - -const [first_name, last_name] = display_name.split(" "); -note = note - .replace('ayco.io/gh/', '') - .replace('ayco.io/stuff', 'stuff') +import { stuff } from '../constants/stuff'; --- @@ -21,14 +11,24 @@ note = note Ayo Ayco's picture