diff --git a/web/e.cash/components/navbar/index.js b/web/e.cash/components/navbar/index.js --- a/web/e.cash/components/navbar/index.js +++ b/web/e.cash/components/navbar/index.js @@ -5,7 +5,8 @@ import Image from 'next/image'; import { useEffect, useState } from 'react'; import { navitems } from '../../data/navitems'; -import { NavbarOuter, NavbarCtn, EnvVarMessage } from './styles'; +import { socials } from '../../data/socials'; +import { NavbarOuter, NavbarCtn, EnvVarMessage, SocialCtn } from './styles'; import AnnouncementBar from '/components/announcement-bar'; export default function Navbar({ announcementbar }) { @@ -15,6 +16,7 @@ const [windowWidth, setWindowWidth] = useState(''); const [windowHeight, setWindowHeight] = useState(0); const [navBackground, setNavBackground] = useState(false); + const mobileBreakPoint = 920; const handleResize = () => { setWindowWidth(window.innerWidth); @@ -108,9 +110,9 @@ ) : ( <>
setSelectedDropDownMenu( selectedDropDownMenu === @@ -127,7 +129,8 @@ className="nav_dropdown_ctn" style={ selectedDropDownMenu === - index && windowWidth < 920 + index && + windowWidth < mobileBreakPoint ? { display: 'flex' } : null } @@ -180,6 +183,24 @@ )}
))} + {windowWidth < mobileBreakPoint && ( + + {socials.map(social => ( + + {social.name} + + ))} + + )}
diff --git a/web/e.cash/components/navbar/styles.js b/web/e.cash/components/navbar/styles.js --- a/web/e.cash/components/navbar/styles.js +++ b/web/e.cash/components/navbar/styles.js @@ -226,6 +226,9 @@ min-height: 100vh; align-items: flex-start; transition: all ease-in-out 200ms; + overflow-y: scroll; + height: 100%; + padding-bottom: 100px; } .nav_outer { @@ -236,13 +239,24 @@ .nav_outer .nav_item { font-size: 15px; - padding: 18px 0 18px 40px; + padding: 16px 0 16px 40px; text-align: left; transition: all 200ms ease-in-out; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.13); } + .dropdown_indicator::after { + content: ''; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid ${props => props.theme.colors.contrast}; + position: absolute; + right: 20px; + top: 25px; + opacity: 0.5; + } + .nav_dropdown_ctn { position: unset; width: 100%; @@ -350,3 +364,30 @@ top: 14px; } `; + +export const SocialCtn = styled.div` + display: flex; + width: 100%; + margin-top: 10px; + padding-left: 40px; + flex-wrap: wrap; + max-width: 200px; + + a { + width: 22px; + height: 22px; + position: relative; + margin-right: 20px; + transition: all ease-in-out 200ms; + margin-top: 20px; + + :hover { + transform: scale(1.4); + } + + :hover img { + filter: invert(32%) sepia(76%) saturate(5535%) hue-rotate(189deg) + brightness(93%) contrast(101%); + } + } +`;