feat: compose atlas identity for fishing pairs
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
---
|
||||
import FishSilhouette from "./FishSilhouette.astro";
|
||||
import WaterbodyMark from "./WaterbodyMark.astro";
|
||||
const { eyebrow, title, description, variant, count, identity = title } = Astro.props as { eyebrow: string; title: string; description?: string; variant?: "water" | "fish"; count?: number; identity?: string };
|
||||
import AtlasPairMark from "./AtlasPairMark.astro";
|
||||
const { eyebrow, title, description, variant, count, identity = title, secondaryIdentity = "waterbody" } = Astro.props as { eyebrow: string; title: string; description?: string; variant?: "water" | "fish" | "pair"; count?: number; identity?: string; secondaryIdentity?: string };
|
||||
---
|
||||
<section class:list={["catalog-hero content-grid", { "catalog-hero--illustrated": variant }]}>
|
||||
<div class="catalog-hero__copy"><span class="overline">{eyebrow}</span><h1>{title}</h1>{description && <p>{description}</p>}</div>
|
||||
{variant && <div class="catalog-hero__seal" aria-hidden="true"><span>{variant === "water" ? <WaterbodyMark identity={identity} size={94} /> : <FishSilhouette name={identity} size={92} />}</span>{typeof count === "number" && <><strong>{String(count).padStart(2,"0")}</strong><small>{variant === "water" ? "водоёмов" : "видов рыб"}</small></>}</div>}
|
||||
{variant && <div class:list={["catalog-hero__seal", { "catalog-hero__seal--pair": variant === "pair" }]} aria-hidden="true"><span>{variant === "water" ? <WaterbodyMark identity={identity} size={94} /> : variant === "pair" ? <AtlasPairMark waterbody={secondaryIdentity} fish={identity} /> : <FishSilhouette name={identity} size={92} />}</span>{typeof count === "number" && <><strong>{String(count).padStart(2,"0")}</strong><small>{variant === "water" ? "водоёмов" : "видов рыб"}</small></>}</div>}
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user