Add links and key figures to project pages
All checks were successful
Build and Deploy to Web Server / deploy (push) Successful in 16m35s
All checks were successful
Build and Deploy to Web Server / deploy (push) Successful in 16m35s
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
import ImageCarousel from "@components/ImageCarousel.astro";
|
import ImageCarousel from "@components/ImageCarousel.astro";
|
||||||
import MainLayout from "@layouts/MainLayout.astro";
|
import MainLayout from "@layouts/MainLayout.astro";
|
||||||
|
|
||||||
|
import TextLink from "@components/TextLink.astro";
|
||||||
|
|
||||||
|
import { Icon } from "astro-icon/components";
|
||||||
import { getCollection, render } from "astro:content";
|
import { getCollection, render } from "astro:content";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -9,7 +12,7 @@ import {
|
|||||||
getFullExternalURLOfImage,
|
getFullExternalURLOfImage,
|
||||||
getProjectHero,
|
getProjectHero,
|
||||||
slugify
|
slugify
|
||||||
} from "@/lib/utils";
|
} from "@lib/utils";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
export async function getStaticPaths() {
|
||||||
const projects = await getCollection("projects", ({ body }) => {
|
const projects = await getCollection("projects", ({ body }) => {
|
||||||
@@ -71,15 +74,56 @@ import P from "@components/MDX/P.astro";
|
|||||||
><div
|
><div
|
||||||
class="absolute inset-0 flex h-full w-full items-center justify-center px-8 text-center"
|
class="absolute inset-0 flex h-full w-full items-center justify-center px-8 text-center"
|
||||||
>
|
>
|
||||||
<div class="block">
|
<div class="block space-y-4">
|
||||||
<h1 class="font-header text-5xl uppercase text-shadow-lg/75">
|
<h1
|
||||||
|
class="font-header text-4xl uppercase text-shadow-lg/75 md:text-6xl"
|
||||||
|
>
|
||||||
{project.data.title}
|
{project.data.title}
|
||||||
</h1>
|
</h1>
|
||||||
<div class="pt-2 text-lg font-bold">
|
<div class="text-lg font-bold md:text-xl">
|
||||||
<span>{project.data.role}</span> | <span
|
<span>{project.data.role}</span> | <span
|
||||||
>{project.data.type}</span
|
>{project.data.type}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
{
|
||||||
|
project.data.keyFigure && project.data.keyFigure.length > 0 && (
|
||||||
|
<div class="text-md mt-8">
|
||||||
|
{project.data.keyFigure.map((figure) => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<span class="font-bold">{figure.title}:</span>
|
||||||
|
<span>
|
||||||
|
{figure.href && (
|
||||||
|
<TextLink href={figure.href}>
|
||||||
|
{figure.name}
|
||||||
|
</TextLink>
|
||||||
|
)}
|
||||||
|
{!figure.href && figure.name}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
{
|
||||||
|
project.data.externalLinks !== undefined && (
|
||||||
|
<span class="relative order-3 mx-auto flex w-full items-center justify-center space-x-4 text-4xl">
|
||||||
|
{project.data.externalLinks.map((link) => (
|
||||||
|
<TextLink
|
||||||
|
href={link.href}
|
||||||
|
includeExternalLinkIcon={false}
|
||||||
|
aria-label={link.name}
|
||||||
|
>
|
||||||
|
<Icon
|
||||||
|
name={link.icon}
|
||||||
|
class="text-white transition hover:text-gray-300"
|
||||||
|
/>
|
||||||
|
</TextLink>
|
||||||
|
))}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div></ImageCarousel
|
</div></ImageCarousel
|
||||||
>
|
>
|
||||||
|
Reference in New Issue
Block a user