From 9ad24b79353847bf36e8a7b09a2877c82e105f08 Mon Sep 17 00:00:00 2001 From: Cesar Mendivil Date: Wed, 16 Oct 2024 16:51:06 -0700 Subject: [PATCH] Incluir Mas traducciones y ajuste al consumo de rss --- gatsby-config.js | 4 +- .../Navbars/SoftwareNav/OnePageNav.jsx | 34 ++++++++--- src/components/Software/About.jsx | 2 +- src/components/Software/ChatBanner.jsx | 31 ++++++++-- src/components/Software/Footer.jsx | 43 +++++++++----- src/components/Software/Pricing.jsx | 10 ++-- src/components/Software/Projects.jsx | 10 ++-- src/components/Software/Testimonials.jsx | 4 +- src/data/Software/footer.json | 24 ++++---- static/data/chatbanner.json | 26 +++++++++ static/data/footer.json | 58 ++++++++++++++----- static/data/navbar.json | 35 +++++++++++ static/data/plans.json | 27 ++++++--- static/data/testimonials.json | 16 ++--- 14 files changed, 239 insertions(+), 85 deletions(-) create mode 100644 static/data/chatbanner.json create mode 100644 static/data/navbar.json diff --git a/gatsby-config.js b/gatsby-config.js index 1e8bcc8..235fad8 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -16,8 +16,6 @@ module.exports = { defaultLanguage: `es`, // option to redirect to `/ko` when connecting `/` redirect: true, - // Utilizar la URL del recurso JSON de idioma desde las variables de entorno - remoteJsonUrl: `http://localhost:8000/data/language/languages.json`, }, }, { @@ -28,7 +26,7 @@ module.exports = { parserOption: { customFields: { channel: ['title', 'description', 'link', 'image', 'generator', 'lastBuildDate', 'copyright', 'language', 'ttl'], - item: ['title', 'description', 'link', 'guid', 'pubDate', 'media','thumbnail','url','attrs'], // Campos personalizados si el feed tiene elementos adicionales + item: ['title', 'description', 'link', 'guid', 'pubDate', 'media:thumbnail'], // Campos personalizados si el feed tiene elementos adicionales }, }, }, diff --git a/src/components/Navbars/SoftwareNav/OnePageNav.jsx b/src/components/Navbars/SoftwareNav/OnePageNav.jsx index ac5e498..620bd01 100644 --- a/src/components/Navbars/SoftwareNav/OnePageNav.jsx +++ b/src/components/Navbars/SoftwareNav/OnePageNav.jsx @@ -1,10 +1,15 @@ -import React, { useEffect, useRef } from 'react'; +import React, { useEffect, useRef,useContext, useState } from 'react'; import navbarScrollEffect from "common/navbarScrollEffect"; import scrollToSection from 'common/scrollToSection'; import LanguageSelector from '../LanguageSelector/LanguageSwitcher'; +import api from '../../../common/api'; +import translationService from '../../../common/translationService'; +import { LanguageContext } from '../../../context/LanguageContext'; const OnePageNav = () => { const navbarRef = useRef(null); + const { currentLanguage } = useContext(LanguageContext); + const [navbarData, setNavBarData] = useState([]); useEffect(() => { navbarScrollEffect(navbarRef.current); @@ -29,6 +34,19 @@ const OnePageNav = () => { }); }, []); + useEffect(() => { + const fetchData = async () => { + try { + const response = await api.get('navbardata', 'navbar.json'); + setNavBarData(response); + } catch (error) { + console.error(error); + } + }; + + fetchData(); + }, [],[currentLanguage]); + const handleMouseMove = (event) => { const dropDownToggler = event.target.classList.contains('dropdown-toggle') ? event.target : event.target.querySelector('.dropdown-toggle'); const dropDownMenu = dropDownToggler?.nextElementSibling; @@ -61,37 +79,37 @@ const OnePageNav = () => { diff --git a/src/components/Software/About.jsx b/src/components/Software/About.jsx index 13e4c28..aead9bf 100644 --- a/src/components/Software/About.jsx +++ b/src/components/Software/About.jsx @@ -27,7 +27,7 @@ const About = () => {
- + { dataAbout.numbers.map((number, index) => (
diff --git a/src/components/Software/ChatBanner.jsx b/src/components/Software/ChatBanner.jsx index 36fe8f5..b937441 100644 --- a/src/components/Software/ChatBanner.jsx +++ b/src/components/Software/ChatBanner.jsx @@ -1,23 +1,42 @@ -import React from 'react'; +import React, {useContext, useEffect, useState} from 'react'; import { Link } from 'gatsby'; +import { LanguageContext } from '../../context/LanguageContext'; +import api from '../../common/api'; +import translationService from '../../common/translationService'; const ChatBanner = () => { + const { currentLanguage } = useContext(LanguageContext); + const [chatsData, setChatsData] = useState({chatsbanner:[]}); + + + useEffect(() => { + const fetchData = async () => { + try { + const response = await api.get('chatsdata', 'chatbanner.json'); + setChatsData(response); + } catch (error) { + console.error(error); + } + }; + + fetchData(); + }, [],[currentLanguage]); return (
-

Assess Your Business Potentials Now & Find Opportunities For Bigger Success

+

{translationService.getTranslation(chatsData.chatsbanner, 'title1',currentLanguage)} {translationService.getTranslation(chatsData.chatsbanner, 'title2',currentLanguage)}

- - Let’s Chat + + {translationService.getTranslation(chatsData.chatsbanner, 'title3',currentLanguage)} - - Get Information + + {translationService.getTranslation(chatsData.chatsbanner, 'title4',currentLanguage)}
diff --git a/src/components/Software/Footer.jsx b/src/components/Software/Footer.jsx index f2214d5..b281b5c 100644 --- a/src/components/Software/Footer.jsx +++ b/src/components/Software/Footer.jsx @@ -1,8 +1,25 @@ -import React from 'react'; +import React, {useContext, useEffect, useState} from 'react'; import { Link } from 'gatsby'; -import footerData from 'data/Software/footer.json'; - +import { LanguageContext } from '../../context/LanguageContext'; +import api from '../../common/api'; +import translationService from '../../common/translationService'; const Footer = () => { + const { currentLanguage } = useContext(LanguageContext); + const [footerData, setFooterData] = useState({usefulLinks: [], services: [],titles: []}); + + + useEffect(() => { + const fetchData = async () => { + try { + const response = await api.get('footerdata', 'footer.json'); + setFooterData(response); + } catch (error) { + console.error(error); + } + }; + + fetchData(); + }, [], [currentLanguage]); return (
diff --git a/src/components/Software/Testimonials.jsx b/src/components/Software/Testimonials.jsx index 229ba18..174df23 100644 --- a/src/components/Software/Testimonials.jsx +++ b/src/components/Software/Testimonials.jsx @@ -79,7 +79,7 @@ const Testimonials = () => {
- { testimonial.text } + { testimonial.text[currentLanguage] }
@@ -87,7 +87,7 @@ const Testimonials = () => {

{ testimonial.author }

- { testimonial.position } + { testimonial.position[currentLanguage] }
diff --git a/src/data/Software/footer.json b/src/data/Software/footer.json index b9eda0b..dc1fd33 100644 --- a/src/data/Software/footer.json +++ b/src/data/Software/footer.json @@ -1,20 +1,20 @@ { "address": "223 Thatcher Road St, Brookly, Manhattan, NY 10463, United States", "phone": "+031 5689 89 98", - "email": "contact@Itecksolution.co", + "email": "contact@nextream.net", "usefulLinks": [ - { "link": "/home-saas-technology", "title": "Home" }, - { "link": "/page-about-5", "title": "About Iteck" }, - { "link": "/page-portfolio-5", "title": "Projects" }, - { "link": "/page-about-5", "title": "How It Works" }, - { "link": "/page-blog-5", "title": "Blog" }, - { "link": "/page-contact-5", "title": "Contact" } + { "link": "#", "title": "Home" }, + { "link": "#", "title": "About Iteck" }, + { "link": "#", "title": "Projects" }, + { "link": "#", "title": "How It Works" }, + { "link": "#", "title": "Blog" }, + { "link": "#", "title": "Contact" } ], "services": [ - { "link": "/page-services-5", "title": "It Consultation" }, - { "link": "/page-services-5", "title": "Software Development" }, - { "link": "/page-services-5", "title": "AI Machine Learning" }, - { "link": "/page-services-5", "title": "Data Security" }, - { "link": "/page-services-5", "title": "Cloud Services" } + { "link": "#", "title": "It Consultation" }, + { "link": "#", "title": "Software Development" }, + { "link": "#", "title": "AI Machine Learning" }, + { "link": "#", "title": "Data Security" }, + { "link": "#", "title": "Cloud Services" } ] } \ No newline at end of file diff --git a/static/data/chatbanner.json b/static/data/chatbanner.json new file mode 100644 index 0000000..2dc71ef --- /dev/null +++ b/static/data/chatbanner.json @@ -0,0 +1,26 @@ + +{ + "chatsdata":{ + "chatsbanner":[ + { + "title1":{ + "es":"Evalúa tus potenciales de negocio ahora y encuentra oportunidades para un", + "en":"Assess Your Business Potentials Now & Find Opportunities For" + }, + "title2":{ + "es":"¡Éxito más grande!", + "en":"Bigger Success." + }, + "title3":{ + "es":"Hablemos", + "en":"Let’s Chat" + }, + "title4":{ + "es":"Obtenga Información", + "en":"Get Information" + } + + } + ] + } +} diff --git a/static/data/footer.json b/static/data/footer.json index b9eda0b..dab335a 100644 --- a/static/data/footer.json +++ b/static/data/footer.json @@ -1,20 +1,50 @@ { - "address": "223 Thatcher Road St, Brookly, Manhattan, NY 10463, United States", - "phone": "+031 5689 89 98", - "email": "contact@Itecksolution.co", + "footerdata":{ "usefulLinks": [ - { "link": "/home-saas-technology", "title": "Home" }, - { "link": "/page-about-5", "title": "About Iteck" }, - { "link": "/page-portfolio-5", "title": "Projects" }, - { "link": "/page-about-5", "title": "How It Works" }, - { "link": "/page-blog-5", "title": "Blog" }, - { "link": "/page-contact-5", "title": "Contact" } + { "link": "#", "title": { "es": "Home", "en": "Home" }}, + { "link": "#", "title": {"es":"About Iteck", "en":"About Iteck"}}, + { "link": "#", "title": {"es":"Projects", "en":"Projects"}}, + { "link": "#", "title": {"es":"How It Works", "en": "How It Works"}}, + { "link": "#", "title": {"es":"Blog", "en":"Blog"}}, + { "link": "#", "title": {"es":"Contact", "en":"Contact"} } ], "services": [ - { "link": "/page-services-5", "title": "It Consultation" }, - { "link": "/page-services-5", "title": "Software Development" }, - { "link": "/page-services-5", "title": "AI Machine Learning" }, - { "link": "/page-services-5", "title": "Data Security" }, - { "link": "/page-services-5", "title": "Cloud Services" } + { "link": "#", "title": {"es":"It Consultation", "en":"It Consultation"}}, + { "link": "#", "title": {"es":"Software Development", "en":"Software Development"}}, + { "link": "#", "title": {"es":"AI Machine Learning", "en":"AI Machine Learning"}}, + { "link": "#", "title": {"es":"Data Security", "en":"Data Security"}}, + { "link": "#", "title": {"es":"Cloud Services", "en":"Cloud Services"}} + ], + "titles": [ + { + "title": { + "es": "Nextream's Tech & Solutions", + "en": "Nextream's Tech & Solutions" + }, + "title2": { + "es": "Enlaces de Interes", + "en": "Useful Links" + }, + "title3": { + "es": "Información", + "en": "Information" + }, + "title4": { + "es": "Servicios", + "en": "Services" + }, + "subtitle1": { + "es": "Más de 25 años trabajando en servicios de TI desarrollando aplicaciones de software y aplicaciones móviles para clientes de todo el mundo. Para su industria muy específica, contamos con soluciones de TI altamente personalizadas.", + "en": "Más de 25 años trabajando en servicios de TI desarrollando aplicaciones de software y aplicaciones móviles para clientes de todo el mundo. Para su industria muy específica, contamos con soluciones de TI altamente personalizadas." + }, + + "address": { + "es": "223 Thatcher Road St, Brookly, Manhattan, NY 10463, United States", + "en": "223 Thatcher Road St, Brookly, Manhattan, NY 10463, United States"}, + "phone": {"es": "+031 5689 89 98", "en": "+031 5689 89 98"}, + "email": {"es": "contact@nextream.net", "en": "contact@nextream.net" } + + } ] + } } \ No newline at end of file diff --git a/static/data/navbar.json b/static/data/navbar.json new file mode 100644 index 0000000..ee383dc --- /dev/null +++ b/static/data/navbar.json @@ -0,0 +1,35 @@ + + { + "navbardata":[ + { + "testimonials":{ + "es":"Testimonios", + "en":"Testimonials" + }, + "services":{ + "es":"Servicios", + "en":"Services" + }, + "about_us":{ + "es":"Acerca de nosotros", + "en":"About Us" + }, + "portfolio": { + "es":"Portafolio", + "en":"Portfolio" + }, + "pricing":{ + "es":"Precios", + "en":"Pricing" + }, + "team":{ + "es":"Equipo", + "en":"Team" + }, + "blog":{ + "es":"Blog", + "en":"Blog" + } + } + ] +} \ No newline at end of file diff --git a/static/data/plans.json b/static/data/plans.json index 43d9893..30e6140 100644 --- a/static/data/plans.json +++ b/static/data/plans.json @@ -2,17 +2,25 @@ "plan": { "plans": [ { - "title": "Standard", - "description": "Basic features", - "price": "$29", - "features": ["3 Projects", "6 Months Support & SEO", "Basic Dashboard"] + "title": {"es":"Estandard", "en": "Standard"}, + "description": {"es":"Funciones basicas", "en":"Basic features"}, + "price": {"es":"$29 DLLs", "en":"$29 DLLs"}, + "features": {"es":["3 Proyectos", "6 Meses y soporte SEO", "Tablero Basico"], "en":["3 Projects", "6 Months Support & SEO", "Basic Dashboard"]} }, { - "title": "Pro", + "title": {"es":"Pro", "en": "Pro"}, "recommended": true, - "description": "Premium features", - "price": "$59", - "features": [ + "description": {"es":"Funciones Premium", "en":"Premium features"}, + "price": {"es":"$59 DLLs", "en":"$59 DLLs"}, + "features": { + "es":[ + "Proyectos Ilimitados", + "Soporte de por vida y Consultores de SEO", + "Tablero Avanzado", + "Seguridad de datos y copia de seguridad", + "Hosting y Dominio" + ], + "en":[ "Unlimited Projects", "Lifetime Support & SEO Experts Consult", "Advance Dashboard", @@ -20,6 +28,7 @@ "Cloud Hosting & Domain" ] } + } ], "text_traductions": [ { @@ -51,7 +60,7 @@ "es": "Precio", "en": "Affordable" }, - "recommend": { + "recommended": { "es": "Recomendado", "en": "Recomended" }, diff --git a/static/data/testimonials.json b/static/data/testimonials.json index e086106..7cdc8a4 100644 --- a/static/data/testimonials.json +++ b/static/data/testimonials.json @@ -2,28 +2,28 @@ "testimonial": { "testimonials": [ { - "text": "“We encountered a problem with processing big data and after only 1 week, all fixed, professional, fast & affordable price!”", + "text": {"es":"“Encontramos un problema con el procesamiento de big data y después de solo 1 semana, ¡todo solucionado, precio profesional, rápido y asequible!”","en":"“We encountered a problem with processing big data and after only 1 week, all fixed, professional, fast & affordable price!”"}, "image": "/assets/img/testimonials/testi.jpeg", "author": "Robert Downey Jr", - "positon": "Technical Leader at Airbnb" + "position": {"es":"Líder técnico en Airbnb","en":"Technical Leader at Airbnb"} }, { - "text": "“Iteck is 1st our choice for cloud service methods. Extremely security and fast support.”", + "text": {"es":"“Iteck es nuestra primera opción para métodos de servicio en la nube. Extremadamente seguridad y soporte rápido”.","en":"“Iteck is 1st our choice for cloud service methods. Extremely security and fast support.”"}, "image": "/assets/img/testimonials/user1.jpeg", "author": "Conor McGregor", - "positon": "CTO at IBM" + "position": {"es":"CTO at IBM","en":"CTO at IBM"} }, { - "text": "“Iteck’s Experts really is amazing! high speciality, professional and friendly. Our profit increased so much. Really very satisfied!”", + "text":{"es":"“¡Los expertos de Iteck son realmente increíbles! Alta especialidad, profesional y amable. Nuestras ganancias aumentaron mucho. ¡Realmente muy satisfecho!”","en":"“Iteck’s Experts really is amazing! high speciality, professional and friendly. Our profit increased so much. Really very satisfied!”"}, "image": "/assets/img/testimonials/user2.jpeg", "author": "Lucas Digne", - "positon": "Product Management at Invisionapp" + "position":{"es":"Gestión de Producto en Invisionapp","en":"Product Management at Invisionapp"} }, { - "text": "“Iteck’s Experts really is amazing! high speciality, professional and friendly. Our profit increased so much. Really very satisfied!”", + "text":{"es":"“¡Los expertos de Iteck son realmente increíbles! Alta especialidad, profesional y amable. Nuestras ganancias aumentaron mucho. ¡Realmente muy satisfecho!”","en":"“Iteck’s Experts really is amazing! high speciality, professional and friendly. Our profit increased so much. Really very satisfied!”"}, "image": "/assets/img/testimonials/user2.jpeg", "author": "Cesar Mendivil", - "positon": "Product Management at Invisionapp" + "position":{"es":"Gestión de Producto en Invisionapp","en":"Product Management at Invisionapp"} } ], "traductions": [