From 46f8a61c9ed9e283f771ce242ef83d0583eece99 Mon Sep 17 00:00:00 2001 From: Mathis Date: Fri, 23 Aug 2024 13:23:57 +0200 Subject: [PATCH] Ajoute des composants UI et des packages Radix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout des nouveaux composants UI : Alert, Badge, Form, Sheet, Tabs et Input dans le répertoire frontend. Mise à jour du fichier package.json avec des nouvelles dépendances Radix UI et des autres bibliothèques nécessaires. Ajout d'une configuration pour TailwindCSS dans components.json. --- .eslintignore | 1 + .eslintrc.json | 35 +++++++++ .prettierignore | 5 ++ .prettierrc | 3 + apps/frontend/src/app/global.css | 97 ++++++++++--------------- apps/frontend/src/app/layout.tsx | 9 ++- apps/frontend/src/app/page.tsx | 38 ++++++++-- apps/frontend/src/components/Footer.tsx | 3 + apps/frontend/src/components/Header.tsx | 9 +++ package.json | 1 + pnpm-lock.yaml | 33 +++------ 11 files changed, 146 insertions(+), 88 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 apps/frontend/src/components/Footer.tsx create mode 100644 apps/frontend/src/components/Header.tsx diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..9ca2e83 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,35 @@ +{ + "root": true, + "ignorePatterns": ["**/*"], + "plugins": ["@nx"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@nx/enforce-module-boundaries": [ + "error", + { + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] + } + ] + } + }, + { + "files": ["*.ts", "*.tsx"], + "extends": ["plugin:@nx/typescript"], + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nx/javascript"], + "rules": {} + } + ] +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..e26f0b3 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +# Add files here to ignore them from prettier formatting +/dist +/coverage +/.nx/cache +/.nx/workspace-data \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..544138b --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "singleQuote": true +} diff --git a/apps/frontend/src/app/global.css b/apps/frontend/src/app/global.css index e11e133..8862017 100644 --- a/apps/frontend/src/app/global.css +++ b/apps/frontend/src/app/global.css @@ -2,71 +2,54 @@ @tailwind components; @tailwind utilities; +.police-ubuntu { + font-family: 'Ubuntu', sans-serif; +} + @layer base { :root { - --background: 0 0% 100%; - --foreground: 222.2 47.4% 11.2%; - - --muted: 210 40% 96.1%; - --muted-foreground: 215.4 16.3% 46.9%; - + --background: 0 0% 87.18%; + --foreground: 0 0% 12.94%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 26 83.33% 14.12%; --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%; - + --popover-foreground: 0 0% 12.94%; --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%; - + --card-foreground: 0 0% 12.94%; + --border: 20 0% 52.31%; + --input: 20 21.42% 41.39%; + --primary: 47.9 100% 48.08%; + --primary-foreground: 26 83.3% 14.1%; + --secondary: 26 49.13% 43.5%; + --secondary-foreground: 0 0% 92.55%; + --accent: 60 0% 93.08%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 60 9.1% 97.8%; + --ring: 20 14.3% 4.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%; - - --radius: 0.5rem; + --background: 20 12.91% 14%; + --foreground: 0 0% 92.55%; + --muted: 12 6.83% 26.64%; + --muted-foreground: 24 5.4% 63.9%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --card: 20 14.3% 4.1%; + --card-foreground: 0 0% 92.55%; + --border: 12 6.19% 17.63%; + --input: 12 6.5% 15.1%; + --primary: 60 96.56% 44.61%; + --primary-foreground: 26 90.03% 12.55%; + --secondary: 12 26.8% 16.18%; + --secondary-foreground: 0 0% 92.55%; + --accent: 12 5.7% 26.68%; + --accent-foreground: 0 0% 92.55%; + --destructive: 0 60.83% 54.18%; + --destructive-foreground: 0 0% 92.55%; + --ring: 47.95 95.82% 53.14%; } } diff --git a/apps/frontend/src/app/layout.tsx b/apps/frontend/src/app/layout.tsx index 3c89ebd..f266edd 100644 --- a/apps/frontend/src/app/layout.tsx +++ b/apps/frontend/src/app/layout.tsx @@ -1,4 +1,7 @@ +import { Header } from '../components/Header'; +import '@fontsource/ubuntu'; import './global.css'; +import { Footer } from '../components/Footer'; export const metadata = { title: 'Welcome to frontend', @@ -12,7 +15,11 @@ export default function RootLayout({ }) { return ( - {children} + +
+ {children} +