config tailwind

This commit is contained in:
2025-05-31 14:46:26 +03:30
parent d81d32fe4b
commit b8c3ebcee3
7 changed files with 248 additions and 109 deletions
+40
View File
@@ -1,4 +1,5 @@
@import "tailwindcss";
@import "tailwindcss/utilities";
:root {
--background: #ffffff;
@@ -24,3 +25,42 @@ body {
color: var(--foreground);
font-family: Arial, Helvetica, sans-serif;
}
:root {
--primary: #6366F1;
--secondary: #A78BFA;
--textColorLight: #FFFFFF;
--textColorGray: #222222;
--bgPrimary: #FFFFFF;
--gray-100: #EBEBEB;
--gray-200: #F5F5F5;
--gray-300: #81848A;
--gray-400: #777;
--gray-500: #222;
.dark{
--primary: #FA003F;
--secondary: #7C3AED;
--textColorLight: #FA003F;
--textColorGray: #FA003F;
--bgPrimary: #FA003F;
--gray-100: #EBEBEB;
--gray-200: #F5F5F5;
--gray-300: #81848A;
--gray-400: #777;
--gray-500: #222;
}
}
@theme inline {
--color-primary: var(--primary-default);
--color-secondary: var(--secondary-default);
--color-text-light: var(--textColorLight-default);
--color-text-gray: var(--textColorGray-default);
--color-bg-primary: var(--bgPrimary-default);
--color-gray-100: var(--gray-100);
--color-gray-200: var(--gray-200);
--color-gray-300: var(--gray-300);
--color-gray-400: var(--gray-400);
--color-gray-500: var(--gray-500);
}
+9 -9
View File
@@ -1,20 +1,20 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import type { Metadata } from 'next';
import { Geist, Geist_Mono } from 'next/font/google';
import './globals.css';
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
variable: '--font-geist-sans',
subsets: ['latin'],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
variable: '--font-geist-mono',
subsets: ['latin'],
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: 'Create Next App',
description: 'Generated by create next app',
};
export default function RootLayout({
+49 -97
View File
@@ -1,103 +1,55 @@
import Image from "next/image";
// ... existing imports ...
import Button from '../components/Button'; // Adjust the import path if necessary
async function getData() {
// Simulate a delay to show server-side data fetching
await new Promise((resolve) => setTimeout(resolve, 1000));
return { message: 'This data was fetched on the server!' };
}
export default async function Home() {
const data = await getData();
export default function Home() {
return (
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
<Image
className="dark:invert"
src="/next.svg"
alt="Next.js logo"
width={180}
height={38}
priority
/>
<ol className="list-inside list-decimal text-sm/6 text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
<li className="mb-2 tracking-[-.01em]">
Get started by editing{" "}
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-[family-name:var(--font-geist-mono)] font-semibold">
src/app/page.tsx
</code>
.
</li>
<li className="tracking-[-.01em]">
Save and see your changes instantly.
</li>
</ol>
<main className="flex min-h-screen flex-col items-center justify-between p-24 text-gray-300">
<div className="z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex">
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
{data.message}
</p>
</div>
<div className="flex gap-4 items-center flex-col sm:flex-row">
<a
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:w-auto"
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
className="dark:invert"
src="/vercel.svg"
alt="Vercel logomark"
width={20}
height={20}
/>
Deploy now
</a>
<a
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent font-medium text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 w-full sm:w-auto md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Read our docs
</a>
<div className="mt-8 flex gap-4">
<Button>Default Button</Button>
<Button disabled>Disabled Button</Button>
<Button loading>Loading Button</Button>
<Button endIcon={<span></span>}>Button with Icon</Button>
</div>
<div className="mt-8 flex flex-col gap-4">
<h3>Standard Buttons:</h3>
<div className="flex gap-4">
<Button>Default Button</Button>
<Button disabled>Disabled Button</Button>
<Button loading>Loading Button</Button>
<Button endIcon={<span></span>}>Button with Icon</Button>
</div>
</main>
<footer className="row-start-3 flex gap-[24px] flex-wrap items-center justify-center">
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/file.svg"
alt="File icon"
width={16}
height={16}
/>
Learn
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/window.svg"
alt="Window icon"
width={16}
height={16}
/>
Examples
</a>
<a
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
<Image
aria-hidden
src="/globe.svg"
alt="Globe icon"
width={16}
height={16}
/>
Go to nextjs.org
</a>
</footer>
</div>
<h3>Sized Buttons:</h3>
<div className="flex gap-4 items-center">
<Button size="small">Small Button</Button>
<Button size="medium">Medium Button</Button>
<Button size="large">Large Button</Button>
</div>
<h3>Icon Buttons:</h3>
<div className="flex gap-4 items-center">
<Button iconOnly endIcon={<span></span>} size="small" />
<Button iconOnly endIcon={<span></span>} size="medium" />
<Button iconOnly endIcon={<span></span>} size="large" />
<Button iconOnly endIcon={<span></span>} disabled size="medium" />
<Button iconOnly endIcon={<span></span>} loading size="medium" />
</div>
</div>
</main>
);
}