docs: port over to TailwindCSS (#2058)

This commit is contained in:
Marvin Hagemeister
2023-11-22 11:12:21 +01:00
committed by GitHub
parent f105f19005
commit bb035ae8da
26 changed files with 145 additions and 145 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export function RoundedButton(props: JSX.HTMLAttributes<HTMLButtonElement>) {
touchAction: "manipulation",
}}
{...props}
class="p-3 border border-transparent rounded-full text-white bg-green(500 hover:600) focus:(outline-none ring(2 offset-2 green-500)) disabled:(bg-green-200 cursor-default)}"
class="p-3 border border-transparent rounded-full text-white bg-green-500 hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 disabled:bg-green-200 disabled:cursor-default"
/>
);
}
+2 -2
View File
@@ -54,7 +54,7 @@ export function SidebarCategory(props: {
<li class="my-2 block">
<a
href={href}
class="text(gray-900 hover:gray-600) [data-current]:text-green-700 [data-current]:hover:underline font-bold"
class="text-gray-900 hover:text-gray-600 data-[current]:text-green-700 data-[current]:hover:underline font-bold"
>
{title}
</a>
@@ -78,7 +78,7 @@ export function SidebarEntry(props: {
<li class="py-[1px]">
<a
href={href}
class="[data-current]:text-green-700 [data-current]:border-green-600 [data-current]:bg-green-50 border-l-4 border-transparent px-4 py-0.5 transition-colors hover:text-green-500 font-normal block"
class="data-[current]:text-green-700 data-[current]:border-green-600 data-[current]:bg-green-50 border-l-4 border-transparent px-4 py-0.5 transition-colors hover:text-green-500 font-normal block"
>
{title}
</a>
+1 -1
View File
@@ -3,7 +3,7 @@ export default function DocsTitle() {
<>
<a
href="/"
class="text(2xl gray-900) flex items-center"
class="text-2xl text-gray-900 flex items-center"
aria-label="Top Page"
>
<svg
+2 -2
View File
@@ -18,8 +18,8 @@ const LINKS = [
export default function Footer() {
return (
<footer class="border-t-2 border-gray-200 md:h-16 flex my-8 justify-center">
<div class="flex flex-col sm:flex-row gap-4 justify-between items-center max-w-screen-xl mx-auto w-full px(4 sm:6 md:8) p-4">
<div class="text(gray-600 center)">
<div class="flex flex-col sm:flex-row gap-4 justify-between items-center max-w-screen-xl mx-auto w-full sm:px-6 md:px-8 p-4">
<div class="text-gray-600 text-center">
<span>© {new Date().getFullYear()} the Fresh authors</span>
</div>
+1 -1
View File
@@ -31,7 +31,7 @@ export default function NavigationBar(
href={item.href}
class={`p-1 sm:p-2 ${
isHome ? "text-green-900" : "text-gray-600"
} hover:underline [data-current]:font-bold [data-ancestor]:font-bold`}
} hover:underline data-[current]:font-bold data-[ancestor]:font-bold`}
>
{item.name}
</a>
+2 -2
View File
@@ -29,11 +29,11 @@ export default function Projects(props: ProjectProps) {
width={600}
height={337}
style={{ aspectRatio: "16/9" }}
class="object-cover shadow-lg group-hover:(shadow-xl opacity-70) rounded-lg"
class="object-cover shadow-lg group-hover:shadow-xl group-hover:opacity-70 rounded-lg"
/>
</a>
<div class="mt-4 flex items-center">
<div class="text(lg gray-600) flex-1 group-hover:text-underline">
<div class="text-lg text-gray-600 flex-1 group-hover:text-underline">
<a href={project.link}>{project.title}</a>
</div>
{project.github && (
+1 -2
View File
@@ -1,4 +1,3 @@
import { tw } from "twind";
import { asset } from "$fresh/runtime.ts";
import { useSignal } from "@preact/signals";
import { useEffect, useRef } from "preact/hooks";
@@ -83,7 +82,7 @@ const Carousel = (props: CarouselProps) => {
if (outgoingSlide === idx) return "-translate-x-full z-10";
return "translate-x-full";
};
return tw`slide absolute top-0 left-0 transition-all ease-in-out duration-700 transform ${TRANSITION_CLASS}`;
return `slide absolute top-0 left-0 transition-all ease-in-out duration-700 transform ${TRANSITION_CLASS}`;
};
const nextSlide = () => {