Skip to content

Commit

Permalink
correcting buttons and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
helemork committed Dec 13, 2023
1 parent 526eb41 commit 84d6fb8
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 100 deletions.
61 changes: 38 additions & 23 deletions src/HamburgerMeny/Utforsk/Utforsk.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import Menyelement from "../Menyelement";
import React from "react";
import { Landscape, ChevronRight } from "@material-ui/icons";
import { Pets, Landscape } from "@material-ui/icons";
import Naturvern from "../Naturvern";
import { useNavigate } from "react-router-dom";

Expand All @@ -13,46 +13,61 @@ const Utforsk = ({onToggleHovedMeny}) => {
}

return (
<div className="flexit">
<button className="secondary"
<>
<Menyelement
onClick={e => {
onElementClick("/Natur_i_Norge/Natursystem");
}}>
}}
icon={
<img
className="meny_ikon_image"
src="/logoer/natursystem_ikon.png"
alt=""
/>
Natursystem <ChevronRight/>
</button>
}
primary="Natursystem"
/>

<button className="secondary"
<Menyelement
onClick={e => {
onElementClick("/Natur_i_Norge/Landskap");
}}>
<Landscape />Landskap <ChevronRight/>
</button>
}}
icon={<Landscape />}
primary="Landskap"
/>

<button className="secondary"
<Menyelement
onClick={e => {
onElementClick("/Administrativ_grense");
}}>
<img
}}
icon={
<img
className="meny_ikon_image"
src="/logoer/fylke_ikon.png"
alt=""
/>Administrative grenser <ChevronRight/>
</button>

/>
}
primary="Administrative grenser"
/>

<button className="secondary"
<Menyelement
onClick={e => {
onElementClick("/Naturvernområde/");
}}>
<Naturvern />Naturvernområder<ChevronRight/>
</button>

</div>
}}
icon={<Naturvern />}
primary="Naturvernområder"
/>

{false && (
<Menyelement
onClick={e => {
onElementClick("/Biota/");
}}
icon={<Pets />}
primary="Arter"
/>
)}
</>
);
}

Expand Down
136 changes: 65 additions & 71 deletions src/style/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,6 @@
@import url("https://fonts.googleapis.com/css?family=Roboto+Condensed");
@import url("https://fonts.googleapis.com/css?family=Roboto");



/* Button system */

// Variables
$gap: $base-size;
$button-font-size: 16px;
$icon-size: 18px;
$border-radius: 30px;
$padding-horisontal: 22px;
$padding-vertical: 14px;
$border-width: 2px;
$focus-border-width: 3px;
$icon-button-size: 40px;
$focus-outline: $focus-border-width solid $focus-color;


button {
padding: $padding-vertical $padding-horisontal;
border-radius: $border-radius;
border-width: $border-width;
border-style: solid;
box-sizing: border-box;
font-size: $button-font-size;
line-height: $button-font-size;
margin: $gap;
margin-left: 0;
display: flex;
align-items: center;

}

button img,
button svg{
vertical-align: baseline;
margin-right: $gap;
font-size: inherit;
height:24px
}

.primary {
background: $primary-color;
border-color: $primary-color;
color: $white
}
.primary:hover,
.primary:active {
background: $primary-color-hover;
border-color: $primary-color-hover;
color: $white
}

.secondary {
background: $secondary-color;
border-color: $secondary-color;
}

.secondary:hover,
.secondary:active {
background: $secondary-color-hover;
border-color: $secondary-color-hover;
}




/* Allow click through of events
on overlying node we can't get rid of*/
body,
Expand Down Expand Up @@ -150,22 +84,83 @@ b {

/* ALL BUTTONS */

/* Button system */

// Variables
$gap: $base-size;
$button-font-size: 16px;
$icon-size: 18px;
$padding-horisontal: 22px;
$padding-vertical: 14px;
$border-width: 2px;
$focus-border-width: 3px;
$icon-button-size: 40px;
$focus-outline: $focus-border-width solid $focus-color;


button {
border: 0px;
padding: $padding-vertical $padding-horisontal;
border-radius: $border-button-radius;
border-width: $border-width;
border-style: solid;
box-sizing: border-box;
font-size: $button-font-size;
line-height: $button-font-size;
margin: $gap;
margin-left: 0;
display: flex;
align-items: center;
border-color: transparent;
}

button img,
button svg{
vertical-align: baseline;
margin-right: $gap;
font-size: inherit;
height:24px
}

.frontpage_link_items .menu_item,
.secondary {
background: $secondary-color;
border-color: $secondary-color;
}

.layerbutton{
background: transparent;
}

.layer_list_element.subelement .layerbutton:hover,
.layerbutton:hover,
button:hover,
button.active:hover,
button.active:focus,
button.active {
background: $secondary-color-hover;
border-color: $secondary-color-hover;
button.active,
.frontpage_link_items .menu_item:hover,
.layerbutton:hover,
.secondary:hover,
.secondary:active {
color: $body-color;
cursor: pointer;
background: $secondary-color-hover;
border-color: $secondary-color-hover;
}

.primary {
background: $primary-color;
border-color: $primary-color;
color: $white
}

.primary:hover,
.primary:active {
background: $primary-color-hover;
border-color: $primary-color-hover;
color: $white
}


.meny_ikon_image {
width: 20px;
height: 20px;
Expand Down Expand Up @@ -243,7 +238,6 @@ div {
border: 0;
margin: 0;
border-radius: 0;
outline: none;
display: flex;
justify-content: flex-start;
vertical-align: middle;
Expand Down
5 changes: 3 additions & 2 deletions src/style/Forside.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "./GraphicProfile.scss";

/* Container */
.frontpage {
width: 100%;
Expand Down Expand Up @@ -110,7 +111,7 @@
width: auto;
margin: 25px;
text-align: center;
border-radius: 3px;
border-radius: $border-button-radius;
position: relative;
}
@media only screen and (max-width: 768px) {
Expand Down Expand Up @@ -193,7 +194,7 @@
}

.frontpage_link_items .hamburger_menu_item div {
display: inline-block;
display: flex;
}

.frontpage_link_items .hamburger_menu_item .mobile_only {
Expand Down
3 changes: 2 additions & 1 deletion src/style/GraphicProfile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@ $searchbar-width: 300px;
$top-pad: 5px;
$top-icon-height: 40px;

$base-size:8px;
$base-size:8px;
$border-button-radius: 30px;;
10 changes: 7 additions & 3 deletions src/style/Kartlag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ button.breadcrumb:hover {
position: absolute;
right: 7px;
top: 1px;
background: none;
padding: 6px 0;
}

Expand Down Expand Up @@ -178,7 +177,6 @@ button.breadcrumb:hover {
width: 50px;
padding: 0;
padding-top: 0px;
background: white;
line-height: 50px;
margin-right: 2px;
padding-top: 7px;
Expand Down Expand Up @@ -207,8 +205,10 @@ button.breadcrumb:hover {
}

.layerbutton svg {
margin-left: auto;
margin-right: auto;
margin-top: auto;
margin-bottom: auto;
margin-bottom: 10px;
}

.kartlag_element_text {
Expand Down Expand Up @@ -389,3 +389,7 @@ button.breadcrumb:hover {
.lukkbartvindu .closetab {
z-index: 0;
}

.kartlag_element_buttons{
display: flex;
}

0 comments on commit 84d6fb8

Please sign in to comment.