Add Hero and Footer Components (#947)
This commit is contained in:
@@ -6,7 +6,7 @@ export default function Button(props: JSX.HTMLAttributes<HTMLButtonElement>) {
|
||||
<button
|
||||
{...props}
|
||||
disabled={!IS_BROWSER || props.disabled}
|
||||
class={`px-3 py-2 bg-white rounded border(gray-500 2) hover:bg-gray-200 disabled:(opacity-50 cursor-not-allowed) ${
|
||||
class={`px-3 py-2 bg-white rounded border(gray-500 2) hover:bg-gray-200 active:bg-gray-300 disabled:(opacity-50 cursor-not-allowed) ${
|
||||
props.class ?? ""
|
||||
}`}
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,7 @@ export default function ColoredButton(
|
||||
<button
|
||||
{...props}
|
||||
disabled={!IS_BROWSER || props.disabled}
|
||||
class="px-3 py-2 bg-blue-200 text-blue-800 rounded hover:bg-blue-300"
|
||||
class="px-3 py-2 bg-blue-200 text-blue-800 rounded hover:bg-blue-300 active:bg-blue-400"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import IconAlarm from "https://deno.land/x/tabler_icons_tsx@0.0.2/tsx/alarm.tsx";
|
||||
import IconAirBalloon from "https://deno.land/x/tabler_icons_tsx@0.0.2/tsx/air-balloon.tsx";
|
||||
import IconArmchair from "https://deno.land/x/tabler_icons_tsx@0.0.2/tsx/armchair.tsx";
|
||||
import IconChevronRight from "https://deno.land/x/tabler_icons_tsx@0.0.2/tsx/chevron-right.tsx";
|
||||
|
||||
export default function Features() {
|
||||
const featureItems = [
|
||||
{
|
||||
icon: IconAlarm,
|
||||
description:
|
||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc ut aliquam aliquam",
|
||||
link: "#",
|
||||
},
|
||||
{
|
||||
icon: IconAirBalloon,
|
||||
description:
|
||||
"Nunc nisl aliquet nisl, eget aliquam nisl nisl sit amet lorem. Sed euismod, nunc ut aliquam aliquam, nunc nisl aliquet nisl, ",
|
||||
},
|
||||
{
|
||||
icon: IconArmchair,
|
||||
description: "Eget aliquam nisl nisl sit amet lorem.",
|
||||
link: "#",
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div class="flex flex-col md:flex-row gap-8 bg-white p-8">
|
||||
{featureItems.map((item) => {
|
||||
return (
|
||||
<div class="flex-1 space-y-2">
|
||||
<div class="bg-blue-600 inline-block p-3 rounded-xl text-white">
|
||||
<item.icon class="w-10 h-10" />
|
||||
</div>
|
||||
<p class="text-xl">
|
||||
{item.description}
|
||||
</p>
|
||||
|
||||
{item.link &&
|
||||
(
|
||||
<a class="block" href={item.link}>
|
||||
<p class="text-blue-500 cursor-pointer hover:underline inline-flex items-center group">
|
||||
Read More{" "}
|
||||
<IconChevronRight class="inline-block w-5 h-5 transition group-hover:translate-x-0.5" />
|
||||
</p>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import IconChevronRight from "https://deno.land/x/tabler_icons_tsx@0.0.2/tsx/chevron-right.tsx";
|
||||
|
||||
export default function Hero() {
|
||||
return (
|
||||
<div
|
||||
class="w-full flex px-8 h-96 justify-center items-center flex-col gap-8 bg-cover bg-center bg-no-repeat bg-gray-100 rounded-xl text-white"
|
||||
style="background-image:linear-gradient(rgba(0, 0, 40, 0.8),rgba(0, 0, 40, 0.8)), url('/gallery/hero-bg.webp');"
|
||||
>
|
||||
<div class="space-y-4 text-center">
|
||||
<h1 class="text-4xl inline-block font-bold">Fresh Components Beta</h1>
|
||||
<p class="text-xl max-w-lg text-blue-100">
|
||||
Fresh Components is a collection of components built with Preact and
|
||||
Tailwind CSS.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a
|
||||
href="#"
|
||||
class="block mt-4 text-blue-500 cursor-pointer inline-flex items-center group text-blue-800 bg-white px-8 py-2 rounded-md hover:bg-blue-50 font-bold"
|
||||
>
|
||||
Sign Up{" "}
|
||||
</a>
|
||||
<a
|
||||
href="#"
|
||||
class="block mt-4 transition-colors text-blue-400 cursor-pointer inline-flex items-center group px-4 py-2 hover:text-blue-100"
|
||||
>
|
||||
Documentation{" "}
|
||||
<IconChevronRight class="inline-block w-5 h-5 transition group-hover:translate-x-0.5" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user