Renamed component
This commit is contained in:
parent
84f86debe0
commit
31f2306fad
|
@ -11,11 +11,17 @@ const { title, subtitle, pretitle } = Astro.props;
|
|||
{/* ------------------------------------------- HTML ------------------------------------------- */}
|
||||
|
||||
<h1 class="high-contrast-text">
|
||||
{pretitle && <span id="pretitle">{pretitle} </span>}
|
||||
<span id="title" class="font-serif">{title} </span>
|
||||
{
|
||||
pretitle && (
|
||||
<span id="pretitle" class="font-2xl">
|
||||
{pretitle}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
<span class="font-serif font-5xl">{title} </span>
|
||||
{
|
||||
subtitle && (
|
||||
<span id="subtitle" class="font-serif">
|
||||
<span id="subtitle" class="font-serif font-2xl">
|
||||
{subtitle}
|
||||
</span>
|
||||
)
|
||||
|
@ -27,22 +33,18 @@ const { title, subtitle, pretitle } = Astro.props;
|
|||
<style>
|
||||
h1 {
|
||||
line-height: 0.8;
|
||||
display: grid;
|
||||
font-size: clamp(1em, 0.7em + 1.5vw, 2em);
|
||||
|
||||
& > #pretitle {
|
||||
font-variation-settings: "wght" 430;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
|
||||
& > #title {
|
||||
font-variation-settings: "wght" 900;
|
||||
font-size: 200%;
|
||||
& > #subtitle {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
|
||||
& > #subtitle {
|
||||
font-variation-settings: "wght" 700;
|
||||
margin-top: 0.5em;
|
||||
& > span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
import CategoryCard from "./CategoryCard.astro";
|
||||
import LibraryCard from "./LibraryCard.astro";
|
||||
import { getI18n } from "src/i18n/i18n";
|
||||
import { cache } from "src/utils/payload";
|
||||
|
||||
|
@ -10,7 +10,7 @@ const { getLocalizedUrl, getLocalizedMatch } = await getI18n(Astro.locals.curren
|
|||
|
||||
{
|
||||
cache.config.home.folders.map(({ slug, translations, darkThumbnail, lightThumbnail }) => (
|
||||
<CategoryCard
|
||||
<LibraryCard
|
||||
img={
|
||||
darkThumbnail && lightThumbnail ? { dark: darkThumbnail, light: lightThumbnail } : undefined
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue