Added basic mobile Layout
This commit is contained in:
parent
7c7d60bab7
commit
635fd437da
6 changed files with 275 additions and 49 deletions
components/styles
|
@ -43,3 +43,8 @@ export const Footer = styled.footer`
|
|||
flex-grow: 1;
|
||||
}
|
||||
`
|
||||
|
||||
export const MobileFooter = styled(Footer)`
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
`
|
||||
|
|
|
@ -13,6 +13,61 @@ export const NavWrap = styled.div`
|
|||
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 <ActivePropType>`
|
||||
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 <ActivePropType>`
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
`
|
||||
|
||||
export const NavSideMenuButton = styled.button <ActivePropType>`
|
||||
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;
|
||||
|
@ -23,6 +78,10 @@ export const NavBar = styled.nav`
|
|||
align-items: center;
|
||||
`
|
||||
|
||||
export const NavBarMobile = styled(NavBar)`
|
||||
flex-direction: column;
|
||||
`
|
||||
|
||||
export const NavLink = styled(Link) <ActivePropType>`
|
||||
color: ${props => props.active ?
|
||||
({ theme }) => theme.invertButtons ?
|
||||
|
@ -44,6 +103,39 @@ export const NavLink = styled(Link) <ActivePropType>`
|
|||
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) <ActivePropType>`
|
||||
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 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue