diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 82dddb0..9c31713 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,31 +1,78 @@ -name: Build -run-name: CI/CD website +name: Build and Test +run-name: Website build validation + on: - #push: - # branches: - # - main - # - dev + push: + branches: [main, dev] pull_request: - types: [opened, synchronize, reopened] - branches: - - main - - dev + branches: [main, dev] jobs: - build-check: + build-classic: runs-on: ubuntu-latest + name: Classic Build steps: - - name: Check out repository code - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 with: - node-version: '24.x' - - name: Install dependencies + node-version: '20' + + - uses: pnpm/action-setup@v4 + with: + version: 8 + + - name: Install and build run: | cd banquise-website - npm ci - - name: Building + pnpm install --frozen-lockfile + pnpm build + + - name: Lint check run: | cd banquise-website - npm run build + pnpm lint + + build-docker: + runs-on: ubuntu-latest + name: Docker Build + needs: build-classic + steps: + - uses: actions/checkout@v4 + + - uses: docker/setup-buildx-action@v3 + + - name: Create Dockerfile if missing + run: | + cd banquise-website + if [ ! -f "Dockerfile" ]; then + cat > Dockerfile << 'EOF' + FROM node:20-alpine AS builder + RUN npm install -g pnpm + WORKDIR /app + COPY package.json pnpm-lock.yaml ./ + RUN pnpm install --frozen-lockfile + COPY . . + RUN pnpm build + + FROM node:20-alpine AS runner + RUN npm install -g pnpm + WORKDIR /app + COPY package.json pnpm-lock.yaml ./ + RUN pnpm install --frozen-lockfile --prod + COPY --from=builder /app/.next ./.next + COPY --from=builder /app/public ./public + EXPOSE 3000 + CMD ["pnpm", "start"] + EOF + fi + + - name: Build and test Docker image + run: | + cd banquise-website + docker build -t banquise-website:test . + docker run -d --name test-container -p 3000:3000 banquise-website:test + sleep 5 + docker ps | grep test-container + docker stop test-container + docker rm test-container diff --git a/banquise-website/.dockerignore b/banquise-website/.dockerignore deleted file mode 100644 index 16e0e5a..0000000 --- a/banquise-website/.dockerignore +++ /dev/null @@ -1,18 +0,0 @@ -node_modules -.next -dist -build -pnpm-debug.log -.env -.env.local -.env.development -.git -*.log -.DS_Store -.vscode -.idea -README.md -.gitignore -.eslintrc.json -*.sh -shell.nix diff --git a/banquise-website/.eslintrc.json b/banquise-website/.eslintrc.json deleted file mode 100644 index 957cd15..0000000 --- a/banquise-website/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["next/core-web-vitals"] -} diff --git a/banquise-website/.gitignore b/banquise-website/.gitignore index a547bf3..047da3c 100644 --- a/banquise-website/.gitignore +++ b/banquise-website/.gitignore @@ -1,3 +1,159 @@ +# Dependencies +node_modules/ +.pnp +.pnp.js + +# Testing +coverage/ +.nyc_output + +# Next.js +.next/ +out/ +build/ +dist/ + +# Production builds +*.tgz +*.tar.gz + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons +build/Release + +# Dependency directories +jspm_packages/ + +# Snowpack dependency directory +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +public + +# Vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# IntelliJ based IDEs +.idea + +# Finder (MacOS) +.DS_Store + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# VS Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +# ESLint cache +.eslintcache + +# Prettier cache +.prettiercache + +# Stylelint cache +.stylelintcache + # Logs logs *.log @@ -7,18 +163,79 @@ yarn-error.log* pnpm-debug.log* lerna-debug.log* -node_modules -dist -dist-ssr -*.local +# Diagnostic reports +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json -# Editor directories and files -.vscode/* -!.vscode/extensions.json -.idea +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# next.js build output +.next + +# nuxt.js build output +.nuxt + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Temporary folders +tmp/ +temp/ + +# Editor backup files +*~ +*.swp +*.swo + +# OS generated files .DS_Store -*.suo -*.ntvs* -*.njsproj -*.sln -*.sw? +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Local environment files +.env*.local diff --git a/banquise-website/app/globals-test.css b/banquise-website/app/globals-test.css deleted file mode 100644 index 5cc7b2e..0000000 --- a/banquise-website/app/globals-test.css +++ /dev/null @@ -1,9 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -/* Minimal test CSS */ -body { - margin: 0; - padding: 0; -} \ No newline at end of file diff --git a/banquise-website/app/globals.css b/banquise-website/app/globals.css index 5b69cd9..851c876 100644 --- a/banquise-website/app/globals.css +++ b/banquise-website/app/globals.css @@ -1,13 +1,14 @@ @import "tailwindcss"; -/* Configuration Tailwind v4 via CSS custom properties */ +/* Configuration Tailwind v4 via CSS custom properties - Variables globales */ @layer base { :root { + /* Polices */ --font-heading: 'Dela Gothic One', sans-serif; --font-body: 'Roboto', sans-serif; /* Couleurs personnalisées La Banquise */ - --color-banquise-blue: 64, 180, 255; /* RGB for reuse in rgba() */ + --color-banquise-blue: 64, 180, 255; --color-banquise-blue-hex: #40B4FF; --color-banquise-blue-dark: 31, 93, 137; --color-banquise-blue-dark-hex: #1F5D89; @@ -16,27 +17,17 @@ --color-banquise-blue-lightest: 165, 240, 255; --color-banquise-blue-lightest-hex: #A5F0FF; --color-banquise-gray: #F6F6F6; + + /* Transitions communes */ + --transition-default: all 0.3s ease-in-out; + --transition-fast: all 0.2s ease-in-out; + + /* Spacing commun */ + --spacing-navbar: 4rem; } } -/* Variables CSS pour les polices et couleurs personnalisées */ -:root { - --font-heading: 'Dela Gothic One', sans-serif; - --font-body: 'Roboto', sans-serif; - - /* Couleurs personnalisées La Banquise */ - --color-banquise-blue: 64, 180, 255; /* RGB for reuse in rgba() */ - --color-banquise-blue-hex: #40B4FF; - --color-banquise-blue-dark: 31, 93, 137; - --color-banquise-blue-dark-hex: #1F5D89; - --color-banquise-blue-light: 105, 183, 226; - --color-banquise-blue-light-hex: #69B7E2; - --color-banquise-blue-lightest: 165, 240, 255; - --color-banquise-blue-lightest-hex: #A5F0FF; - --color-banquise-gray: #F6F6F6; -} - -/* Minimal, valid utility helpers that rely on CSS variables and rgba() */ +/* Minimal, valid utility helpers avec variables optimisées */ @layer utilities { /* Text colors */ .text-banquise-blue { color: var(--color-banquise-blue-hex); } @@ -52,7 +43,7 @@ .bg-banquise-blue-lightest { background-color: var(--color-banquise-blue-lightest-hex); } .bg-banquise-gray { background-color: var(--color-banquise-gray); } - /* Opacity helpers using rgba() and the stored RGB variables */ + /* Opacity helpers using rgba() */ .bg-banquise-blue-5 { background-color: rgba(var(--color-banquise-blue), 0.05); } .bg-banquise-blue-10 { background-color: rgba(var(--color-banquise-blue), 0.10); } .bg-banquise-blue-20 { background-color: rgba(var(--color-banquise-blue), 0.20); } @@ -62,28 +53,35 @@ .border-banquise-blue { border-color: var(--color-banquise-blue-hex); } .border-banquise-blue-lightest-30 { border-color: rgba(var(--color-banquise-blue-lightest), 0.3); } - /* Gradients shortcuts (use with existing Tailwind gradient utilities) */ + /* Gradients shortcuts */ .from-banquise-blue { --tw-gradient-from: var(--color-banquise-blue-hex); } .from-banquise-blue-dark { --tw-gradient-from: var(--color-banquise-blue-dark-hex); } .via-banquise-blue { --tw-gradient-via: var(--color-banquise-blue-hex); } .to-banquise-blue { --tw-gradient-to: var(--color-banquise-blue-hex); } - /* Simple shadow helpers */ + /* Shadow helpers */ .shadow-banquise-blue-20 { box-shadow: 0 4px 6px -1px rgba(var(--color-banquise-blue), 0.20); } + + /* Transitions communes */ + .transition-default { transition: var(--transition-default); } + .transition-fast { transition: var(--transition-fast); } } -/* Animations kept as valid keyframes */ +/* Animations optimisées */ @keyframes gentle-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-15px) rotate(1deg); } } -.animate-gentle-float { animation: gentle-float 6s ease-in-out infinite; } +@keyframes bounce-up { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-4px); } +} -@keyframes bounce-up { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } } +.animate-gentle-float { animation: gentle-float 6s ease-in-out infinite; } .scroll-to-top:hover { animation: bounce-up 0.6s ease-in-out; } -/* Accessibility: respect reduced motion */ +/* Configuration globale optimisée */ @media (prefers-reduced-motion: reduce) { .animate-gentle-float, .animate-ping, @@ -92,13 +90,29 @@ } } -/* Global improvements */ html { scroll-behavior: smooth; } body { overflow-x: hidden; } -/* Scrollbar styles for popup content */ -.popup-content { scrollbar-width: thin; scrollbar-color: rgba(31,93,137,0.3) transparent; } +/* Scrollbar unifié pour tous les éléments */ +.custom-scrollbar, +.popup-content { + scrollbar-width: thin; + scrollbar-color: rgba(31,93,137,0.3) transparent; +} + +.custom-scrollbar::-webkit-scrollbar, .popup-content::-webkit-scrollbar { width: 6px; } + +.custom-scrollbar::-webkit-scrollbar-track, .popup-content::-webkit-scrollbar-track { background: transparent; } -.popup-content::-webkit-scrollbar-thumb { background: rgba(31,93,137,0.3); border-radius: 3px; } -.popup-content::-webkit-scrollbar-thumb:hover { background: rgba(31,93,137,0.5); } + +.custom-scrollbar::-webkit-scrollbar-thumb, +.popup-content::-webkit-scrollbar-thumb { + background: rgba(31,93,137,0.3); + border-radius: 3px; +} + +.custom-scrollbar::-webkit-scrollbar-thumb:hover, +.popup-content::-webkit-scrollbar-thumb:hover { + background: rgba(31,93,137,0.5); +} diff --git a/banquise-website/app/test-colors/page.tsx b/banquise-website/app/test-colors/page.tsx deleted file mode 100644 index 7419b1d..0000000 --- a/banquise-website/app/test-colors/page.tsx +++ /dev/null @@ -1,135 +0,0 @@ -import Link from 'next/link'; - -export default function TestColors() { - return ( -
Design professionnel et harmonieux
-Description avec contraste optimal pour la lisibilité.
- -Design épuré avec couleurs harmonieuses.
- -