Skip to content

Commit

Permalink
Merge pull request #395 from Pushpa472/Select-language
Browse files Browse the repository at this point in the history
Bug: fixed bug in selected language #374
  • Loading branch information
RamakrushnaBiswal authored Oct 26, 2024
2 parents abe91c3 + 90b4695 commit 378c722
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions frontend/src/components/Pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import FeedbackForm from '../ui/FeedbackForm';
import About from './About';
import React, { useEffect } from 'react';
import MainHOC from '../MainHOC';
import Google from '../Shared/footer/Google';

function Home() {
useEffect(() => {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Shared/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState, useEffect } from 'react';
import Logo from '../../assets/Logo/playcafe.png';
import { Link, useLocation, useNavigate } from 'react-router-dom';
import Cookies from 'js-cookie';
import Google from './footer/Google';
import ThemeToggle from '../../components/ThemeToggle';

const Navbar = () => {
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/components/Shared/footer/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ const Section2 = () => {
>
BoardGame Cafe{!isWide && <br />}
</h1>
<p className={`flex ${isWide ? `text-xl justify-center mt-3` : `text-base mt-1`}`}>©2024 by Sip & Play</p>
<p className={`flex ${isWide ? `text-[center] mt-3 ml-[620px]` : `text-base mt-1`}`}>
©2024 by Sip & Play
</p>
</div>
</div>
</>
Expand Down Expand Up @@ -108,10 +110,10 @@ const Nav = () => {
const emailAddress = '[email protected]';

return (
<div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20">
<div className="flex md:flex-row flex-col shrink-0 gap-4 sm:gap-20 ml-[30px]">
<div className="flex justify-between md:gap-20">
<div className="flex flex-col gap-2 text-black dark:text-white">
<h3 className="mb-2 uppercase text-black dark:text-white">About</h3>
<h3 className="mb-2 uppercase text-black dark:text-white cursor-pointer">About</h3>
{navLinks.map((item, index) => (
<Link
className="hover:text-white duration-300"
Expand All @@ -122,8 +124,9 @@ const Nav = () => {
</Link>
))}
</div>

<div className="flex flex-col gap-2 text-black dark:text-white">
<h3 className="mb-2 uppercase text-black dark:text-white">Socials</h3>
<h3 className="mb-2 uppercase text-black dark:text-white ml-[30px] cursor-pointer">Socials</h3>
{socialLink.map((item, index) => (
<a
target="_blank"
Expand All @@ -138,8 +141,9 @@ const Nav = () => {
))}
</div>
</div>

<div className="flex flex-col text-black dark:text-white">
<h3 className="mb-2 uppercase text-black dark:text-white">Contact Us</h3>
<h3 className="mb-2 uppercase text-black dark:text-white ml-[30px] cursor-pointer">Contact Us</h3>
<a
href={`mailto:${emailAddress}`}
className="block mb-2 hover:underline"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Shared/footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Footer = () => {
style={{ clipPath: 'polygon(0% 0, 100% 0%, 100% 100%, 0 100%)' }}
>
<div className="relative h-[calc(100vh+800px)] -top-[100vh]">
<div className="h-[700px] md:h-[600px] sticky top-[calc(100vh-600px)]">
<div className="h-[700px] md:h-[650px] sticky top-[calc(100vh-600px)]">
<Content />
</div>
</div>
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/components/Shared/footer/Google.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Google = () => {
} else {
new window.google.translate.TranslateElement({
pageLanguage: 'en',
includedLanguages: 'en,hi,ur,es,ja,ko,zh-CN,nl,fr,de,it,ta,te,ru,ar,pt,th',
includedLanguages: 'en,hi,mr,ur,es,ja,ko,zh-CN,nl,fr,de,it,ta,te,ru,ar,pt,th',
layout: window.google.translate.TranslateElement.InlineLayout.HORIZONTAL,
defaultLanguage: 'en',
autoDisplay: false,
Expand Down Expand Up @@ -56,12 +56,12 @@ const Google = () => {
.goog-te-combo {
background-color: #f0f8ff; /* Soft blue background */
border-radius: 0.3rem; /* Rounded corners */
padding: 0.5rem;
font-size: 1.175rem;
padding: 8px 4px;
font-size: 1.1rem;
transition: all 0.3s ease-in-out; /* Smooth transition */
outline: none;
color: #007bff; /* Blue text */
font-weight: 500; /* Tailwind: font-medium */
font-weight: 400; /* Tailwind: font-medium */
cursor: pointer;
text-align:center;
}
Expand All @@ -70,7 +70,6 @@ const Google = () => {
background-color: #e6f0ff; /* Lighter blue on hover */
border-color: #0056b3; /* Darker blue on hover */
color: #0056b3; /* Darker blue text */
transform: scale(1.05); /* Slight scale effect */
}
.goog-logo-link {
Expand Down

0 comments on commit 378c722

Please sign in to comment.