diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index 783d087..0000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "permissions": { - "allow": [], - "deny": [] - } -} \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d8809bb..42c3e62 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts +FROM node:24 WORKDIR /app diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2cd2fe5..839dfac 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,22 +1,13 @@ { - "workspaceFolder": "/workspace", - "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z", - "runArgs": [ - "--network=dev-network" - ], - "build": { - "dockerfile": "Dockerfile" - }, - "customizations": { - "vscode": { - "extensions": [ - "oven.bun-vscode", - "biomejs.biome", - "astro-build.astro-vscode" - ] - } - }, - "forwardPorts": [ - 8080 - ] -} \ No newline at end of file + "workspaceFolder": "/workspace", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind,Z", + "runArgs": ["--network=dev-network"], + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + "vscode": { + "extensions": ["astro-build.astro-vscode", "oxc.oxc-vscode", "esbenp.prettier-vscode"] + } + } +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..3c367a6 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,14 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["unicorn", "typescript", "oxc"], + "categories": { + "correctness": "error", + "perf": "error", + "suspicious": "off", + "style": "off", + "nursery": "off", + "pedantic": "off", + "restriction": "off" + }, + "ignorePatterns": ["node_modules/", ".astro/", "dist/"] +} diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..30a4169 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "plugins": ["@prettier/plugin-oxc"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 3c25522..08833f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,9 @@ { - "editor.tabSize": 2, - "editor.formatOnSave": true, - "editor.defaultFormatter": "biomejs.biome", - "[astro]": { - "editor.defaultFormatter": "astro-build.astro-vscode" - }, - "[css]": { - "editor.defaultFormatter": "biomejs.biome" - } + "editor.tabSize": 2, + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[astro]": { + "editor.defaultFormatter": "astro-build.astro-vscode" + }, + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/README.md b/README.md index bfd37d2..1150fdc 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Une plateforme de streaming moderne pour films et séries, construite avec **Ast ## ✨ Fonctionnalités - 🎨 **Design System complet** avec thème sombre et couleurs violet pastel -- 📱 **Responsive** avec système de grille flexbox (Bootstrap-like) +- 📱 **Responsive** avec système de grille flexbox (Bootstrap-like) - 🧩 **Composants UI auto-contenus** avec styles scoped - ⚡ **Performance optimisée** avec styles scoped par composant - 🎭 **Composants spécialisés** pour le streaming (MovieCard, SearchBar) @@ -43,6 +43,7 @@ Une plateforme de streaming moderne pour films et séries, construite avec **Ast ## 🎨 Design System ### Couleurs + - **Couleur principale** : Violet pastel (`--primary-*`) - **Thème sombre** avec nuances de gris - **Couleurs sémantiques** : success, warning, error, info @@ -50,6 +51,7 @@ Une plateforme de streaming moderne pour films et séries, construite avec **Ast ### Composants disponibles #### Composants de base + - **Button** - Boutons avec variantes (primary, secondary, outline, ghost) - **Badge** - Badges colorés - **Alert** - Alertes contextuelles @@ -57,36 +59,44 @@ Une plateforme de streaming moderne pour films et séries, construite avec **Ast - **Progress** - Barres de progression #### Composants de formulaire + - **Input** - Champs de saisie - **Textarea** - Zones de texte - **Select** - Listes déroulantes - **FormGroup/FormLabel/FormError** - Éléments de formulaire #### Composants de mise en page + - **Container** - Conteneur responsive - **Row/Col** - Système de grille avec breakpoints (xs, sm, md, lg, xl, xxl) - **Card** - Cartes avec header/body/footer #### Composants de navigation + - **Navbar** - Barre de navigation - **Modal** - Modales avec backdrop - **Dropdown** - Menus déroulants #### Composants spécialisés streaming + - **MovieCard** - Cartes pour films/séries avec poster, titre, rating - **SearchBar** - Barre de recherche avec icône ## 🏗️ Architecture des Composants ### Composition et réutilisation + Les composants sont conçus pour être composés ensemble : + - **SearchBar** utilise le composant **Input** avec des styles personnalisés - **MovieCard** compose avec le composant **Card** de base - **ModalHeader** utilise le composant **Button** pour la fermeture - Classes `.form-control-base` partagées entre Input, Select et Textarea ### Styles scoped + Chaque composant contient ses propres styles avec ` diff --git a/src/components/forms/LoginForm.astro b/src/components/forms/LoginForm.astro new file mode 100644 index 0000000..8c56f65 --- /dev/null +++ b/src/components/forms/LoginForm.astro @@ -0,0 +1,43 @@ +--- +export interface Props { + action: string | null | undefined; + error: ActionInputError<{ username: string; password: string }> | null; +} + +import type { ActionInputError } from "astro:actions"; +import Button from "../ui/Button.astro"; +import FormGroup from "../ui/FormGroup.astro"; +import FormLabel from "../ui/FormLabel.astro"; +import Input from "../ui/Input.astro"; +import FormError from "../ui/FormError.astro"; + +const { action, error } = Astro.props; +--- + +
diff --git a/src/components/ui/Container.astro b/src/components/ui/Container.astro index 5d0d85b..a0ee457 100644 --- a/src/components/ui/Container.astro +++ b/src/components/ui/Container.astro @@ -2,14 +2,20 @@ export interface Props { fluid?: boolean; class?: string; + style?: string; } -const { fluid = false, class: className = "", ...rest } = Astro.props; +const { + fluid = false, + class: className = "", + style = "", + ...rest +} = Astro.props; const baseClasses = fluid ? "container-fluid" : "container"; const classes = [baseClasses, className].filter(Boolean).join(" "); --- -