Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjust and test project setup #1548

Merged
merged 12 commits into from
Nov 19, 2024
2 changes: 1 addition & 1 deletion .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
with:
node-version: 20
- name: Install dependencies
run: npm install
run: npm install --force
- name: Run TypeScript compiler
run: npm run type-check
15 changes: 15 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"scripts": {
"prepare": "husky install",
"prepare": "husky",
"dev": "next dev",
"dev:turbo": "next dev --turbo",
"build": "next build",
Expand All @@ -23,6 +23,7 @@
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"next": "15.0.3",
"next-themes": "^0.4.3",
"react": "19.0.0-rc-66855b96-20241106",
"react-dom": "19.0.0-rc-66855b96-20241106",
"tailwind-merge": "^2.5.4",
Expand Down
278 changes: 142 additions & 136 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,140 +2,146 @@
@tailwind components;
@tailwind utilities;

@layer base {
html {
scroll-behavior: smooth;
}

:root {
/* Raw colors */
--indigo-50: #eef2ff;
--indigo-100: #e0e7ff;
--indigo-200: #c7d2fe;
--indigo-300: #a5b4fc;
--indigo-400: #818cf8;
--indigo-500: #6366f1;
--indigo-600: #4f46e5;
--indigo-700: #4338ca;
--indigo-800: #3730a3;
--indigo-900: #312e81;

--green-50: #f0fdf4;
--green-100: #dcfce7;
--green-200: #bbf7d0;
--green-300: #86efac;
--green-400: #4ade80;
--green-500: #22c55e;
--green-600: #16a34a;
--green-700: #15803d;
--green-800: #166534;
--green-900: #14532d;

--blue-50: #eff6ff;
--blue-100: #dbeafe;
--blue-200: #bfdbfe;
--blue-300: #93c5fd;
--blue-400: #60a5fa;
--blue-500: #3b82f6;
--blue-600: #2563eb;
--blue-700: #1d4ed8;
--blue-800: #1e40af;
--blue-900: #1e3a8a;

--red-50: #fef2f2;
--red-100: #fee2e2;
--red-200: #fecaca;
--red-300: #fca5a5;
--red-400: #f87171;
--red-500: #ef4444;
--red-600: #dc2626;
--red-700: #b91c1c;
--red-800: #991b1b;
--red-900: #7f1d1d;

--gray-50: #fafafa;
--gray-100: #f4f4f5;
--gray-200: #e4e4e7;
--gray-300: #d4d4d8;
--gray-350: #b0b0b9;
--gray-400: #a1a1aa;
--gray-450: #8a8a96;
--gray-500: #71717a;
--gray-600: #52525b;
--gray-700: #3f3f46;
--gray-800: #27272a;
--gray-900: #18181b;

/* Semantic colors */
--background: var(--gray-100);
--foreground: var(--gray-800);
--card: #fff;
--image: var(--gray-700);
--skeleton: var(--gray-300);

--button-primary: var(--indigo-500);
--button-primary-hover: var(--indigo-600);
--button-primary-active: var(--indigo-700);
--button-primary-foreground: #fff;
--button-primary-subtle: var(--indigo-300);
--button-primary-subtle-foreground: var(--indigo-500);

--button-secondary: rgba(0, 0, 0, 0.06);
--button-secondary-hover: rgba(0, 0, 0, 0.08);
--button-secondary-active: rgba(0, 0, 0, 0.16);
--button-secondary-foreground: var(--foreground);
--button-secondary-subtle: #a1a1aa;
--button-secondary-subtle-foreground: var(--foreground);

--button-destructive: var(--red-500);
--button-destructive-hover: var(--red-600);
--button-destructive-active: var(--red-700);
--button-destructive-foreground: #fff;
--button-destructive-subtle: var(--red-300);
--button-destructive-subtle-foreground: var(--red-500);

--button-success: var(--green-500);
--button-success-hover: var(--green-600);
--button-success-active: var(--green-700);
--button-success-foreground: #fff;
--button-success-subtle: var(--green-300);
--button-success-subtle-foreground: var(--green-500);
}

:root[data-theme="dark"],
[data-theme="dark"] {
--background: var(--gray-800);
--foreground: var(--gray-100);
--card: var(--gray-700);
--image: var(--gray-600);
--skeleton: var(--gray-600);

--button-primary: var(--indigo-500);
--button-primary-hover: var(--indigo-400);
--button-primary-active: var(--indigo-300);
--button-primary-foreground: #fff;
--button-primary-subtle: var(--indigo-300);
--button-primary-subtle-foreground: var(--indigo-500);

--button-secondary: rgba(255, 255, 255, 0.06);
--button-secondary-hover: rgba(255, 255, 255, 0.08);
--button-secondary-active: rgba(255, 255, 255, 0.16);
--button-secondary-foreground: var(--foreground);
--button-secondary-subtle: #a1a1aa;
--button-secondary-subtle-foreground: var(--foreground);

--button-destructive: var(--red-500);
--button-destructive-hover: var(--red-400);
--button-destructive-active: var(--red-300);
--button-destructive-foreground: #fff;
--button-destructive-subtle: var(--red-300);
--button-destructive-subtle-foreground: var(--red-500);

--button-success: var(--green-500);
--button-success-hover: var(--green-400);
--button-success-active: var(--green-300);
--button-success-foreground: #fff;
--button-success-subtle: var(--green-300);
--button-success-subtle-foreground: var(--green-500);
}
html {
scroll-behavior: smooth;
}

:root {
/* Raw colors */
--indigo-50: #eef2ff;
--indigo-100: #e0e7ff;
--indigo-200: #c7d2fe;
--indigo-300: #a5b4fc;
--indigo-400: #818cf8;
--indigo-500: #6366f1;
--indigo-600: #4f46e5;
--indigo-700: #4338ca;
--indigo-800: #3730a3;
--indigo-900: #312e81;

--green-50: #f0fdf4;
--green-100: #dcfce7;
--green-200: #bbf7d0;
--green-300: #86efac;
--green-400: #4ade80;
--green-500: #22c55e;
--green-600: #16a34a;
--green-700: #15803d;
--green-800: #166534;
--green-900: #14532d;

--blue-50: #eff6ff;
--blue-100: #dbeafe;
--blue-200: #bfdbfe;
--blue-300: #93c5fd;
--blue-400: #60a5fa;
--blue-500: #3b82f6;
--blue-600: #2563eb;
--blue-700: #1d4ed8;
--blue-800: #1e40af;
--blue-900: #1e3a8a;

--red-50: #fef2f2;
--red-100: #fee2e2;
--red-200: #fecaca;
--red-300: #fca5a5;
--red-400: #f87171;
--red-500: #ef4444;
--red-600: #dc2626;
--red-700: #b91c1c;
--red-800: #991b1b;
--red-900: #7f1d1d;

--gray-50: #fafafa;
--gray-100: #f4f4f5;
--gray-200: #e4e4e7;
--gray-300: #d4d4d8;
--gray-350: #b0b0b9;
--gray-400: #a1a1aa;
--gray-450: #8a8a96;
--gray-500: #71717a;
--gray-600: #52525b;
--gray-700: #3f3f46;
--gray-800: #27272a;
--gray-900: #18181b;

/* Semantic colors */
--background: var(--gray-100);
--foreground: var(--gray-800);
--card: #fff;
--image: var(--gray-700);
--skeleton: var(--gray-300);

--button-primary: var(--indigo-500);
--button-primary-hover: var(--indigo-600);
--button-primary-active: var(--indigo-700);
--button-primary-foreground: #fff;
--button-primary-subtle: var(--indigo-300);
--button-primary-subtle-foreground: var(--indigo-500);

--button-secondary: rgba(0, 0, 0, 0.06);
--button-secondary-hover: rgba(0, 0, 0, 0.08);
--button-secondary-active: rgba(0, 0, 0, 0.16);
--button-secondary-foreground: var(--foreground);
--button-secondary-subtle: #a1a1aa;
--button-secondary-subtle-foreground: var(--foreground);

--button-destructive: var(--red-500);
--button-destructive-hover: var(--red-600);
--button-destructive-active: var(--red-700);
--button-destructive-foreground: #fff;
--button-destructive-subtle: var(--red-300);
--button-destructive-subtle-foreground: var(--red-500);

--button-success: var(--green-500);
--button-success-hover: var(--green-600);
--button-success-active: var(--green-700);
--button-success-foreground: #fff;
--button-success-subtle: var(--green-300);
--button-success-subtle-foreground: var(--green-500);
}

.dark {
--background: var(--gray-800);
--foreground: var(--gray-100);
--card: var(--gray-700);
--image: var(--gray-600);
--skeleton: var(--gray-600);

--button-primary: var(--indigo-500);
--button-primary-hover: var(--indigo-400);
--button-primary-active: var(--indigo-300);
--button-primary-foreground: #fff;
--button-primary-subtle: var(--indigo-300);
--button-primary-subtle-foreground: var(--indigo-500);

--button-secondary: rgba(255, 255, 255, 0.06);
--button-secondary-hover: rgba(255, 255, 255, 0.08);
--button-secondary-active: rgba(255, 255, 255, 0.16);
--button-secondary-foreground: var(--foreground);
--button-secondary-subtle: #a1a1aa;
--button-secondary-subtle-foreground: var(--foreground);

--button-destructive: var(--red-500);
--button-destructive-hover: var(--red-400);
--button-destructive-active: var(--red-300);
--button-destructive-foreground: #fff;
--button-destructive-subtle: var(--red-300);
--button-destructive-subtle-foreground: var(--red-500);

--button-success: var(--green-500);
--button-success-hover: var(--green-400);
--button-success-active: var(--green-300);
--button-success-foreground: #fff;
--button-success-subtle: var(--green-300);
--button-success-subtle-foreground: var(--green-500);
}

.dark video,
.dark img {
@apply brightness-90 contrast-125;
}

body {
@apply bg-background text-foreground font-sans min-h-screen antialiased selection:bg-foreground selection:text-background;
}
7 changes: 4 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { Metadata } from "next";
import "./globals.css";
import { CsrProviders } from "components/csr-providers";
import { dystopian, inter } from "fonts";
import { cn } from "lib/cn";
import { cn } from "lib/css-utils";

export const metadata: Metadata = {
title: "Guildhall",
Expand All @@ -19,15 +20,15 @@ const RootLayout = ({
children: React.ReactNode;
}>) => {
return (
<html lang="en" data-theme="dark">
<html lang="en" suppressHydrationWarning>
<body
className={cn(
dystopian.variable,
inter.variable,
"bg-background text-foreground antialiased",
)}
>
{children}
<CsrProviders>{children}</CsrProviders>
</body>
</html>
);
Expand Down
14 changes: 14 additions & 0 deletions src/app/playground/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const Playground = () => {
return (
<main className="text-8xl">
<h1 className="font-display">Hello, Guild!</h1>
<h2 className="font-bold font-display">Hello, Guild!</h2>
<p>Test, one, two, three...</p>
<p className="border font-sans">
Test, <strong>one</strong>, <em>two</em>, three...
</p>
</main>
);
};

export default Playground;
19 changes: 19 additions & 0 deletions src/components/csr-providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"use client";

import { ThemeProvider } from "next-themes";
import type { FunctionComponent, PropsWithChildren } from "react";

export const CsrProviders: FunctionComponent<PropsWithChildren> = ({
children,
}) => {
return (
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
);
};
File renamed without changes.
Loading
Loading