Skip to content

Commit

Permalink
Merge pull request #3 from Hixo23/1-project-setup
Browse files Browse the repository at this point in the history
add tailwind css
  • Loading branch information
ssynowiec authored Apr 29, 2024
2 parents fb2b1d8 + f25853b commit 4a13132
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 344 deletions.
119 changes: 75 additions & 44 deletions apps/web/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,81 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;

--foreground-rgb: 255, 255, 255;
--background-start-rgb: 0, 0, 0;
--background-end-rgb: 0, 0, 0;

--callout-rgb: 20, 20, 20;
--callout-border-rgb: 108, 108, 108;
--card-rgb: 100, 100, 100;
--card-border-rgb: 200, 200, 200;

--glow-conic: conic-gradient(
from 180deg at 50% 50%,
#2a8af6 0deg,
#a853ba 180deg,
#e92a67 360deg
);
}
@tailwind base;
@tailwind components;
@tailwind utilities;

* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;

html,
body {
max-width: 100vw;
overflow-x: hidden;
}
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;

--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;

--ring: 215 20.2% 65.1%;

--radius: 0.5rem;
}

.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;

--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;

--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;

--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;

--border: 216 34% 17%;
--input: 216 34% 17%;

--card: 224 71% 4%;
--card-foreground: 213 31% 91%;

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;

--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;

--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;

--ring: 216 34% 17%;

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
--radius: 0.5rem;
}
}

a {
color: inherit;
text-decoration: none;
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
font-feature-settings: "rlig" 1, "calt" 1;
}
}
7 changes: 4 additions & 3 deletions apps/web/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import styles from './page.module.css';
import type { ReactElement } from 'react';
import { Button } from '@repo/ui/button';

const Home = (): ReactElement => {
return (
<main className={styles.main}>
<h1 className={styles.title}>Welcome to Recruitex!</h1>
<main className="min-h-screen bg-black text-white flex flex-col items-center justify-between p-4">
<h1 className="text-4xl font-bold ">Welcome to Recruitex!</h1>
<Button variant="destructive">Ta rakieta</Button>
</main>
);
};
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@next/eslint-plugin-next": "^14.2.3",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@repo/tailwind-config": "workspace:*",
"@types/eslint": "^8.56.10",
"@types/node": "^20.12.7",
"@types/react": "^18.3.0",
Expand Down
1 change: 1 addition & 0 deletions apps/web/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@repo/tailwind-config/postcss.config')
1 change: 1 addition & 0 deletions apps/web/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("@repo/tailwind-config/tailwind.config");
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,10 @@
"engines": {
"node": ">=18",
"pnpm": ">=9"
},
"dependencies": {
"autoprefixer": "^10.4.19",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3"
}
}
5 changes: 5 additions & 0 deletions packages/tailwind-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@repo/tailwind-config",
"version": "1.0.0",
"private": true
}
6 changes: 6 additions & 0 deletions packages/tailwind-config/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
74 changes: 74 additions & 0 deletions packages/tailwind-config/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
module.exports = {
content: [
'../../packages/ui/components/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
'../../apps/**/*.{ts,tsx}',
],
prefix: '',
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
},
plugins: [require('tailwindcss-animate')],
};
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@repo/tailwind-config": "workspace:*",
"@turbo/gen": "^1.12.4",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.24",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@repo/tailwind-config/postcss.config')
78 changes: 1 addition & 77 deletions packages/ui/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,77 +1 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: ["class"],
content: [
'./pages/**/*.{ts,tsx}',
'./components/**/*.{ts,tsx}',
'./app/**/*.{ts,tsx}',
'./src/**/*.{ts,tsx}',
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {
"2xl": "1400px",
},
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
},
borderRadius: {
lg: "var(--radius)",
md: "calc(var(--radius) - 2px)",
sm: "calc(var(--radius) - 4px)",
},
keyframes: {
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require("tailwindcss-animate")],
}
module.exports = require('@repo/tailwind-config/tailwind.config')
Loading

0 comments on commit 4a13132

Please sign in to comment.