From d35c55cfca0a76795cfed5689fce23e55618fb35 Mon Sep 17 00:00:00 2001 From: Alaguraj0361 Date: Fri, 22 Aug 2025 12:11:03 +0530 Subject: [PATCH] janahan law header spanish language change button added --- components/HeaderTopbar/HeaderTopbar.js | 17 +++++++++-- styles/sass/layout/_header.scss | 38 ++++++++++++++++--------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/components/HeaderTopbar/HeaderTopbar.js b/components/HeaderTopbar/HeaderTopbar.js index c11038a..66dda34 100644 --- a/components/HeaderTopbar/HeaderTopbar.js +++ b/components/HeaderTopbar/HeaderTopbar.js @@ -5,21 +5,32 @@ import Link from 'next/link' import Logo from '/public/images/logo.png' import Image from 'next/image' import { useTranslation } from 'next-i18next' +import { changeLanguage } from '../../utils/commonFunction.utils' +import { useRouter } from 'next/router' const HeaderTopbar = () => { const { t } = useTranslation('common') + const router = useRouter() + + const handleLanguageChange = () => { + changeLanguage(router, 'es'); // always switch to Spanish + }; + return ( <>
-
- Para cambiar al español, haz clic en la opción en la parte inferior derecha del encabezado. +
+
+ Haz clic en el botón para cambiar a español. +
+
diff --git a/styles/sass/layout/_header.scss b/styles/sass/layout/_header.scss index fae23af..e50b2fe 100644 --- a/styles/sass/layout/_header.scss +++ b/styles/sass/layout/_header.scss @@ -2025,29 +2025,39 @@ .responsivemenu a:not([href]):not([class]):hover { color: #ddd; } + .responsive-entry-media { - position: relative; - width: 100%; - aspect-ratio:28 / 9; - overflow: hidden; + position: relative; + width: 100%; + aspect-ratio: 28 / 9; + overflow: hidden; } .responsive-entry-media img { - width: 100%; - height: 100%; - object-fit: cover; + width: 100%; + height: 100%; + object-fit: cover; } .responsive-entry-media2 { - position: relative; - width: 100%; - aspect-ratio:3 / 2; - overflow: hidden; + position: relative; + width: 100%; + aspect-ratio: 3 / 2; + overflow: hidden; } .responsive-entry-media2 img { - width: 100%; - height: 100%; - object-fit: cover; + width: 100%; + height: 100%; + object-fit: cover; } +.white-button { + border: none; + background-color: white; + color: #c12026; + border-radius: 2px; + padding: 5px 10px; + font-size: 16px; + font-weight: bold; +} \ No newline at end of file