Skip to content

Commit 9787a8c

Browse files
committed
Site Configuration
1 parent 4dde3d9 commit 9787a8c

File tree

12 files changed

+174
-154
lines changed

12 files changed

+174
-154
lines changed

frontend/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
# React Router
55
/.react-router/
66
/build/
7+
/node/

frontend/Dockerfile

Lines changed: 0 additions & 22 deletions
This file was deleted.

frontend/app/components/ui/button.tsx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import * as React from "react"
2+
import { Slot } from "@radix-ui/react-slot"
3+
import { cva, type VariantProps } from "class-variance-authority"
4+
5+
import { cn } from "~/lib/utils"
6+
7+
const buttonVariants = cva(
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9+
{
10+
variants: {
11+
variant: {
12+
default:
13+
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
14+
destructive:
15+
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
16+
outline:
17+
"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
18+
secondary:
19+
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
20+
ghost: "hover:bg-accent hover:text-accent-foreground",
21+
link: "text-primary underline-offset-4 hover:underline",
22+
},
23+
size: {
24+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
25+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
26+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
27+
icon: "size-9",
28+
},
29+
},
30+
defaultVariants: {
31+
variant: "default",
32+
size: "default",
33+
},
34+
}
35+
)
36+
37+
function Button({
38+
className,
39+
variant,
40+
size,
41+
asChild = false,
42+
...props
43+
}: React.ComponentProps<"button"> &
44+
VariantProps<typeof buttonVariants> & {
45+
asChild?: boolean
46+
}) {
47+
const Comp = asChild ? Slot : "button"
48+
49+
return (
50+
<Comp
51+
data-slot="button"
52+
className={cn(buttonVariants({ variant, size, className }))}
53+
{...props}
54+
/>
55+
)
56+
}
57+
58+
export { Button, buttonVariants }

frontend/app/welcome/logo-dark.svg

Lines changed: 0 additions & 23 deletions
This file was deleted.

frontend/app/welcome/logo-light.svg

Lines changed: 0 additions & 23 deletions
This file was deleted.

frontend/app/welcome/welcome.tsx

Lines changed: 16 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,28 @@
1-
import logoDark from "./logo-dark.svg";
2-
import logoLight from "./logo-light.svg";
1+
import {useEffect, useState} from "react";
2+
import { Button } from "~/components/ui/button"
33

44
export function Welcome() {
5+
const [hello, setHello] = useState("Waiting for hello!");
6+
7+
const getHello = async () => {
8+
const response = await fetch("/api/hello");
9+
response.text().then((data)=>setHello(data));
10+
};
11+
12+
useEffect(() => {
13+
getHello();
14+
}, []);
15+
516
return (
617
<main className="flex items-center justify-center pt-16 pb-4">
718
<div className="flex-1 flex flex-col items-center gap-16 min-h-0">
819
<header className="flex flex-col items-center gap-9">
9-
<div className="w-[500px] max-w-[100vw] p-4">
10-
<img
11-
src={logoLight}
12-
alt="React Router"
13-
className="block w-full dark:hidden"
14-
/>
15-
<img
16-
src={logoDark}
17-
alt="React Router"
18-
className="hidden w-full dark:block"
19-
/>
20+
<div className="w-[500px] max-w-[100vw] p-4 text-center">
21+
{hello}
2022
</div>
23+
<Button onClick={getHello}>Hello!</Button>
2124
</header>
22-
<div className="max-w-[300px] w-full space-y-6 px-4">
23-
<nav className="rounded-3xl border border-gray-200 p-6 dark:border-gray-700 space-y-4">
24-
<p className="leading-6 text-gray-700 dark:text-gray-200 text-center">
25-
What&apos;s next?
26-
</p>
27-
<ul>
28-
{resources.map(({ href, text, icon }) => (
29-
<li key={href}>
30-
<a
31-
className="group flex items-center gap-3 self-stretch p-3 leading-normal text-blue-700 hover:underline dark:text-blue-500"
32-
href={href}
33-
target="_blank"
34-
rel="noreferrer"
35-
>
36-
{icon}
37-
{text}
38-
</a>
39-
</li>
40-
))}
41-
</ul>
42-
</nav>
43-
</div>
4425
</div>
4526
</main>
4627
);
4728
}
48-
49-
const resources = [
50-
{
51-
href: "https://reactrouter.com/docs",
52-
text: "React Router Docs",
53-
icon: (
54-
<svg
55-
xmlns="http://www.w3.org/2000/svg"
56-
width="24"
57-
height="20"
58-
viewBox="0 0 20 20"
59-
fill="none"
60-
className="stroke-gray-600 group-hover:stroke-current dark:stroke-gray-300"
61-
>
62-
<path
63-
d="M9.99981 10.0751V9.99992M17.4688 17.4688C15.889 19.0485 11.2645 16.9853 7.13958 12.8604C3.01467 8.73546 0.951405 4.11091 2.53116 2.53116C4.11091 0.951405 8.73546 3.01467 12.8604 7.13958C16.9853 11.2645 19.0485 15.889 17.4688 17.4688ZM2.53132 17.4688C0.951566 15.8891 3.01483 11.2645 7.13974 7.13963C11.2647 3.01471 15.8892 0.951453 17.469 2.53121C19.0487 4.11096 16.9854 8.73551 12.8605 12.8604C8.73562 16.9853 4.11107 19.0486 2.53132 17.4688Z"
64-
strokeWidth="1.5"
65-
strokeLinecap="round"
66-
/>
67-
</svg>
68-
),
69-
},
70-
{
71-
href: "https://rmx.as/discord",
72-
text: "Join Discord",
73-
icon: (
74-
<svg
75-
xmlns="http://www.w3.org/2000/svg"
76-
width="24"
77-
height="20"
78-
viewBox="0 0 24 20"
79-
fill="none"
80-
className="stroke-gray-600 group-hover:stroke-current dark:stroke-gray-300"
81-
>
82-
<path
83-
d="M15.0686 1.25995L14.5477 1.17423L14.2913 1.63578C14.1754 1.84439 14.0545 2.08275 13.9422 2.31963C12.6461 2.16488 11.3406 2.16505 10.0445 2.32014C9.92822 2.08178 9.80478 1.84975 9.67412 1.62413L9.41449 1.17584L8.90333 1.25995C7.33547 1.51794 5.80717 1.99419 4.37748 2.66939L4.19 2.75793L4.07461 2.93019C1.23864 7.16437 0.46302 11.3053 0.838165 15.3924L0.868838 15.7266L1.13844 15.9264C2.81818 17.1714 4.68053 18.1233 6.68582 18.719L7.18892 18.8684L7.50166 18.4469C7.96179 17.8268 8.36504 17.1824 8.709 16.4944L8.71099 16.4904C10.8645 17.0471 13.128 17.0485 15.2821 16.4947C15.6261 17.1826 16.0293 17.8269 16.4892 18.4469L16.805 18.8725L17.3116 18.717C19.3056 18.105 21.1876 17.1751 22.8559 15.9238L23.1224 15.724L23.1528 15.3923C23.5873 10.6524 22.3579 6.53306 19.8947 2.90714L19.7759 2.73227L19.5833 2.64518C18.1437 1.99439 16.6386 1.51826 15.0686 1.25995ZM16.6074 10.7755L16.6074 10.7756C16.5934 11.6409 16.0212 12.1444 15.4783 12.1444C14.9297 12.1444 14.3493 11.6173 14.3493 10.7877C14.3493 9.94885 14.9378 9.41192 15.4783 9.41192C16.0471 9.41192 16.6209 9.93851 16.6074 10.7755ZM8.49373 12.1444C7.94513 12.1444 7.36471 11.6173 7.36471 10.7877C7.36471 9.94885 7.95323 9.41192 8.49373 9.41192C9.06038 9.41192 9.63892 9.93712 9.6417 10.7815C9.62517 11.6239 9.05462 12.1444 8.49373 12.1444Z"
84-
strokeWidth="1.5"
85-
/>
86-
</svg>
87-
),
88-
},
89-
];

0 commit comments

Comments
 (0)