Szablon witryny, docker i workflow gitea
This commit is contained in:
63
src/components/hero/Hero.astro
Normal file
63
src/components/hero/Hero.astro
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
const {
|
||||
title = [],
|
||||
subtitle = [],
|
||||
description,
|
||||
imageUrl,
|
||||
ctas = []
|
||||
} = Astro.props;
|
||||
---
|
||||
|
||||
<section class="fuz-section">
|
||||
<div class="fuz-container grid md:grid-cols-2 gap-10 items-center">
|
||||
<div class="space-y-6">
|
||||
{Array.isArray(title) ? (
|
||||
<h1 class="fuz-hero-title">
|
||||
{title.map((line) => (
|
||||
<span class="block">{line}</span>
|
||||
))}
|
||||
</h1>
|
||||
) : (
|
||||
<h1 class="fuz-hero-title">{title}</h1>
|
||||
)}
|
||||
|
||||
{Array.isArray(subtitle) && subtitle.length > 0 && (
|
||||
<div class="fuz-hero-subtitle space-y-1">
|
||||
{subtitle.map((line) => (
|
||||
<p>{line}</p>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{description && (
|
||||
<p class="mt-4 text-base md:text-lg text-gray-600 dark:text-gray-300 max-w-xl">
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{ctas.length > 0 && (
|
||||
<div class="mt-6 flex flex-wrap gap-3">
|
||||
{ctas.map((cta) => (
|
||||
<a
|
||||
href={cta.href}
|
||||
class="inline-flex items-center rounded-full px-5 py-2.5 text-sm font-medium bg-sky-600 text-white hover:bg-sky-700 dark:bg-sky-500 dark:hover:bg-sky-400"
|
||||
>
|
||||
{cta.label}
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{imageUrl && (
|
||||
<div class="relative aspect-video md:aspect-[4/3] overflow-hidden rounded-3xl border border-slate-200/70 dark:border-slate-700/70">
|
||||
<img
|
||||
src={imageUrl}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
class="h-full w-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user