From f2b5d182b7a66c9af43cc28f9217a2a82e5d949e Mon Sep 17 00:00:00 2001 From: davidquintr Date: Sun, 28 Apr 2024 21:02:21 -0600 Subject: [PATCH] removed all the references to the old page, just a simple redirect --- pages/_app.tsx | 5 +- pages/_document.tsx | 6 - pages/blog.tsx | 47 +------ pages/blog/[blog].tsx | 18 +-- pages/components/about_me.tsx | 26 ---- pages/components/alert_element.tsx | 13 -- pages/components/blog_item.tsx | 75 ------------ pages/components/config_provider.tsx | 98 --------------- pages/components/contact_form.tsx | 117 ------------------ pages/components/date.tsx | 28 ----- pages/components/footer.tsx | 24 ---- pages/components/home_page.tsx | 10 +- pages/components/page_wrapper.tsx | 17 --- pages/components/panel.tsx | 142 ---------------------- pages/components/person_init.tsx | 55 --------- pages/components/personal_info.tsx | 67 ---------- pages/components/personal_item.tsx | 28 ----- pages/components/project_item.tsx | 59 --------- pages/components/project_link_element.tsx | 62 ---------- pages/components/redirect.tsx | 7 +- pages/components/social_items.tsx | 23 ---- pages/components/social_share.tsx | 29 ----- pages/components/tags.tsx | 22 ---- pages/components/tech_item.tsx | 12 -- pages/components/tecnologies_items.tsx | 20 --- pages/components/tecnologies_specific.tsx | 21 ---- pages/contact.tsx | 13 +- pages/index.tsx | 2 - pages/nav_bar.tsx | 91 -------------- pages/projects.tsx | 38 +----- pages/scss/page.scss | 2 +- 31 files changed, 14 insertions(+), 1163 deletions(-) delete mode 100644 pages/components/about_me.tsx delete mode 100644 pages/components/alert_element.tsx delete mode 100644 pages/components/blog_item.tsx delete mode 100644 pages/components/config_provider.tsx delete mode 100644 pages/components/contact_form.tsx delete mode 100644 pages/components/date.tsx delete mode 100644 pages/components/footer.tsx delete mode 100644 pages/components/page_wrapper.tsx delete mode 100644 pages/components/panel.tsx delete mode 100644 pages/components/person_init.tsx delete mode 100644 pages/components/personal_info.tsx delete mode 100644 pages/components/personal_item.tsx delete mode 100644 pages/components/project_item.tsx delete mode 100644 pages/components/project_link_element.tsx delete mode 100644 pages/components/social_items.tsx delete mode 100644 pages/components/social_share.tsx delete mode 100644 pages/components/tags.tsx delete mode 100644 pages/components/tech_item.tsx delete mode 100644 pages/components/tecnologies_items.tsx delete mode 100644 pages/components/tecnologies_specific.tsx delete mode 100644 pages/nav_bar.tsx diff --git a/pages/_app.tsx b/pages/_app.tsx index 67a615c..31d85b6 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -5,15 +5,12 @@ import "./scss/panel.scss"; import './css/prism-theme.css' import './scss/darkmode.scss' -import ConfigProvider from './components/config_provider' import type { AppProps } from 'next/app' export default function App({ Component, pageProps }: AppProps) { return ( - - - + ) } diff --git a/pages/_document.tsx b/pages/_document.tsx index f983e97..116165a 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,6 +1,4 @@ import { Html, Head, Main, NextScript } from 'next/document' -import Footer from './components/footer' -import PersonInit from './components/person_init' export default function Document() { @@ -15,11 +13,7 @@ export default function Document() { -
- -
-
diff --git a/pages/blog.tsx b/pages/blog.tsx index 0815c34..b305882 100644 --- a/pages/blog.tsx +++ b/pages/blog.tsx @@ -1,50 +1,8 @@ -import NavBar from "./nav_bar"; import Head from "next/head"; -import BlogItem from "./components/blog_item"; -import { GetStaticProps } from "next"; -import { useEffect, useState } from "react"; -import Panel from "./components/panel"; -import dynamic from "next/dynamic"; -import { useConfigContext } from "./components/config_provider"; import Redirect from "./components/redirect"; -const blog = require("./assets/json/blog_published.json"); -const PageWrapper = dynamic(() => import("./components/page_wrapper")); - -export const getStaticProps: GetStaticProps = async () => { - return { - props: { - blog, - }, - }; -}; export default function Blog() { - const [articlesBlog, setArticlesBlog] = useState([]); - const [filters, setFilters] = useState([]) - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - const collectFilters = () =>{ - let collectedTags = [] - - blog.forEach((element, index)=>{ - collectedTags.push(...element.tags) - }) - - setFilters(collectedTags.filter((element, index)=> collectedTags.indexOf(element) === index)) - } - - useEffect(() => { - - let orderBlog = blog.sort((a, b) => - a.date.localeCompare(b.date, undefined, { sensitivity: "base" }) - ); - setArticlesBlog(orderBlog.reverse()); - collectFilters(); - }, []); - return ( <> @@ -62,12 +20,9 @@ export default function Blog() { -
- - - +
); diff --git a/pages/blog/[blog].tsx b/pages/blog/[blog].tsx index 27cb667..162f11b 100644 --- a/pages/blog/[blog].tsx +++ b/pages/blog/[blog].tsx @@ -1,18 +1,10 @@ import { useRouter } from "next/router"; -import PageWrapper from "../components/page_wrapper"; -import NavBar from "../nav_bar"; import Head from "next/head"; -import Image from "next/image"; -import DateParsed from "../components/date"; -import personal from "../assets/json/personal.json"; -import Tags from "../components/tags"; -import SocialShare from "../components/social_share"; import { GetStaticProps, GetStaticPaths } from "next"; import Prism from 'prismjs'; import fs from 'fs'; import path from 'path'; import { useEffect, useState } from "react"; -import { useConfigContext } from "../components/config_provider"; import Redirect from "../components/redirect"; const BlogPublished = require("../assets/json/blog_published.json"); @@ -63,9 +55,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => { }; const BlogArticle = ({ blogElement }) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" + let lightModeActive = "" const router = useRouter(); const { asPath } = useRouter(); @@ -91,8 +81,8 @@ const BlogArticle = ({ blogElement }) => { const deployUrl = "https://davidquintr.github.io"; const pathProj = "/portfolio/"; const URL = `${deployUrl}${pathProj}${asPath}`; - const title = language == "es" ? blogElement?.title.es : blogElement?.title.eng - const description = language == "es" ? blogElement?.description.es : blogElement?.description.eng + const title = blogElement?.title.eng + const description = blogElement?.description.eng return ( <> @@ -136,9 +126,7 @@ const BlogArticle = ({ blogElement }) => { >
- -
); diff --git a/pages/components/about_me.tsx b/pages/components/about_me.tsx deleted file mode 100644 index 7a84e9c..0000000 --- a/pages/components/about_me.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { motion, AnimatePresence } from "framer-motion"; -import basics from "../assets/json/basics.json"; -import { useConfigContext } from "./config_provider"; - -export default function AboutMe() { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - return ( - - -
-

{language == "es" ? "Acerca de mí" : "About me"}

-
-
-
-
-
-
- ); -} diff --git a/pages/components/alert_element.tsx b/pages/components/alert_element.tsx deleted file mode 100644 index c026060..0000000 --- a/pages/components/alert_element.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faCircleCheck, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; - -const AlertElement = ({ type, text }) => { - return ( -
- -

{text}

-
- ); -} - -export default AlertElement; \ No newline at end of file diff --git a/pages/components/blog_item.tsx b/pages/components/blog_item.tsx deleted file mode 100644 index a8e22b4..0000000 --- a/pages/components/blog_item.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import data from "../assets/json/blog_published.json"; -import { motion, AnimatePresence } from "framer-motion"; -import Image from "next/image"; -import personal from "../assets/json/personal.json"; -import Link from 'next/link' -import DateParsed from './date' -import Tags from "./tags"; -import { useConfigContext } from "./config_provider"; - - -const BlogItem = ({ element, index }) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - let info = { - url : language == "es" ? element?.url.es : element?.url.eng, - title: language == "es" ? element?.title.es : element?.title.eng, - description: language == "es" ? element?.description.es : element?.description.eng - } - - let translate = { - author : language == "es"? "Autor" : "Author" - } - - return ( - <> - - - - {info.title} -
-
- -
- -
-

{info.title}

-

{info.description}

-

- -

-
- -
- {personal?.name} -
-

{translate.author}

-

{personal?.name}

-
-
-
- -
-
- - ); -}; - -export default BlogItem; diff --git a/pages/components/config_provider.tsx b/pages/components/config_provider.tsx deleted file mode 100644 index a9d2e99..0000000 --- a/pages/components/config_provider.tsx +++ /dev/null @@ -1,98 +0,0 @@ -// LanguageContext.js -import React, { createContext, useState, useContext, useEffect } from 'react'; - - -const ConfigContext = createContext({}); - -const ConfigProvider = ({ children }) => { - const [language, setLanguage] = useState('en'); - const [darkMode, setDarkMode] = useState(false); - let isRecover = false - let isRecoverTheme = false - const LIGHT_MODE_TEXT = "lightMode" - - - useEffect(() => { - if(localStorage != null && localStorage.getItem('language') == null){ - let localLanguage = navigator.language.includes('es') ? "es" : "en" - localStorage.setItem('language',localLanguage) - setLanguage(localLanguage) - - } else if(localStorage != null) { - let safeLanguage = localStorage.getItem('language') - isRecover = true - setLanguage(safeLanguage) - } - }, []) - -/* - useEffect(() => { - if(darkMode){ - document.body.classList.add(LIGHT_MODE_TEXT) - document.querySelector(".section-person").classList.add(LIGHT_MODE_TEXT) - document.querySelector(".section-contain").classList.add(LIGHT_MODE_TEXT) - document.querySelector(".section-tech").classList.add(LIGHT_MODE_TEXT) - document.querySelector(".footer").classList.add(LIGHT_MODE_TEXT) - } else { - document.body.classList.remove(LIGHT_MODE_TEXT) - document.querySelector(".section-person").classList.remove(LIGHT_MODE_TEXT) - document.querySelector(".section-contain").classList.remove(LIGHT_MODE_TEXT) - document.querySelector(".section-tech").classList.remove(LIGHT_MODE_TEXT) - document.querySelector(".footer").classList.remove(LIGHT_MODE_TEXT) - } - - },[darkMode]) - - useEffect(() => { - if(localStorage != null && localStorage.getItem('theme') == null){ - let localTheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? false : true - localStorage.setItem('theme',localTheme.toString()) - setDarkMode(localTheme) - - } else if(localStorage != null) { - let safeTheme = JSON.parse(localStorage.getItem('theme')) - isRecoverTheme = true - setDarkMode(safeTheme) - } - }, []) - - useEffect(() => { - if(!isRecoverTheme){ - localStorage.setItem('theme', darkMode.toString()) - } - isRecover = false - },[darkMode]) - */ - - useEffect(() => { - if(!isRecover){ - localStorage.setItem('language',language) - } - - isRecover = false - },[language]) - - const contextValue = { - language, - setLanguage, - darkMode, - setDarkMode, - }; - - - return ( - - {children} - - ); -} - -export default ConfigProvider - -export function useConfigContext() { - const context = useContext(ConfigContext); - if (!context) { - throw new Error('useLanguage must be used within a LanguageProvider'); - } - return context; -} diff --git a/pages/components/contact_form.tsx b/pages/components/contact_form.tsx deleted file mode 100644 index 50b132e..0000000 --- a/pages/components/contact_form.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import emailjs from "@emailjs/browser"; -import React, { useContext, useRef, useState, useEffect, LegacyRef } from "react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faPaperPlane } from "@fortawesome/free-solid-svg-icons"; -import SocialItems from "./social_items"; -import { useConfigContext } from "./config_provider"; - -import AlertElement from "./alert_element"; - -const FormContact = () => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - const form: any = React.createRef(); - const [isEmailSent, setIsEmailSent] = useState(null); - const buttonSend: LegacyRef = React.createRef(); - - const alertComponent = isEmailSent ? ( - - ) : ( - - ); - - const sendEmail = (e: any) => { - e.preventDefault(); - - emailjs - .sendForm( - "service_zmht5zq", - "template_bq67pfa", - form.current, - "aqJFVCZrRMTDkeRGM" - ) - .then( - (result) => { - setIsEmailSent(true); - buttonSend.current.disabled = true; - }, - (error) => { - setIsEmailSent(false); - } - ); - setTimeout(() => {}, 7000); - }; - - return ( - <> -
-
-

{language == "es" ? "Contacto" : "Contact"}

-
-
-

- {language == "es" ? "Si estás buscando ayuda con un proyecto o necesitas asistencia, ¡Puedes contactarme!" : "If you are looking for help with a project or need assistance, you can contact me!"} -

-
-
-
- - -
-
- - - - {isEmailSent == true ? ( -

{language == "es" ? "Enviado" :"Sent"}

- ) : isEmailSent == false ? ( -

- {language == "es" ? "Algo salió mal, intente más tarde..." :"Something went wrong, try later..."} -

- ) : null} -
-
-
-

- {language == "es" ? "¿Quieres una comunicación más directa? Aquí hay otros medios para contactarme." : "Do you want more direct communication? There's another way to contact me."} -

-
- -
-
-
-
-
- - ); -}; -export default FormContact; diff --git a/pages/components/date.tsx b/pages/components/date.tsx deleted file mode 100644 index d74a0ce..0000000 --- a/pages/components/date.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { useConfigContext } from "./config_provider"; - -const DateParsed = ({dateOrigin}) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - const dateTarget = new Date(dateOrigin) - const months = [ - 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', - 'September', 'October', 'November', 'December' - ]; - const meses = [ - 'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', - 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre' - ]; - const month = months[dateTarget.getMonth()] - const formatedDate = `${month} ${dateTarget.getDate() + 1}, ${dateTarget.getFullYear()}` - return( - <> - { - language == "es" ? `${dateTarget.getDate() + 1} de ${meses[dateTarget.getMonth()]} de ${dateTarget.getFullYear()}` : `${months[dateTarget.getMonth()]} ${dateTarget.getDate() + 1}, ${dateTarget.getFullYear()}` - } - - ) - - -} - -export default DateParsed \ No newline at end of file diff --git a/pages/components/footer.tsx b/pages/components/footer.tsx deleted file mode 100644 index bc93013..0000000 --- a/pages/components/footer.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faGithub} from "@fortawesome/free-brands-svg-icons"; -import Link from "next/link"; -import { useConfigContext } from "./config_provider"; - -const Footer = () => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - - return( - <> -
-

{language == "es" ? "©2023 Diseñado y Programado por David Quintanilla" : "©2023 Designed and Programmed by David Quintanilla"}

-
- - -

View Source

- -
-
- - ) -} -export default Footer \ No newline at end of file diff --git a/pages/components/home_page.tsx b/pages/components/home_page.tsx index 54d02e4..d181a70 100644 --- a/pages/components/home_page.tsx +++ b/pages/components/home_page.tsx @@ -1,16 +1,8 @@ import Head from "next/head"; -import dynamic from "next/dynamic"; -import { useConfigContext } from "./config_provider"; import Redirect from "./redirect"; -const AboutMe = dynamic(() => import("./about_me")); -const PersonalInfo = dynamic(() => import("./personal_info")); - const HomePage = () => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - - let title = language == "es"? "Inicio" : "Home" + let title = "home" return ( <> diff --git a/pages/components/page_wrapper.tsx b/pages/components/page_wrapper.tsx deleted file mode 100644 index d17ecfc..0000000 --- a/pages/components/page_wrapper.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { motion, AnimatePresence } from "framer-motion"; - -const PageWrapper = ({ children }) => { - return(<> - - - {children} - - - ); -}; -export default PageWrapper \ No newline at end of file diff --git a/pages/components/panel.tsx b/pages/components/panel.tsx deleted file mode 100644 index bdc7839..0000000 --- a/pages/components/panel.tsx +++ /dev/null @@ -1,142 +0,0 @@ -import { useEffect, useRef, useState } from "react"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEye, faMagnifyingGlass } from "@fortawesome/free-solid-svg-icons"; -import { useConfigContext } from "./config_provider"; - -const Panel = ({isProject, pureArray, setElement, element, pureFilter}) => { - const [filters, setFilters] = useState([]); - const [btnFilters, setBtnFilter] = useState([]); - const panelRef = useRef(null); - const [panelPos, setPanelPos] = useState(0); - const panelScroll = useRef(null); - - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - function moveLeftPanel() { - panelScroll.current.scrollTo({ - left: panelScroll.current.scrollLeft - 150, - behavior: "smooth" - }); - } - - function moveRightPanel() { - panelScroll.current.scrollTo({ - left: panelScroll.current.scrollLeft + 150, - behavior: "smooth" - }); - } - - function handleReset() { - - if(btnFilters.length > 0){ - btnFilters.forEach((e) => { - e.classList.remove("marked"); - }) - } - - window.scrollTo(window.scrollX, panelPos) - setFilters([]); - setElement(pureArray); -} - - - function handleSearch(e) { - window.scrollTo(window.scrollX, panelPos) - let value = e.target.value.toLowerCase(); - let elementFiltered = isProject ? pureArray.filter( - (p) => - p.title.toLowerCase().includes(value) || - language == "es" ? p.details.es.toLowerCase().includes(value) : p.details.eng.toLowerCase().includes(value) - ) : pureArray.filter( - (p) => - language == "es" ? p.title.es.toLowerCase().includes(value) : p.title.eng.toLowerCase().includes(value) || - language == "es" ? p.description.es.toLowerCase().includes(value) : p.description.eng.toLowerCase().includes(value) - ); - - setElement(elementFiltered); -} - - - function handleFilter(element, e) { - const tempFilters = [...filters]; - const tempBtnFilters = [...btnFilters] - const exists = tempFilters.find((it) => it === element); - - window.scrollTo(window.scrollX, panelPos) - if (exists !== undefined) { - tempFilters.splice(tempFilters.indexOf(exists), 1); - tempBtnFilters.filter(bf => bf !== e) - e.classList.remove("marked"); - } else { - tempFilters.push(element); - tempBtnFilters.push(e) - e.classList.add("marked"); - } - - setFilters(tempFilters); - setBtnFilter(tempBtnFilters) - - if (tempFilters.length < 1) { - handleReset(); - return; - } - - const elementFiltered = isProject ? pureArray.filter((item) => - tempFilters.every((filter) => item.tech.includes(filter.dim)) - ) : pureArray.filter((item) => - tempFilters.every((filter) => item.tags.includes(filter))); - setElement(elementFiltered); - } - - useEffect(()=>{ - if(panelPos != 0) - return; - - const { top } = panelRef.current.getBoundingClientRect(); - setPanelPos(top - 74) - }, [panelPos]) - - - return ( - <> -
-
- -
- {pureFilter?.map((element, index) => ( - - ))} - -
- -
-
- - handleSearch(e)}> -
-
- - ); -}; - -export default Panel; diff --git a/pages/components/person_init.tsx b/pages/components/person_init.tsx deleted file mode 100644 index a9cdd2c..0000000 --- a/pages/components/person_init.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import basics from "../assets/json/basics.json"; -import Image from "next/image"; -import davidquint from "../assets/img/davidquint-photo.jpg"; -import davidquintBlur from "../assets/img/davidquint-photo-blur.jpg"; -import tech from "../assets/json/technologies.json"; -import { useConfigContext } from "./config_provider"; -import { faCropSimple } from "@fortawesome/free-solid-svg-icons"; - - -export default function PersonInit() { - // @ts-ignore - const origin = "/portfolio" - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - - return ( - <> -
-
-
- img_ico -
-
-

{basics?.author}

-
-
-
-
- {tech?.map( - (element, index) => - element.show == "true" && ( - {element.dim} ) - )} -
-
- - ); -} - diff --git a/pages/components/personal_info.tsx b/pages/components/personal_info.tsx deleted file mode 100644 index 9a0623a..0000000 --- a/pages/components/personal_info.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import PersonalItem from "./personal_item"; -import personal from "../assets/json/personal.json"; -import { differenceInYears } from "date-fns"; -import { AnimatePresence, motion } from "framer-motion"; -import Link from "next/link"; -import { useConfigContext } from "./config_provider"; - -export default function PersonalInfo() { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let myAge = new Date(personal?.birthday); - const age = differenceInYears(new Date(), myAge); - let lightModeActive = darkMode ? "lightMode" : "" - - let translate = { - info: language == "es" ? "Información Personal" : "Personal info", - age: language == "es" ? "Edad" : "Age", - birth: language == "es" ? "Cumpleaños" : "Birthday", - country: language == "es" ? "País" : "Country", - contact: language == "es" ? "Contáctame" : "Contact me", - cv : `CV David Quintanilla-${language.toUpperCase()}.pdf`, - open: language == "es" ? "Abrir" : "Open" - } - - return ( - <> - - -
-

{translate.info}

-
-
- - - - -
-
- {translate.contact} -
-
-
- - ); -} diff --git a/pages/components/personal_item.tsx b/pages/components/personal_item.tsx deleted file mode 100644 index b08f3ca..0000000 --- a/pages/components/personal_item.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import {faEye} from '@fortawesome/free-solid-svg-icons'; -import Link from 'next/link'; -import { useConfigContext } from "./config_provider"; - -const PersonalItem = ({ title , detail, url }) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - return ( - <> -
-

{title}

- {url == "" ? ( -

{detail}

- ) : ( - - -

{detail}

- - )} -
- - ); -} - -export default PersonalItem; \ No newline at end of file diff --git a/pages/components/project_item.tsx b/pages/components/project_item.tsx deleted file mode 100644 index 53df94a..0000000 --- a/pages/components/project_item.tsx +++ /dev/null @@ -1,59 +0,0 @@ - -import Image from "next/image"; -import {Suspense, lazy} from 'react' -import TechnologiesSpecific from "./tecnologies_specific"; -import { motion, AnimatePresence } from "framer-motion"; -import ProjectLinkElement from "./project_link_element"; -import { useConfigContext } from "./config_provider"; - -const ProjectsItem = ({ element, index }) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - const image = lazy(()=> import(element?.img)) - - let currentDetails = language == "es" ? element?.details.es : element?.details.eng - let archiveText = language == "es" ? "Desde el Archivo" : "From project archive" - - return ( - <> - - - example -
-
- { element?.archive == "true" ?

{archiveText}

: null} -

{element?.title}

-

{currentDetails}

-
- -
-
-
- -
-
-
-
- - ); -}; - -export default ProjectsItem; diff --git a/pages/components/project_link_element.tsx b/pages/components/project_link_element.tsx deleted file mode 100644 index 172dbb5..0000000 --- a/pages/components/project_link_element.tsx +++ /dev/null @@ -1,62 +0,0 @@ -import projects from '../assets/json/projects_en.json' -import Link from "next/link"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faEye, faCode, faAlignLeft } from "@fortawesome/free-solid-svg-icons"; -import { useConfigContext } from "./config_provider"; - - -type ProjectLinkProps = { - element : typeof projects[0] - }; - -const ProjectLinkElement: React.FC = (element) =>{ - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - let translate = { - online: language == "es" ? "Ver en línea": "Watch online", - source: language == "es" ? "Ver código": "View Source", - info: language == "es" ? "Más Info": "More Info", - } - - return( - <> - {element?.element?.urlView != "" ? ( - - -

{translate.online}

- - ) : null} - - {element?.element?.urlCode != "" ? ( - - -

{translate.source}

- - ) : null} - - {element?.element?.urlDetails != "" ? ( - - -

{translate.info}

- - ) : null} - - ) - -} - -export default ProjectLinkElement \ No newline at end of file diff --git a/pages/components/redirect.tsx b/pages/components/redirect.tsx index bf18411..14fd566 100644 --- a/pages/components/redirect.tsx +++ b/pages/components/redirect.tsx @@ -11,15 +11,14 @@ export default function Redirect({href} : redirect) { useEffect(() => { const redirectTimeout = setTimeout(() => { window.location.href = "https://davidquintr.com/" + href; - }, 1500); + }, 10000); return () => clearTimeout(redirectTimeout); - }, []); + }); return (
-

You are being redirected to my new portfolio and domain

- +

Redirecting...

); } diff --git a/pages/components/social_items.tsx b/pages/components/social_items.tsx deleted file mode 100644 index 07f019b..0000000 --- a/pages/components/social_items.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import socials from '../assets/json/socials.json'; -import Image from 'next/image'; -import { useConfigContext } from "./config_provider"; - -const SocialItems = () => { - //@ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - return( - <> - { - socials?.map((element, index)=>{ - return - {element.name} - - }) - } - - ) -} - -export default SocialItems \ No newline at end of file diff --git a/pages/components/social_share.tsx b/pages/components/social_share.tsx deleted file mode 100644 index c24bfc6..0000000 --- a/pages/components/social_share.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import Link from "next/link"; -import Image from "next/image"; -import social from "../assets/json/socials_share.json"; - -const SocialShare = ({ link }) => { - return ( - <> - {social?.map((element, index) => { - return ( - - {element.name} - - ); - })} - - ); -}; - -export default SocialShare; \ No newline at end of file diff --git a/pages/components/tags.tsx b/pages/components/tags.tsx deleted file mode 100644 index 2593dda..0000000 --- a/pages/components/tags.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { useConfigContext } from "./config_provider"; - - -const Tags = ({tag }) => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - let lightModeActive = darkMode ? "lightMode" : "" - - return ( - <> - {tag?.map((tagElement, index) => { - return ( -
-

{tagElement}

-
- ); - })} - - ); -}; - -export default Tags; diff --git a/pages/components/tech_item.tsx b/pages/components/tech_item.tsx deleted file mode 100644 index 6623c94..0000000 --- a/pages/components/tech_item.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { motion, AnimatePresence } from "framer-motion"; -import Image from "next/image"; - -const TechItem = ({ element, index }) => { - - return ( - <> - - ); -}; - -export default TechItem; diff --git a/pages/components/tecnologies_items.tsx b/pages/components/tecnologies_items.tsx deleted file mode 100644 index 2086265..0000000 --- a/pages/components/tecnologies_items.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import tech from "../assets/json/technologies.json"; -import Image from "next/image"; -import { motion, AnimatePresence } from "framer-motion"; -import TechItem from "./tech_item"; - -export default function TechnologiesItems() { - const origin = "/portfolio" - - return ( - <> - {tech?.map( - (element, index) => - element.show == "true" && ( - - ) - ) - } - - ); -} diff --git a/pages/components/tecnologies_specific.tsx b/pages/components/tecnologies_specific.tsx deleted file mode 100644 index 9ea340c..0000000 --- a/pages/components/tecnologies_specific.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import tech from '../assets/json/technologies.json' -import Image from 'next/image'; - -type TechnologiesSpecificProps = { - lineTech : string -}; - -const TechnologiesSpecific: React.FC = ({lineTech}) => { - - return( - <> - { - tech?.map((element,index) => { - return lineTech?.includes(element.dim) ? ({element.alt}) : null - }) - } - - ) -} - -export default TechnologiesSpecific \ No newline at end of file diff --git a/pages/contact.tsx b/pages/contact.tsx index 2a904e8..f529804 100644 --- a/pages/contact.tsx +++ b/pages/contact.tsx @@ -1,20 +1,13 @@ -import PersonInit from "./components/person_init"; -import NavBar from "./nav_bar"; import Head from "next/head"; -import ContactForm from './components/contact_form' -import PageWrapper from "./components/page_wrapper"; -import { useConfigContext } from "./components/config_provider"; import Redirect from "./components/redirect"; export default function Contact() { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - + return ( <> - {language == "es" ? "Contacto" : "Contact"} + {"Contact"} @@ -30,9 +23,7 @@ export default function Contact() {
- -
); diff --git a/pages/index.tsx b/pages/index.tsx index 5e6a8ac..008ef55 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,5 +1,3 @@ -import PersonInit from './components/person_init' -import AboutMe from './components/about_me' import HomePage from './components/home_page' import Head from 'next/head' diff --git a/pages/nav_bar.tsx b/pages/nav_bar.tsx deleted file mode 100644 index 356d32a..0000000 --- a/pages/nav_bar.tsx +++ /dev/null @@ -1,91 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { useRouter } from "next/router"; -import { - faAddressBook, - faHouse, - faBarsProgress, - faBlog, -} from "@fortawesome/free-solid-svg-icons"; -import Link from "next/link"; -import Router from "next/router"; - -import { usePathname } from "next/navigation"; -import { useEffect, useState } from "react"; -import { useConfigContext } from "./components/config_provider"; -import { faMoon, faSun } from "@fortawesome/free-solid-svg-icons"; - -const links = [ - { href: "/", text: {es : "Inicio", eng: "Home"}, icon: faHouse }, - { href: "/blog", text: {es : "Blog", eng: "Blog"}, icon: faBlog }, - { href: "/projects", text: {es : "Proyectos", eng: "Projects"}, icon: faBarsProgress }, - { href: "/contact", text: {es : "Contacto", eng: "Contact"}, icon: faAddressBook }, -]; - -const LIGHT_MODE_TEXT = "lightMode" - -const NavBar = () => { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - const path = usePathname(); - const [headerTransparent, setHeaderTransparent] = useState(false); - const headerClass = () => { - return headerTransparent ? " transparent" : ""; - }; - - let lightModeActive = darkMode ? "lightMode" : "" - - useEffect(() => { - const handleScroll = () => { - const scrollY = window.scrollY; - if (scrollY > 0) setHeaderTransparent(true); - else setHeaderTransparent(false); - }; - window.addEventListener("scroll", handleScroll); - return () => window.removeEventListener("scroll", handleScroll); - }, []); - - return ( - <> -
- - -
- - - ); -}; - -export default NavBar; diff --git a/pages/projects.tsx b/pages/projects.tsx index 0642d22..3cb4b0e 100644 --- a/pages/projects.tsx +++ b/pages/projects.tsx @@ -1,46 +1,16 @@ -import ProjectsItem from "./components/project_item"; -import technologies from "./assets/json/technologies.json"; -import pureProject from "./assets/json/projects_en.json"; -import NavBar from "./nav_bar"; import Head from "next/head"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faArchive } from "@fortawesome/free-solid-svg-icons"; -import { useEffect, useRef, useState } from "react"; -import Panel from "./components/panel"; -import dynamic from "next/dynamic"; -import { useConfigContext } from "./components/config_provider"; import Redirect from "./components/redirect"; -const PageWrapper = dynamic(() => import("./components/page_wrapper")); - export const metadata = { title: "Projects", }; export default function Projects() { - // @ts-ignore - const { language, setLanguage, darkMode, setDarkMode } = useConfigContext(); - const [project, setProject] = useState([]); - const [showArchive, setShowArchive] = useState(false) - const buttonArchive = useRef() - let lightModeActive = darkMode ? "lightMode" : "" - - useEffect(() => { - let orderProject = pureProject.sort((a, b) => - a.title.localeCompare(b.title, undefined, { sensitivity: "base" }) - ); - setProject(orderProject); - }, []); - - function onArchiveClick(){ - setShowArchive(!showArchive) - } - return ( <> - {language == "es" ? "Proyectos" : "Projects"} + {"Projects"} @@ -56,11 +26,7 @@ export default function Projects() { -
- - - -
+ ); } diff --git a/pages/scss/page.scss b/pages/scss/page.scss index 284087c..04b2d87 100644 --- a/pages/scss/page.scss +++ b/pages/scss/page.scss @@ -48,7 +48,7 @@ ul{ body{ display: flex; flex-direction: column; - justify-content: space-between; + justify-content: center; position: relative; min-height: 100vh; margin: 0;