import styled from 'styled-components' import Link from 'next/link'; interface ActivePropType { active?: number; } export const NavWrap = styled.div` display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; border-bottom: 1px solid ${({ theme }) => theme.colors.primary}; ` export const NavWrapMobile = styled(NavWrap)` width: 100%; flex-direction: row; position: fixed; z-index: 100; ` export const NavWrapMobileGhost = styled.div` position: relative; width: 100%; height: 57px; ` export const NavSideMenu = styled.div ` position: fixed; top: 0%; left: 0%; right: 0%; bottom: 0%; max-width: ${ props => props.active ? "60%" : "0%"}; display: flex; justify-content: space-between; flex-direction: column; align-items: center; height: 100%; z-index: 100; background-color: ${({ theme }) => theme.colors.background}; visibility: ${ props => props.active ? "visible" : "hidden"}; width: ${ props => props.active ? "360px" : "0%"}; transition-delay: ${ props => props.active ? "0s, 0s" : "0s, 0.3s"}; ` export const NavSideMenuPanel = styled.div ` height: 100%; display: flex; flex-direction: column; align-items: center; ` export const NavSideMenuButton = styled.button ` z-index: 100; margin: 16px; color: ${ props => props.active ? ({ theme }) => theme.colors.background : ({ theme }) => theme.colors.primary }; background-color: ${ props => props.active ? ({ theme }) => theme.colors.secondary : ({ theme }) => theme.colors.background }; ` export const NavSideMenuButtonPlaceholder = styled.div` width: 48px; margin: 16px; ` export const NavSideMenuGhost = styled.div` ` export const NavBar = styled.nav` margin-right: 1%; display: flex; flex: 1; padding: 1rem 0; flex-wrap: nowrap; justify-content: center; align-items: center; ` export const NavBarMobile = styled(NavBar)` flex-direction: column; ` export const NavLink = styled(Link) ` color: ${props => props.active ? ({ theme }) => theme.invertButtons ? theme.colors.text ? theme.colors.text : theme.colors.secondary : theme.colors.secondary : ({ theme }) => theme.colors.primary}; background-color: ${props => props.active ? ({ theme }) => theme.invertButtons ? theme.colors.secondary : theme.colors.background : ({ theme }) => theme.colors.background}; padding: 2px 6px; border: 2px solid; margin: 0.2rem; border-radius: 5px; display: flex; justify-content: center; align-items: center; transition: all 0.1s ease; &:hover { color: ${({ theme }) => theme.invertButtons ? theme.colors.text ? theme.colors.text : theme.colors.primary : theme.colors.secondary}; background-color: ${({ theme }) => theme.invertButtons ? theme.colors.secondary : theme.colors.background}; } ` export const NavIndicators = styled.nav` width: 100%; display: flex; flex: 1; padding: 1rem 0; flex-wrap: nowrap; justify-content: center; align-items: center; ` export const NavIndicator = styled(Link) ` margin: 0.2rem; border-radius: 50%; aspect-ratio: 1; width: 10px; border: 1px solid ${({ theme }) => theme.colors.primary}; background-color: ${props => props.active ? ({ theme }) => theme.invertButtons ? theme.colors.secondary : theme.colors.background : ({ theme }) => theme.colors.background}; &:hover { color: ${({ theme }) => theme.invertButtons ? theme.colors.text ? theme.colors.text : theme.colors.primary : theme.colors.secondary}; background-color: ${({ theme }) => theme.invertButtons ? theme.colors.secondary : theme.colors.background}; } `