Add hamburger menu for mobile & navbar fixes

This commit is contained in:
Jan Tuomi
2018-11-17 15:37:21 +02:00
parent b875cd52fa
commit 347bc37a87
5 changed files with 30 additions and 12 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
margin-top: 0.8rem;
position: absolute;
left: 0;
top: 40px;
top: 30px;
z-index: 10;
&,
+1 -1
View File
@@ -10,7 +10,7 @@ export enum IconType {
export interface IconProps {
name: IconType;
link: string;
link?: string;
}
export interface IconState {}
@@ -18,7 +18,7 @@ $border-width: 2px;
&::after {
content: "";
position: absolute;
bottom: -10px;
bottom: 5px;
left: 0;
width: 100%;
border-bottom: 4px solid $light-blue;
+24 -9
View File
@@ -11,21 +11,19 @@ $border-width: 2px;
color: $light-blue;
margin-left: 5rem;
@media screen and (max-width: 1200px - 1px) {
justify-content: flex-end;
}
a,
a:-webkit-any-link {
fill: $light-blue;
color: $light-blue;
}
&__item {
padding: 0.8rem 2rem;
transition: border-bottom 0.2s;
border-bottom: $border-width solid $dark-blue;
cursor: pointer;
color: $white;
&:hover {
border-bottom: $border-width solid $white;
.navbar-dropdown-container {
@media screen and (max-width: 1200px - 1px) {
display: none;
}
}
@@ -39,4 +37,21 @@ $border-width: 2px;
color: $white;
}
}
& .navigation-mobile {
display: flex;
margin: 0 1rem;
cursor: pointer;
@media screen and (min-width: 1200px) {
display: none;
}
svg {
width: 26px;
height: 26px;
fill: $white;
color: $white;
}
}
}
+3
View File
@@ -28,6 +28,9 @@ class Navigation extends React.Component<NavigationProps, NavigationState> {
<Icon name={IconType.Instagram} link="https://www.instagram.com/sahkoinsinoorikilta/" />
<Icon name={IconType.LinkedIn} link="https://www.linkedin.com/groups/8103057/" />
</div>
<div className="navigation-mobile">
<Icon name={IconType.HamburgerMenu} />
</div>
</div>
);
}