diff --git a/angular-ystemandchess-old/src/app/header/header.component.scss b/angular-ystemandchess-old/src/app/header/header.component.scss index 6f430f66..eb20efa5 100644 --- a/angular-ystemandchess-old/src/app/header/header.component.scss +++ b/angular-ystemandchess-old/src/app/header/header.component.scss @@ -99,6 +99,19 @@ color: #3a7cca; } +.navbar-toggler { + transition: all 0.5s ease-in-out; + + &:focus { + outline: none; + box-shadow: 0 0 0 0.2rem rgba(0, 0, 0, 0.1); + } +} + +.navbar-toggler-icon { + transition: transform 0.5s ease-in-out; +} + .btn-lg { background-color: white; border-radius: 30px; diff --git a/react-ystemandchess/src/App.tsx b/react-ystemandchess/src/App.tsx index 53281882..94317b6d 100644 --- a/react-ystemandchess/src/App.tsx +++ b/react-ystemandchess/src/App.tsx @@ -142,7 +142,7 @@ function App() { */ return ( -
+
diff --git a/react-ystemandchess/src/components/navbar/NavBar.tsx b/react-ystemandchess/src/components/navbar/NavBar.tsx index de5b720f..9e709acf 100644 --- a/react-ystemandchess/src/components/navbar/NavBar.tsx +++ b/react-ystemandchess/src/components/navbar/NavBar.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef } from "react"; import { useCookies } from "react-cookie"; -import { motion } from "framer-motion"; +import { motion, px } from "framer-motion"; import { Link } from "react-router-dom"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCaretDown, faCaretUp } from "@fortawesome/free-solid-svg-icons"; @@ -77,11 +77,15 @@ const NavBar = () => { }; const closeDropdown = (event: { target: any }) => { - // Close "About Us" dropdown if click is outside its container - if (aboutUsRef.current && !aboutUsRef.current.contains(event.target)) { + // Close "About Us" dropdown if click is outside its container and dropdown + const aboutUsMenu = document.getElementById('aboutus-menu'); + const isClickInsideAboutUs = aboutUsRef.current && aboutUsRef.current.contains(event.target); + const isClickInsideAboutUsMenu = aboutUsMenu && aboutUsMenu.contains(event.target); + + if (!isClickInsideAboutUs && !isClickInsideAboutUsMenu) { setAboutUsDropDown(false); } - + // Close mobile menu if click is outside both the menu and hamburger button if ( mobileMenuRef.current && @@ -89,7 +93,8 @@ const NavBar = () => { hamburgerRef.current && !hamburgerRef.current.contains(event.target) && aboutUsRef.current && - !aboutUsRef.current.contains(event.target) + !aboutUsRef.current.contains(event.target) && + (!aboutUsMenu || !aboutUsMenu.contains(event.target)) ) { setMobileMenuDropDown(false); } @@ -158,7 +163,7 @@ const NavBar = () => { {/* About Us dropdown menu container */} -
+
{/* About Us dropdown trigger button */}
{ {aboutUsDropDown && ( { ); return ( -
+
@@ -390,7 +395,7 @@ const NavBar = () => {
); diff --git a/react-ystemandchess/src/features/lessons/lessons-main/Lessons.module.scss b/react-ystemandchess/src/features/lessons/lessons-main/Lessons.module.scss index 2dc42d06..5761d16f 100644 --- a/react-ystemandchess/src/features/lessons/lessons-main/Lessons.module.scss +++ b/react-ystemandchess/src/features/lessons/lessons-main/Lessons.module.scss @@ -96,28 +96,33 @@ } .prevNextLessonButton { - width: 160px; + min-width: 160px; height: 60px; border-radius: 5px; color: black; - display: flex; + display: inline-flex; align-items: center; - justify-content: space-between; + justify-content: center; + gap: 12px; + padding: 0 22px; } .prevNextLessonButtonInactive { - width: 160px; + min-width: 160px; height: 60px; border-radius: 5px; color: rgb(173, 169, 169); - display: flex; + display: inline-flex; align-items: center; - justify-content: space-between; + justify-content: center; + gap: 12px; + padding: 0 22px; } .buttonDescription { font-size: 20px; font-weight: bold; + margin: 0; } .next { diff --git a/react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.module.scss b/react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.module.scss index 88e95e73..eddb9f70 100644 --- a/react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.module.scss +++ b/react-ystemandchess/src/features/lessons/piece-lessons/lesson-overlay/Lesson-overlay.module.scss @@ -272,8 +272,8 @@ padding: 0; position: relative; } - -.prevNextLessonButtonInactive { + + .prevNextLessonButtonInactive { width: 160px; height: 60px; border-radius: 5px; @@ -284,30 +284,29 @@ padding: 0; position: relative; } - -.prevNextLessonButton svg, -.prevNextLessonButtonInactive svg { + + .prevNextLessonButton svg, + .prevNextLessonButtonInactive svg { width: 22px; height: 22px; position: absolute; } - -.prev svg { + + .prev svg { left: 16px; } - -.next svg { + + .next svg { right: 16px; } - -.buttonDescription { + + .buttonDescription { font-size: 20px; font-weight: bold; } - -.next { + + .next { background-color: var(--green-color); - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); } .next:hover {