From b1c8e70ab9183ca2ae8038b5c08bd5280bbed595 Mon Sep 17 00:00:00 2001 From: Gabriel372 Date: Fri, 26 Apr 2024 14:12:14 -0300 Subject: [PATCH] update --- src/components/AboutMe.tsx | 1 - src/components/CatalogProject.tsx | 27 ++++++----- src/components/MyProjects.tsx | 8 --- src/components/MyTechs.tsx | 23 ++++----- src/components/MyTechsForMobile.tsx | 67 +++++++++++--------------- src/components/RegistMemberProject.tsx | 29 ++++++----- src/pages/Footer.tsx | 7 ++- src/pages/Header.tsx | 6 +-- 8 files changed, 76 insertions(+), 92 deletions(-) diff --git a/src/components/AboutMe.tsx b/src/components/AboutMe.tsx index 415254f..d9d1a87 100644 --- a/src/components/AboutMe.tsx +++ b/src/components/AboutMe.tsx @@ -72,7 +72,6 @@ WhatsApp - ) } diff --git a/src/components/CatalogProject.tsx b/src/components/CatalogProject.tsx index eaafbfa..648939b 100644 --- a/src/components/CatalogProject.tsx +++ b/src/components/CatalogProject.tsx @@ -8,14 +8,19 @@ import { SiFirebase } from "react-icons/si"; import Link from 'next/link'; import { TbWorldWww } from "react-icons/tb"; import { FaGithub } from "react-icons/fa"; -import { TstateModalProject } from '@/types/Types'; +import { TstateModalProject,TstateTheme } from '@/types/Types'; +import { useContext } from 'react'; +import { MyContext } from '@/context/MyContext'; function catalogProject({Modal,setModal}:TstateModalProject) { -const StyleForTechs = 'bg-gray-200 pb-1 px-1 rounded-lg flex flex-row max-w-26 items-center' - +const StyleForTechs = ' pb-1 px-1 rounded-lg flex flex-row max-w-26 items-center' +const {ThemeIsDark} = useContext(MyContext) as TstateTheme ; +const ThemeForComponent = ThemeIsDark ? 'text-white bg-gray-800 duration-500 border-gray-700' +:'duration-500 bg-white from-gray-600 to-white bg-slate-100 border-gray-100 ' ; +const TheForTech = ThemeIsDark ? 'bg-slate-900': +'bg-gray-200' ; - -return (
  • +return (
  • @@ -43,20 +48,20 @@ que são exibidos na página inicial. Eles também podem adicionar um título pa
    Tecnologias utilizadas: - React Js - Typescript - Tailwind - Firebase + React Js + Typescript + Tailwind + Firebase
    +className=' bg-black text-white rounded-lg px-2 flex flex-row items-center max-w-36 py-2 justify-center w-full hover:bg-gray-700 border border-gray-700'> Ver site +className=' bg-black text-white rounded-lg px-2 flex flex-row items-center py-2 justify-center w-full hover:bg-gray-700 max-h-11 border border-gray-700 max-w-40'> Ver repositório
    diff --git a/src/components/MyProjects.tsx b/src/components/MyProjects.tsx index 43ef517..1557bc1 100644 --- a/src/components/MyProjects.tsx +++ b/src/components/MyProjects.tsx @@ -19,14 +19,6 @@ return (
    - {/* */} - -{/*
    -
    - - aaaaaaa
    */} - -
    ) diff --git a/src/components/MyTechs.tsx b/src/components/MyTechs.tsx index d1285ce..75ba76d 100644 --- a/src/components/MyTechs.tsx +++ b/src/components/MyTechs.tsx @@ -16,24 +16,21 @@ import { TstateTheme } from '@/types/Types' function MyTechs() { const {ThemeIsDark} = useContext(MyContext) as TstateTheme ; -const StyleForLi = 'cursor-pointer flex flex-col rounded-t-xl px-2 pb-1 shadow-2xl border ml-3 ' const [TechClicked,setTechClicked] = useState('react') ; + +const StyleForLi = 'cursor-pointer flex flex-col rounded-t-xl px-2 pb-1 shadow-2xl border ml-3 ' const ThemeForComponent = ThemeIsDark ? 'text-white bg-gray-800 duration-500 bg-gray-500 border-x-gray-500 border-b-gray-700' :'duration-500 bg-white from-gray-600 to-white bg-gray-200 border-x-gray-300 border-t-gray-300 border-b-gray-300' -//

    - -const StyleLigth = TechClicked === 'react' ? 'bg-white border-b-0 ' : 'bg-gray-200 border-b-gray-300' -const StyleDark = TechClicked === 'react' ? 'bg-white border-b-0 ' : 'bg-gray-200 border-b-gray-300' +function CatchTechGiveStyle (tech:string ){ + if (ThemeIsDark) { + return (tech === TechClicked ? 'bg-gray-800 border-b-0 ' : 'bg-gray-900 border-gray-500 border-b-gray-500' ) + } + else { + return (tech === TechClicked ? 'bg-white border-b-0 ' : 'bg-gray-200 border-b-gray-300' ) + } + } -function CatchTechGiveStyle(tech:string) { -if (ThemeIsDark) { -return (tech === TechClicked ? 'bg-gray-800 border-b-0 ' : 'bg-gray-900 border-gray-500' ) -} -else { -return (tech === TechClicked ? 'bg-white border-b-0 ' : 'bg-gray-200 border-b-gray-300' ) -} -} function ReturnText() { return (TechClicked === 'react' && ReactText) || diff --git a/src/components/MyTechsForMobile.tsx b/src/components/MyTechsForMobile.tsx index afaa713..0671a39 100644 --- a/src/components/MyTechsForMobile.tsx +++ b/src/components/MyTechsForMobile.tsx @@ -1,5 +1,4 @@ -import { useState } from "react" -import { Ttech } from "@/types/Types" +import { useState,useContext } from "react" import Image from 'next/image' import ReactImg from '../images/react3d.webp' import TypescriptImg from '../images/ts3d.webp' @@ -12,30 +11,18 @@ import Htmlimg from '../images/html3d.png' import GitImg from '../images/git3d.webp' import FirebaseImg from '../images/firebaseLogo.png' import { ReactText,TypescriptText,NextText,TailwindText,CssText,HtmlText,GitText,GithubText,FirebaseText,BoostrapText,JavascriptText } from './Content' +import { MyContext } from "@/context/MyContext" +import { TstateTheme } from "@/types/Types" function MyTechsForMobile() { const StyleForLi = `cursor-pointer flex flex-col rounded-xl px-2 pb-1 shadow-2xl border w-screen550:text-sm w-screen450:text-[11px] w-screen550:px-1 w-screen550:rounded-md justify-center items-center` const StyleForImg = 'max-w-14 w-screen500:max-w-10' const [TechClicked,setTechClicked] = useState('react') +const {ThemeIsDark} = useContext(MyContext) as TstateTheme ; +const ThemeForComponent = ThemeIsDark ? 'text-white bg-gray-800 duration-500 border-gray-700' +:'duration-500 bg-white from-gray-600 to-white bg-gray-200 border-x-gray-300 border-t-gray-300 border-b-gray-300' ; -// const [TechClicked,setTechClicked] = useState({group1:'react',group2:'javascript'}) - -// function ReturnTextForGroup1() { -// return (TechClicked.group1 === 'react' && ReactText) || -// (TechClicked.group1 === 'typescript' && TypescriptText) || -// (TechClicked.group1 === 'next' && NextText) || -// (TechClicked.group1 === 'tailwind' && TailwindText) || -// (TechClicked.group1 === 'bootstrap' && BoostrapText) -// } - -// function ReturnTextForGroup2() { -// return (TechClicked.group2 === 'javascript' && JavascriptText) || -// (TechClicked.group2 === 'css' && CssText) || -// (TechClicked.group2 === 'html' && HtmlText) || -// (TechClicked.group2 === 'git' && GitText) || -// (TechClicked.group2 === 'firebase' && FirebaseText) -// } function ReturnText() { return (TechClicked === 'react' && ReactText) || (TechClicked === 'typescript' && TypescriptText) || @@ -47,8 +34,15 @@ function ReturnText() { (TechClicked === 'html' && HtmlText) || (TechClicked === 'git' && GitText) || (TechClicked === 'firebase' && FirebaseText) +} +function CatchTechGiveStyle (tech:string ){ + if (ThemeIsDark) { + return (tech === TechClicked ? 'bg-gray-700' : 'bg-gray-900 border-gray-500' ) + } + else { + return (tech === TechClicked ? 'bg-white border-b-0 ' : 'bg-gray-200 border-b-gray-300' ) + } } - return (

    @@ -56,53 +50,53 @@ return (
    -
      +
        -
      • setTechClicked('react') }>React js image
      • -
      • setTechClicked('typescript') }>Typescript image
      • -
      • setTechClicked('next') }>Next js image
      • -
      • setTechClicked('tailwind') }>Tailwind image
      • -
      • setTechClicked('bootstrap') }>Bootstrap image
      • -
      • setTechClicked('javascript') }>Javascript image
      • -
      • setTechClicked('css') }>Css 3 image
      • -
      • setTechClicked('html') }>Html 5 image
      • -
      • setTechClicked('git') }>Git/Github image
      • -
      • setTechClicked('firebase') }>Firebase image
      -

      +

      {`${ReturnText()}`} {TechClicked === 'git' &&

      {GithubText}

      } @@ -110,15 +104,8 @@ onClick={()=> setTechClicked('firebase') }>Firebase
        - -
      - - {/*

      - {`${ReturnTextForGroup2()}`} -{TechClicked.group2 === 'git' &&

      {GithubText}

      } -

      */} - +
    diff --git a/src/components/RegistMemberProject.tsx b/src/components/RegistMemberProject.tsx index 726718f..ea01be2 100644 --- a/src/components/RegistMemberProject.tsx +++ b/src/components/RegistMemberProject.tsx @@ -9,16 +9,19 @@ import Link from 'next/link'; import { TbWorldWww } from "react-icons/tb"; import { FaGithub } from "react-icons/fa"; import { FaCss3Alt } from "react-icons/fa"; -import { TstateModalProject } from '@/types/Types'; - - +import { TstateModalProject,TstateTheme } from '@/types/Types'; +import { useContext } from 'react'; +import { MyContext } from '@/context/MyContext'; function RegistMemberProject({Modal,setModal}:TstateModalProject) { - const StyleForTechs = ' bg-gray-200 pb-1 px-1 rounded-lg flex flex-row max-w-26 items-center' - - + const StyleForTechs = ' pb-1 px-1 rounded-lg flex flex-row max-w-26 items-center' + const {ThemeIsDark} = useContext(MyContext) as TstateTheme ; + const ThemeForComponent = ThemeIsDark ? 'text-white bg-gray-800 duration-500 border-gray-700' + :'duration-500 bg-white from-gray-600 to-white bg-slate-100 border-gray-100 ' ; + const TheForTech = ThemeIsDark ? 'bg-slate-900': + 'bg-gray-200' ; -return (
  • + return (
  • @@ -45,20 +48,20 @@ return (
  • Tecnologias utilizadas: - React Js - Typescript - Css - Firebase + React Js + Typescript + Css + Firebase
    + className=' bg-black text-white rounded-lg px-2 flex flex-row items-center max-w-36 py-2 justify-center w-full hover:bg-gray-700 border border-gray-700'> Ver site + className=' bg-black text-white rounded-lg px-2 flex flex-row items-center py-2 justify-center w-full hover:bg-gray-700 max-h-11 border border-gray-700 max-w-40'> Ver repositório
    diff --git a/src/pages/Footer.tsx b/src/pages/Footer.tsx index 4bfdc4f..9bf1b3c 100644 --- a/src/pages/Footer.tsx +++ b/src/pages/Footer.tsx @@ -1,7 +1,12 @@ +import { useContext } from "react"; +import { MyContext } from "@/context/MyContext"; +import { TstateTheme } from "@/types/Types"; function Footer() { + const {ThemeIsDark} = useContext(MyContext) as TstateTheme ; + const ThemeForComponent = ThemeIsDark ? 'text-white bg-gray-800 duration-500':'duration-500 bg-gradient-to-t from-gray-600 to-white' -return (