feat: twind plugin (#513)

This adds a first-party twind plugin to use twind for styling.
This commit is contained in:
Luca Casonato
2022-08-09 21:41:11 +02:00
committed by GitHub
parent fd4e2bbe17
commit 660e0f5fef
20 changed files with 296 additions and 238 deletions
+5 -12
View File
@@ -1,6 +1,5 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "@twind";
const LINKS = [
{
@@ -18,23 +17,17 @@ const LINKS = [
];
export default function Footer() {
const footer =
tw`border(t-2 gray-200) bg-gray-100 h-32 flex flex-col gap-4 justify-center`;
const inner =
tw`mx-auto max-w-screen-lg flex items-center justify-center gap-8`;
const linkStyle = tw`text-gray-600 hover:underline`;
const copyright = tw`text(gray-600 center)`;
return (
<footer class={footer}>
<div class={inner}>
<footer class="border(t-2 gray-200) bg-gray-100 h-32 flex flex-col gap-4 justify-center">
<div class="mx-auto max-w-screen-lg flex items-center justify-center gap-8">
{LINKS.map((link) => (
<a href={link.href} class={linkStyle}>
<a href={link.href} class="text-gray-600 hover:underline">
{link.title}
</a>
))}
</div>
<div class={copyright}>
<span>© {new Date().getFullYear()} the Fresh authors</span>
<div class="text(gray-600 center)">
<span>© {new Date().getFullYear()} the fresh authors</span>
</div>
</footer>
);