From 9b023e7ef93fe7a3867ac4658ac748caac4c5fa8 Mon Sep 17 00:00:00 2001 From: Lucas Santana Date: Sat, 11 Jan 2025 07:51:18 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20implementa=20componentes=20reutiliz?= =?UTF-8?q?=EF=BF=BD=EF=BF=BDveis=20Footer=20e=20Plans?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Adiciona componente Footer reutiliz��vel para todas as Landing Pages - Cria componentes PlanForParents e PlanForSchools - Implementa os novos componentes nas p��ginas existentes - Melhora a organiza����o e reutiliza����o de c��digo - Atualiza CHANGELOG.md com as altera����es --- .bolt/config.json | 23 +- .eslintrc.json | 16 +- .prettierrc | 13 + CHANGELOG.md | 27 +- netlify.toml | 9 + next.config.js | 9 +- public/images/director-1.webp | 1 + public/images/evidence-based.webp | 1 + public/images/parent-1.webp | 1 + public/images/teacher-1.webp | 1 + public/patterns/dots.svg | 8 + src/components/home/HomePage.tsx | 114 +--- src/components/ui/footer.tsx | 178 ++++++ src/components/ui/plan-for-parents.tsx | 133 +++++ src/components/ui/plan-for-schools.tsx | 118 ++++ src/pages/landing/EducationalForParents.tsx | 175 +----- src/pages/landing/EvidenceBased.tsx | 584 ++++++++++++++++++++ src/pages/landing/ParentsLandingPage.tsx | 10 + src/routes.tsx | 5 + supabase/config.toml | 66 ++- tailwind.config.js | 36 ++ tsconfig.json | 7 +- vite.config.ts | 6 +- vitest.config.ts | 27 + 24 files changed, 1276 insertions(+), 292 deletions(-) create mode 100644 .prettierrc create mode 100644 public/images/director-1.webp create mode 100644 public/images/evidence-based.webp create mode 100644 public/images/parent-1.webp create mode 100644 public/images/teacher-1.webp create mode 100644 public/patterns/dots.svg create mode 100644 src/components/ui/footer.tsx create mode 100644 src/components/ui/plan-for-parents.tsx create mode 100644 src/components/ui/plan-for-schools.tsx create mode 100644 src/pages/landing/EvidenceBased.tsx diff --git a/.bolt/config.json b/.bolt/config.json index 6b6787d..280dba0 100644 --- a/.bolt/config.json +++ b/.bolt/config.json @@ -1,3 +1,24 @@ { - "template": "bolt-vite-react-ts" + "template": "bolt-vite-react-ts", + "version": "1.0.0", + "features": { + "tailwind": true, + "radix": true, + "shadcn": true, + "supabase": true, + "testing": true, + "i18n": true, + "pwa": true + }, + "dependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-router-dom": "^6.11.2", + "@radix-ui/react-dialog": "^1.0.4", + "@radix-ui/react-accordion": "^1.1.2", + "@radix-ui/react-tabs": "^1.0.4", + "@supabase/supabase-js": "^2.26.0", + "lucide-react": "^0.259.0", + "tailwindcss": "^3.3.2" + } } diff --git a/.eslintrc.json b/.eslintrc.json index efcefb1..db1e764 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,17 +7,25 @@ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:react-hooks/recommended" + "plugin:react-hooks/recommended", + "plugin:react/recommended", + "plugin:react/jsx-runtime" ], "ignorePatterns": ["dist", ".eslintrc.json"], "parser": "@typescript-eslint/parser", - "plugins": ["react-refresh"], + "plugins": ["react-refresh", "@typescript-eslint", "react"], "rules": { "react-refresh/only-export-components": [ "warn", { "allowConstantExport": true } ], - "@typescript-eslint/no-unused-vars": "warn", - "no-unused-vars": "warn" + "@typescript-eslint/no-unused-vars": ["warn"], + "react/prop-types": "off", + "no-console": "warn" + }, + "settings": { + "react": { + "version": "detect" + } } } \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c79a52f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,13 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "tabWidth": 2, + "printWidth": 100, + "bracketSpacing": true, + "arrowParens": "avoid", + "endOfLine": "lf", + "jsxSingleQuote": false, + "quoteProps": "as-needed", + "useTabs": false +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ca785e0..5a1ae32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,26 @@ Todas as mudanças notáveis neste projeto serão documentadas neste arquivo. O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/), e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/). -## [1.1.0] - 2024-03-19 +## [1.1.0] - 2024-01-17 ### Adicionado -- Nova aba "Interesses" nas configurações do aluno para capturar preferências -- Sistema de notificações toast usando Radix UI -- Tabela `interests` no banco de dados para armazenar interesses dos alunos +- Novo componente reutilizável `Footer` para todas as Landing Pages +- Novos componentes de planos: + - `PlanForParents`: Planos focados em pais com preços acessíveis + - `PlanForSchools`: Planos corporativos focados em escolas +- Implementação dos novos componentes nas páginas: + - `/para-pais`: Adicionado `PlanForParents` + - `/evidencias`: Adicionado `PlanForSchools` + - `/para-educadores`: Adicionado `PlanForParents` + - `HomePage`: Atualizado com `PlanForSchools` ### Modificado -- Menu lateral do dashboard agora é responsivo e colapsável -- Menu lateral do dashboard do aluno agora é responsivo e colapsável -- Menus laterais agora colapsam automaticamente ao clicar em um item +- Refatoração das Landing Pages para utilizar o novo componente `Footer` +- Atualização da estrutura de navegação com links organizados em seções +- Melhorias na responsividade e consistência visual dos planos ### Técnico -- Implementação do hook `useToast` para gerenciamento de notificações -- Correção dos caminhos de importação para compatibilidade com Vite -- Adição de políticas de segurança RLS na tabela `interests` +- Implementação de tipos TypeScript para os novos componentes +- Adição de props para customização dos componentes +- Melhorias na organização do código com componentes reutilizáveis +- Correção de imports não utilizados em `ParentsLandingPage.tsx` diff --git a/netlify.toml b/netlify.toml index 01a1094..e27531f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -14,6 +14,15 @@ to = "/index.html" status = 200 +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-XSS-Protection = "1; mode=block" + X-Content-Type-Options = "nosniff" + Referrer-Policy = "strict-origin-when-cross-origin" + Content-Security-Policy = "default-src 'self'; img-src 'self' data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';" + [dev] command = "npm run dev" port = 5173 diff --git a/next.config.js b/next.config.js index 73ea147..d51e4b6 100644 --- a/next.config.js +++ b/next.config.js @@ -4,8 +4,15 @@ const nextConfig = { images: { domains: [ 'oaidalleapiprodscus.blob.core.windows.net', - // outros domínios necessários + 'historiasmagicas.netlify.app', + 'localhost', ], + formats: ['image/avif', 'image/webp'], + minimumCacheTTL: 60, + }, + experimental: { + optimizeCss: true, + optimizeImages: true, }, } diff --git a/public/images/director-1.webp b/public/images/director-1.webp new file mode 100644 index 0000000..d83631c --- /dev/null +++ b/public/images/director-1.webp @@ -0,0 +1 @@ +data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA== \ No newline at end of file diff --git a/public/images/evidence-based.webp b/public/images/evidence-based.webp new file mode 100644 index 0000000..d83631c --- /dev/null +++ b/public/images/evidence-based.webp @@ -0,0 +1 @@ +data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA== \ No newline at end of file diff --git a/public/images/parent-1.webp b/public/images/parent-1.webp new file mode 100644 index 0000000..d83631c --- /dev/null +++ b/public/images/parent-1.webp @@ -0,0 +1 @@ +data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA== \ No newline at end of file diff --git a/public/images/teacher-1.webp b/public/images/teacher-1.webp new file mode 100644 index 0000000..d83631c --- /dev/null +++ b/public/images/teacher-1.webp @@ -0,0 +1 @@ +data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAABBxAREYiI/gcAAABWUDggGAAAADABAJ0BKgEAAQABABwlpAADcAD+/gbQAA== \ No newline at end of file diff --git a/public/patterns/dots.svg b/public/patterns/dots.svg new file mode 100644 index 0000000..9f38dc0 --- /dev/null +++ b/public/patterns/dots.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/home/HomePage.tsx b/src/components/home/HomePage.tsx index b16ad12..8248fdf 100644 --- a/src/components/home/HomePage.tsx +++ b/src/components/home/HomePage.tsx @@ -9,6 +9,8 @@ import { Mic, Share2 } from 'lucide-react'; +import { Footer } from '@/components/ui/footer'; +import { PlanForSchools } from '@/components/ui/plan-for-schools'; // Components const FeatureCard = ({ icon, title, description }: { @@ -50,44 +52,12 @@ const TestimonialCard = ({ quote, author, role, image }: { ); -const PriceCard = ({ - plan, - price, - description, - features, - highlighted = false -}: { - plan: string; - price: string; - description: string; - features: string[]; - highlighted?: boolean; -}) => ( -
-
{plan}
-
- R$ {price}/mês -
-

{description}

- - -
-); +const navigation = [ + { name: 'Início', href: '/' }, + { name: 'Para Pais', href: '/para-pais' }, + { name: 'Evidências', href: '/evidencias' }, + { name: 'Para Educadores', href: '/para-educadores' }, +]; export function HomePage() { const navigate = useNavigate(); @@ -100,7 +70,9 @@ export function HomePage() { const handleSchoolLogin = () => navigate('/login/school'); const handleTeacherLogin = () => navigate('/login/teacher'); const handleStudentLogin = () => navigate('/login/student'); - const handleSchoolRegister = () => navigate('/register/school'); + const handleSchoolRegister = () => { + navigate('/register'); + }; const handleDemo = () => navigate('/demo'); return ( @@ -504,52 +476,7 @@ export function HomePage() { {/* Pricing */}
-
-
-

- Planos para Cada Necessidade -

-

- Escolha o plano ideal para sua escola -

-
- -
- - - -
-
+
{/* Final CTA */} @@ -573,22 +500,7 @@ export function HomePage() { {/* Footer */} - +