From d9e4f5b5f92855975f8ae7db010f8a6c70b92c6e Mon Sep 17 00:00:00 2001 From: Firq Date: Tue, 29 Oct 2024 21:02:37 +0100 Subject: [PATCH] Social restructure --- .prettierignore | 3 +- src/assets/custom-svg/discord.svg | 1 + src/assets/custom-svg/reddit.svg | 61 +++++++++++++++++++++++ {public => src/assets}/favicon.ico | Bin src/components/links/linkContainer.astro | 53 +++++--------------- src/components/links/socials.ts | 22 ++++++++ src/content/data/contactdata.json | 32 ------------ src/content/data/socials.json | 42 ++++++++++++++++ src/layouts/Layout.astro | 18 +++++-- src/pages/about.astro | 9 +--- src/pages/index.astro | 8 +-- 11 files changed, 159 insertions(+), 90 deletions(-) create mode 100644 src/assets/custom-svg/discord.svg create mode 100644 src/assets/custom-svg/reddit.svg rename {public => src/assets}/favicon.ico (100%) create mode 100644 src/components/links/socials.ts delete mode 100644 src/content/data/contactdata.json create mode 100644 src/content/data/socials.json diff --git a/.prettierignore b/.prettierignore index 9a96656..3451a85 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,5 @@ **/.vscode **/public **/static -**/scripts \ No newline at end of file +**/scripts +**/dist \ No newline at end of file diff --git a/src/assets/custom-svg/discord.svg b/src/assets/custom-svg/discord.svg new file mode 100644 index 0000000..7f9a31f --- /dev/null +++ b/src/assets/custom-svg/discord.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/custom-svg/reddit.svg b/src/assets/custom-svg/reddit.svg new file mode 100644 index 0000000..60839b8 --- /dev/null +++ b/src/assets/custom-svg/reddit.svg @@ -0,0 +1,61 @@ + + + + + + + + + diff --git a/public/favicon.ico b/src/assets/favicon.ico similarity index 100% rename from public/favicon.ico rename to src/assets/favicon.ico diff --git a/src/components/links/linkContainer.astro b/src/components/links/linkContainer.astro index 316899b..ea909ed 100644 --- a/src/components/links/linkContainer.astro +++ b/src/components/links/linkContainer.astro @@ -1,58 +1,29 @@ --- -import LinkCard from "./linkCard.astro" - -import mastodon from 'iconoir/icons/mastodon.svg' -import youtube from 'iconoir/icons/youtube.svg' -import forgejo from '@assets/custom-svg/forgejo.svg' -import rayshift from '@assets/custom-svg/rayshift.svg' -import twitch from '@assets/custom-svg/twitch.svg' - -const links = [ - { - link: "https://www.youtube.com/@Firq_", - icon: youtube, - text: "Youtube", - }, - { - link: "https://mastodon.neshweb.net/@Firq", - icon: mastodon, - text: "Mastodon", - }, - { - link: "https://twitch.tv/Firq", - icon: twitch, - text: "Twitch", - }, - { - link: "https://forgejo.neshweb.net/Firq", - icon: forgejo, - text: "Forgejo", - }, - { - link: "https://rayshift.io/na/firq", - icon: rayshift, - text: "Rayshift", - } -] +import LinkCard from './linkCard.astro' +import socialData from '@content/data/socials.json' +import { socials } from './socials' ---
{ - links.map( - (item) => - ) + socialData.map((item) => ( + + )) }
\ No newline at end of file + diff --git a/src/components/links/socials.ts b/src/components/links/socials.ts new file mode 100644 index 0000000..08fe623 --- /dev/null +++ b/src/components/links/socials.ts @@ -0,0 +1,22 @@ +import discord from '@assets/custom-svg/discord.svg' +import forgejo from '@assets/custom-svg/forgejo.svg' +import rayshift from '@assets/custom-svg/rayshift.svg' +import reddit from '@assets/custom-svg/reddit.svg' +import twitch from '@assets/custom-svg/twitch.svg' + +import type { ImageMetadata } from 'astro' + +import mastodon from 'iconoir/icons/mastodon.svg' +import twitter from 'iconoir/icons/twitter.svg' +import youtube from 'iconoir/icons/youtube.svg' + +export const socials: Record = { + forgejo, + rayshift, + reddit, + twitch, + discord, + mastodon, + twitter, + youtube, +} diff --git a/src/content/data/contactdata.json b/src/content/data/contactdata.json deleted file mode 100644 index ce6e643..0000000 --- a/src/content/data/contactdata.json +++ /dev/null @@ -1,32 +0,0 @@ -[ - { - "site": "Youtube: @Firq_", - "link": "https://www.youtube.com/@Firq_", - "imageFile": "youtube.webp" - }, - { - "site": "Twitch: Firq", - "link": "https://www.twitch.tv/firq", - "imageFile": "twitch.webp" - }, - { - "site": "Discord: firq", - "link": "https://discord.com/users/186014064835690496", - "imageFile": "discord.webp" - }, - { - "site": "Twitter: Firq_ow", - "link": "https://twitter.com/firq_ow", - "imageFile": "twitter.webp" - }, - { - "site": "Reddit: u/Firq_ow", - "link": "https://www.reddit.com/user/firq_ow", - "imageFile": "reddit.webp" - }, - { - "site": "Support Setup on Rayshift", - "link": "https://rayshift.io/na/firq", - "imageFile": "custom-fgo.webp" - } -] diff --git a/src/content/data/socials.json b/src/content/data/socials.json new file mode 100644 index 0000000..71454e2 --- /dev/null +++ b/src/content/data/socials.json @@ -0,0 +1,42 @@ +[ + { + "link": "https://www.youtube.com/@Firq_", + "icon": "youtube", + "text": "Youtube" + }, + { + "link": "https://mastodon.neshweb.net/@Firq", + "icon": "mastodon", + "text": "Mastodon" + }, + { + "link": "https://twitter.com/firq_ow", + "icon": "twitter", + "text": "Twitter" + }, + { + "link": "https://twitch.tv/Firq", + "icon": "twitch", + "text": "Twitch" + }, + { + "link": "https://discord.com/users/186014064835690496", + "icon": "discord", + "text": "Discord" + }, + { + "link": "https://www.reddit.com/user/Firq_ow/", + "icon": "reddit", + "text": "Reddit" + }, + { + "link": "https://forgejo.neshweb.net/Firq", + "icon": "forgejo", + "text": "Forgejo" + }, + { + "link": "https://rayshift.io/na/firq", + "icon": "rayshift", + "text": "Rayshift" + } +] \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 94c3f77..fef05c4 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,11 +1,12 @@ --- -import "@fontsource-variable/work-sans"; -import workSans from "@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2" +import '@fontsource-variable/work-sans' +import workSans from '@fontsource-variable/work-sans/files/work-sans-latin-wght-normal.woff2' import Navbar from '@components/navbar/navbar.astro' import NavbarEntry from '@components/navbar/navbarEntry.astro' import navdata from '@content/data/navdata.json' import embed from '@assets/embed.png' +import favicon from '@assets/favicon.ico' import home from 'iconoir/icons/home.svg' import servants from 'iconoir/icons/task-list.svg' @@ -72,10 +73,16 @@ const mapped_navdata = navdata.map((item) => ({ content="SmcWcewh7DCANcLeTe3ntU0R-LESbo_bsolICJnmulE" /> - + - - + + @@ -105,6 +112,7 @@ const mapped_navdata = navdata.map((item) => ({ +