From 95dd13595e180d3a6d4e42e93eb6e883be58d4b3 Mon Sep 17 00:00:00 2001 From: Jose Date: Mon, 16 Feb 2026 18:18:34 +0100 Subject: [PATCH] Add: experimental mobile version --- src/components/NavBar/NavBar.jsx | 32 +++------ src/components/NavBar/NavItem.jsx | 6 +- .../NavBar/desktop/NavBarDesktop.jsx | 30 +++++++++ src/components/NavBar/mobile/NavBarMobile.jsx | 41 ++++++++++++ src/css/Header.css | 27 ++++++++ src/css/LoginForm.css | 21 ++++++ src/css/NavBarMobile.css | 67 +++++++++++++++++++ src/css/TechCard.css | 16 +++++ src/css/index.css | 66 +++++++++++++++++- src/hooks/useWindowWidth.js | 13 ++++ src/locales/en.json | 4 +- src/locales/es.json | 2 +- 12 files changed, 297 insertions(+), 28 deletions(-) create mode 100644 src/components/NavBar/desktop/NavBarDesktop.jsx create mode 100644 src/components/NavBar/mobile/NavBarMobile.jsx create mode 100644 src/css/NavBarMobile.css create mode 100644 src/hooks/useWindowWidth.js diff --git a/src/components/NavBar/NavBar.jsx b/src/components/NavBar/NavBar.jsx index df36751..88a1de1 100644 --- a/src/components/NavBar/NavBar.jsx +++ b/src/components/NavBar/NavBar.jsx @@ -1,11 +1,11 @@ -import '@/css/NavBar.css'; -import NavItem from './NavItem'; -import LanguageButton from '../LanguageButton'; +import { useWindowWidth } from '@/hooks/useWindowWidth'; +import NavBarDesktop from '@/components/NavBar/desktop/NavBarDesktop'; +import NavBarMobile from '@/components/NavBar/mobile/NavBarMobile'; import { useTranslation } from 'react-i18next'; const NavBar = () => { const { t } = useTranslation(); - + const width = useWindowWidth(); const navItems = [ { label: t("nav.inicio.label"), href: `/#${t("nav.inicio.href")}` }, { label: t("nav.muestras.label"), href: `/#${t("nav.muestras.href")}` }, @@ -14,26 +14,12 @@ const NavBar = () => { { label: t("nav.login.label"), href: `/${t("nav.login.href")}` } ]; - const centerItems = navItems.slice(0, navItems.length - 1); - const rightItems = navItems.slice(-1); - - return ( -