From f5a75a62c07cf0282c9511c2ab9dacea3dff5389 Mon Sep 17 00:00:00 2001 From: hyperoot Date: Thu, 1 Aug 2024 09:44:43 +0000 Subject: [PATCH] social added for footer --- config.ts | 102 ++++++++++++++++++ package-lock.json | 9 ++ package.json | 1 + src/components/core/Footer.astro | 26 ++++- src/components/core/Icons.tsx | 44 ++++++++ .../docs/Custom Components/Callout.mdx | 26 ++--- src/content/docs/Custom Components/Card.mdx | 42 ++++---- .../docs/Reference/configuration-ref.mdx | 56 ++++++++++ src/lib/types.ts | 10 +- 9 files changed, 280 insertions(+), 36 deletions(-) create mode 100644 src/components/core/Icons.tsx diff --git a/config.ts b/config.ts index c1f3201..303fce0 100644 --- a/config.ts +++ b/config.ts @@ -1,3 +1,5 @@ +import type { SocialObjects } from "@/lib/types"; + export const SITE = { website: "https://hyperoot.dev", // replace this with your deployed domain author: "HYP3R00T", @@ -39,3 +41,103 @@ export const docconfig = { hide_repo_button: false, hide_author: true, }; + +// Set your social. It will appear in footer. Don't change the `name` value. +export const Socials: SocialObjects = [ + { + name: "Github", + href: "https://github.com/HYP3R00T/", + linkTitle: ` ${SITE.title} on Github`, + active: true, + }, + { + name: "Facebook", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Facebook`, + active: false, + }, + { + name: "Instagram", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Instagram`, + active: false, + }, + { + name: "LinkedIn", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on LinkedIn`, + active: false, + }, + { + name: "Mail", + href: "mailto:rajesh@hyperoot.dev", + linkTitle: `Send an email to ${SITE.title}`, + active: true, + }, + { + name: "Twitter", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Twitter`, + active: false, + }, + { + name: "Twitch", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Twitch`, + active: false, + }, + { + name: "YouTube", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on YouTube`, + active: false, + }, + { + name: "WhatsApp", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on WhatsApp`, + active: false, + }, + { + name: "Snapchat", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Snapchat`, + active: false, + }, + { + name: "Pinterest", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Pinterest`, + active: false, + }, + { + name: "Discord", + href: "https://discord.gg/tWZRBhaPhd", + linkTitle: `${SITE.title} on Discord`, + active: true, + }, + { + name: "GitLab", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on GitLab`, + active: false, + }, + { + name: "Reddit", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Reddit`, + active: false, + }, + { + name: "Telegram", + href: "https://github.com/HYP3R00T/", + linkTitle: `${SITE.title} on Telegram`, + active: false, + }, + { + name: "Mastodon", + href: "https://mastodon.social/@hyp3r00t", + linkTitle: `${SITE.title} on Mastodon`, + active: true, + }, +]; diff --git a/package-lock.json b/package-lock.json index fd3ab77..afaff62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rehype-external-links": "^3.0.0", + "simple-icons-astro": "^13.3.0", "tailwind-merge": "^2.4.0", "tailwindcss": "^3.4.6", "tailwindcss-animate": "^1.0.7", @@ -7545,6 +7546,14 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/simple-icons-astro": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/simple-icons-astro/-/simple-icons-astro-13.3.0.tgz", + "integrity": "sha512-58IKsl8BaYVSG2x73dj6elThHwZgVl91mKjsw5dF0hvm7zdrN35oHM5Qli70iMrOqZqq1E/lwd+guYGxXTWhdQ==", + "peerDependencies": { + "astro": ">=2.7.1" + } + }, "node_modules/simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", diff --git a/package.json b/package.json index 3935226..445a819 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "rehype-external-links": "^3.0.0", + "simple-icons-astro": "^13.3.0", "tailwind-merge": "^2.4.0", "tailwindcss": "^3.4.6", "tailwindcss-animate": "^1.0.7", diff --git a/src/components/core/Footer.astro b/src/components/core/Footer.astro index 85267b5..03be259 100644 --- a/src/components/core/Footer.astro +++ b/src/components/core/Footer.astro @@ -1,9 +1,13 @@ --- +import { Socials } from "config"; +import { getIconByName } from "@/components/core/Icons"; +import { Button } from "@/components/ui/button"; + // To pass the tailwindcss classes to the astro component const { class: className } = Astro.props; --- -