Minor changes on which buttons open a new page.

This commit is contained in:
Alexis Werefox 2021-10-17 22:40:17 +00:00
parent f7ef980293
commit 63b17945ab
3 changed files with 50 additions and 19 deletions

View File

@ -9,6 +9,7 @@ export default function ProjectCardBlock({ title, cards }) {
<PCard <PCard
key={card} key={card}
title={card} title={card}
new_tab={cards[card].new_tab}
url={cards[card].url} url={cards[card].url}
src={cards[card].src} src={cards[card].src}
alt={cards[card].alt} alt={cards[card].alt}

View File

@ -9,16 +9,20 @@ export default function projectCard({
alt, alt,
description, description,
}) { }) {
const open_new_tab = new_tab ? "_blank" : ""; if (Boolean(new_tab)) {
return ( return (
<div> <div>
<Link href={url}> <Link href={url}>
<a target={open_new_tab}> <a target="_blank">
<li className="p-4 space-y-2 rounded-sm ring-2 text-werefox-blue-dark dark:text-werefox-blue hover:text-werefox-pink-dark dark:hover:text-werefox-pink ring-werefox-blue-dark dark:ring-werefox-blue hover:ring-werefox-pink-dark dark:hover:ring-werefox-pink hover:animate-yip transition"> <li className="p-4 space-y-2 rounded-sm ring-2 text-werefox-blue-dark dark:text-werefox-blue hover:text-werefox-pink-dark dark:hover:text-werefox-pink ring-werefox-blue-dark dark:ring-werefox-blue hover:ring-werefox-pink-dark dark:hover:ring-werefox-pink hover:animate-yip transition">
<div className="text-lg text-center"> <div className="text-lg text-center">
<span className="animate-jiggle sm:w-6 sm:h-6 w-4 h-6 inline-block align-top"> <span className="animate-jiggle sm:w-6 sm:h-6 w-4 h-6 inline-block align-top">
<Image src={src} layout="fill" objectFit="contain" alt={alt} /> <Image
src={src}
layout="fill"
objectFit="contain"
alt={alt}
/>
</span> </span>
{` ${title}`} {` ${title}`}
</div> </div>
@ -28,4 +32,28 @@ export default function projectCard({
</Link> </Link>
</div> </div>
); );
} else {
return (
<div>
<Link href={url}>
<a>
<li className="p-4 space-y-2 rounded-sm ring-2 text-werefox-blue-dark dark:text-werefox-blue hover:text-werefox-pink-dark dark:hover:text-werefox-pink ring-werefox-blue-dark dark:ring-werefox-blue hover:ring-werefox-pink-dark dark:hover:ring-werefox-pink hover:animate-yip transition">
<div className="text-lg text-center">
<span className="animate-jiggle sm:w-6 sm:h-6 w-4 h-6 inline-block align-top">
<Image
src={src}
layout="fill"
objectFit="contain"
alt={alt}
/>
</span>
{` ${title}`}
</div>
<div className="text-md text-center">{description}</div>
</li>
</a>
</Link>
</div>
);
}
} }

View File

@ -4,8 +4,10 @@ Servers:
url: "https://info.werefox.dev/servers" url: "https://info.werefox.dev/servers"
images: images:
- { src: "/emoji/computer.svg", alt: "Computer emoji" } - { src: "/emoji/computer.svg", alt: "Computer emoji" }
new_tab: true
"Support Us?": "Support Us?":
url: "https://info.werefox.dev/support" url: "https://info.werefox.dev/support"
images: images:
- { src: "/emoji/green_money.svg", alt: "Green money emoji" } - { src: "/emoji/green_money.svg", alt: "Green money emoji" }
new_tab: true