LeConte deployments page complete, better auto-formatting and import sorting, new inline link, popover definitions, and paragraph components, improvements to component interfaces
This commit is contained in:
@@ -1,15 +1,23 @@
|
||||
---
|
||||
import "@styles/global.css";
|
||||
|
||||
import Navbar from "@components/Navbar.astro";
|
||||
import Footer from "@components/Footer.astro";
|
||||
import Navbar from "@components/Navbar.astro";
|
||||
|
||||
import { pathToMetadata } from "@data/site-layout.ts";
|
||||
|
||||
interface Props {
|
||||
title?: string;
|
||||
subTitles?: string[];
|
||||
|
||||
showTitle?: boolean;
|
||||
}
|
||||
|
||||
const { title, subTitles, showTitle = true } = Astro.props;
|
||||
|
||||
const pageTitle = Astro.props.title
|
||||
? `${Astro.props.title} - Corwin Perren`
|
||||
: "Corwin Perren";
|
||||
const showTitle = Astro.props.showTitle ?? true;
|
||||
const pageEnabled = pathToMetadata(Astro.url.pathname).enabled ?? true;
|
||||
---
|
||||
|
||||
@@ -38,12 +46,31 @@ const pageEnabled = pathToMetadata(Astro.url.pathname).enabled ?? true;
|
||||
<Navbar />
|
||||
<main class="mx-6 my-6">
|
||||
{
|
||||
Astro.props.title && showTitle && pageEnabled && (
|
||||
<h1 class="font-extrabold md:mb-6 md:text-3xl">
|
||||
{Astro.props.title}
|
||||
title && showTitle && pageEnabled && (
|
||||
<h1
|
||||
class={
|
||||
"text-xl font-extrabold md:text-3xl " +
|
||||
(subTitles ? "" : "md:mb-6")
|
||||
}
|
||||
>
|
||||
{title}
|
||||
</h1>
|
||||
)
|
||||
}
|
||||
{
|
||||
showTitle &&
|
||||
pageEnabled &&
|
||||
subTitles?.map((subTitle, index) => (
|
||||
<p
|
||||
class={
|
||||
"text-sm font-bold md:text-xl " +
|
||||
(index == subTitles.length - 1 ? "mb-2 md:mb-6" : "")
|
||||
}
|
||||
>
|
||||
{subTitle}
|
||||
</p>
|
||||
))
|
||||
}
|
||||
{pageEnabled && <slot />}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user