Skip to content

Commit

Permalink
Merge pull request #28 from celestiaorg/jcs/footericons
Browse files Browse the repository at this point in the history
feat: add social icons to footer
  • Loading branch information
gabros20 authored Jan 10, 2025
2 parents 376291f + 5206d5a commit aad3263
Show file tree
Hide file tree
Showing 3 changed files with 3,400 additions and 18 deletions.
51 changes: 34 additions & 17 deletions src/components/Footer/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,49 @@ const Footer = () => {
return (
<ul
key={index}
className={`block w-1/2 lg:w-1/5 ${
index === columns.length - 1 ? "" : "mb-10 lg:mb-0"
}`}
className={`block ${
index === columns.length - 1
? "w-full flex flex-row justify-end gap-4 order-last lg:order-none lg:flex-col lg:w-auto"
: "w-1/2 lg:w-1/5"
} ${index === columns.length - 1 ? "" : "mb-10 lg:mb-0"}`}
>
{column.links.map((link, linkIndex) => {
const isInternal = isInternalLink(link.url);
return (
<li key={`col-${index}-link-${linkIndex}`}>
<Link
href={link.url}
key={linkIndex}
target={isInternal ? "_self" : "_blank"}
rel={isInternal ? "" : "noopener noreferrer"}
className={`flex items-center group mb-4`}
>
<Body className={`mr-1`} size={"md"}>
{link.title}
</Body>
<Icon
className={"flex-grow-0 flex-shrink-0"}
border={false}
transparentBg
size={"xs"}
Icon={<div className={"block h-4 w-4"}></div>}
hover
HoverIcon={<ArrowLongSVG />}
direction={isInternal ? "down-right" : "up-right"}
/>
{link.icon ? (
<Icon
Icon={<link.icon dark />}
hover
HoverIcon={<link.icon dark className="opacity-50" />}
size="sm"
border={false}
transparentBg
direction="up"
/>
) : (
<>
<Body className={`mr-1`} size={"md"}>
{link.title}
</Body>
<Icon
className={"flex-grow-0 flex-shrink-0"}
border={false}
transparentBg
size={"xs"}
Icon={<div className={"block h-4 w-4"}></div>}
hover
HoverIcon={<ArrowLongSVG />}
direction={isInternal ? "down-right" : "up-right"}
/>
</>
)}
</Link>
</li>
);
Expand Down
43 changes: 42 additions & 1 deletion src/data/global/footer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import XTwitterSVG from "@/macros/SVGs/XTwitterSVG";
import DiscordSVG from "@/macros/SVGs/DiscordSVG";
import TelegramSVG from "@/macros/SVGs/TelegramSVG";
import RedditSVG from "@/macros/SVGs/RedditSVG";
import GithubSVG from "@/macros/SVGs/GithubSVG";
import ForumSVG from "@/macros/SVGs/ForumSVG";

const footerData = () => {
const columns = [
{
Expand Down Expand Up @@ -51,11 +58,45 @@ const footerData = () => {
url: "/careers",
},
{
title: "Follow us",
title: "Community",
url: "/community",
},
],
},
{
links: [
{
title: "X (Twitter)",
url: "https://x.com/celestia",
icon: XTwitterSVG
},
{
title: "Discord",
url: "https://discord.com/invite/YsnTPcSfWQ",
icon: DiscordSVG
},
{
title: "Telegram",
url: "https://t.me/CelestiaCommunity/",
icon: TelegramSVG
},
{
title: "Reddit",
url: "https://www.reddit.com/r/CelestiaNetwork/",
icon: RedditSVG
},
{
title: "GitHub",
url: "https://github.com/celestiaorg/",
icon: GithubSVG
},
{
title: "Forum",
url: "https://forum.celestia.org/",
icon: ForumSVG
}
]
}
];

return columns;
Expand Down
Loading

0 comments on commit aad3263

Please sign in to comment.