-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove log * remove basemap selector from non necesary pages * add legend * import colors from settings * add responsive to legend * fix max width on tablet * fix responsive width
- Loading branch information
1 parent
56110d0
commit 1edc0fe
Showing
15 changed files
with
142 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from 'react'; | ||
|
||
import COLORS from 'styles/settings.scss'; | ||
|
||
import styles from './styles.module'; | ||
|
||
function LandcoverLegend() { | ||
const LEGEND_ITEMS = [ | ||
{ label: 'Water', color: COLORS.water }, | ||
{ label: 'Trees', color: COLORS.trees }, | ||
{ label: 'Flooded Vegetation', color: COLORS['flooded-vegetation'] }, | ||
{ label: 'Crops', color: COLORS.crops }, | ||
{ label: 'Built area', color: COLORS['built-area'] }, | ||
{ label: 'Bare ground', color: COLORS['bare-ground'] }, | ||
{ label: 'Snow/Ice', color: COLORS['snow-ice'] }, | ||
{ label: 'Clouds', color: COLORS.clouds }, | ||
{ label: 'Rangeland', color: COLORS.rangeland }, | ||
]; | ||
|
||
return ( | ||
<div className={styles.legendContainer}> | ||
<p className={styles.legendTitle}>Land cover types</p> | ||
<div className={styles.legendItems}> | ||
{LEGEND_ITEMS.map((item) => ( | ||
<div key={item.label} className={styles.legendItem}> | ||
<div | ||
className={styles.legendColor} | ||
style={{ backgroundColor: item.color }} | ||
/> | ||
<p className={styles.legendItemLabel}>{item.label}</p> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default LandcoverLegend; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Component from './component'; | ||
|
||
export default Component; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@import 'styles/settings'; | ||
@import 'styles/typography-extends'; | ||
|
||
.legendContainer { | ||
bottom: 28px; | ||
display: flex; | ||
flex-direction: column; | ||
height: 64px; | ||
position: absolute; | ||
left: $sidebar-width; | ||
margin-left: 46px; | ||
z-index: $default-z-index; | ||
max-width: 500px; | ||
@media #{$tablet-portrait} { | ||
bottom: 50px; | ||
max-width: 250px; | ||
} | ||
|
||
@media #{$tablet-landscape} { | ||
max-width: 400px; | ||
} | ||
|
||
|
||
@media #{$desktop} { | ||
bottom: 16px; | ||
max-width: none; | ||
} | ||
|
||
|
||
.legendTitle { | ||
@extend %annotation; | ||
color: $white; | ||
text-transform: uppercase; | ||
} | ||
|
||
.legendItems { | ||
display: flex; | ||
max-width: 550px; | ||
flex-wrap: wrap; | ||
height: 12px; | ||
|
||
@media #{$desktop} { | ||
max-width: 900px; | ||
} | ||
|
||
|
||
.legendItem { | ||
display: flex; | ||
align-items: center; | ||
margin-right: 10px; | ||
height: 12px; | ||
margin-bottom: 6px; | ||
|
||
@media #{$desktop} { | ||
margin-bottom: 0; | ||
} | ||
|
||
.legendColor { | ||
border-radius: 1px; | ||
opacity: 70%; | ||
width: 8px; | ||
height: 8px; | ||
margin-right: 4px; | ||
} | ||
.legendItemLabel { | ||
@extend %annotation; | ||
color: $white; | ||
white-space: nowrap; | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters