diff --git a/src/components/InfoPopup.jsx b/src/components/InfoPopup.jsx index 445c83e..844bac2 100644 --- a/src/components/InfoPopup.jsx +++ b/src/components/InfoPopup.jsx @@ -1,75 +1,38 @@ import React from 'react' import copy from '../js/data/copy.json' -export default ({ app, methods }) => { +export default ({ ui, app, methods }) => { function renderIntro () { return copy[app.language].legend.default.intro.map(txt =>

{txt}

) } function renderCategoryColors () { - const colors = copy[app.language].legend.view2d.colors.slice(0) - colors.reverse() - return ( -
- {colors.map((color, idx) => { - return ( -
-
- {color.label} -
- ) - })} + const categories = Object.keys(ui.style.categories).filter(label => label !== 'default') + + return categories.map(category => ( +
+ + + +
+
{category}
+
- ) + )) } function renderView2DLegend () { return (
- +
+ +

{copy[app.language].legend.default.header}

+
{renderIntro()}
-
- - - - - - - +
{renderCategoryColors()}
-
- - - - - -
-
Comunicaciones
-
-
-
- - - -
-
Ataques
-
-
-
- - - - - - - -
-
Rutas de bus
-
-
) diff --git a/src/js/data/copy.json b/src/js/data/copy.json index 2722482..3e7f245 100644 --- a/src/js/data/copy.json +++ b/src/js/data/copy.json @@ -92,8 +92,11 @@ ] }, "default": { + "header": "Navigating the Platform", "intro": [ - "Each event represents an occurence that is distinct in either time, space, or both. An event is represented by a coloured circle on both the map and the timeline." + "Each event represents an occurence that is distinct in either time, space, or both. An event is represented by a coloured circle on both the map and the timeline.", + "Select an event to reveal its content and sources. You can filter events by category or other specified filters in the top left toolbar.", + "Narratives compose events to reveal logical threads that emerge from them. Transition to narrative mode by selecting a narrative from the top left dashboard icon." ] } }, diff --git a/src/scss/infopopup.scss b/src/scss/infopopup.scss index 5b75683..0552664 100644 --- a/src/scss/infopopup.scss +++ b/src/scss/infopopup.scss @@ -24,87 +24,108 @@ opacity: 0; } - .legend-section { - width: 300px; - padding-left: 60px; - height: 40px; - display: inline-block; - - svg { - width: 100px; - float: left; - display: inline-block; - } - - .legend-labels { - float: left; - display: inline-block; - width: calc(100% - 100px); - - .label { - display: block; - font-size: $xsmall; - margin-top: 10px; - margin-left: 10px; - - .color-category { - width: 8px; - height: 8px; - border-radius: 10px; - display: inline-block; - margin: 0px 5px 0 0; - } - } - } - - &:first-child { - .legend-labels .label { - margin-top: 0; - } - } + .legend { + display: flex; + flex-direction: column; } + .legend-header { + display: flex; + flex-direction: row; + h2 { + display: flex; + font-size: 12pt; + letter-spacing: 2px; + margin: 0; + } + } .side-menu-burg { position: absolute; right: 8px; top: 10px; } - .legend-item { - display: block; - width: 100%; - display: inline-block; - margin-bottom: 3px; - padding-left: 80px; - - .item-label { - line-height: 15px; - height: 15px; - font-size: $normal; - } - - .color-marker { - display: inline-block; - width: 15px; - height: 15px; - float: left; - margin: 0 10px 0 0; - border-radius: 15px; - - &.victims { background-color: #C90500; } - &.military { background-color: #319C31; } - &.nonstate { background-color: #AC28AC; } - &.state-police { background-color: #0000BF; } - &.iguala-municipal-police { background-color: #00558D; } - &.federal-police { background-color: #5756A2; } - &.huitzuco-municipal-police { background-color: #4ECAC1; } - &.cocula-municipal-police { background-color: #095959; } - &.ambulance { background-color: #ffffff; } - &.other { background-color: #D3CE2A; } - &.drivers { background-color: #822519; } - &.communications { background-color: #a6a6a6; } - &.GIEI { background-color: #ffffff; } - &.PGR { background-color: #000000; } - } + .legend-container { + height: 100%; + display: flex; + flex-direction: column; } + + .legend-section { + width: 300px; + // padding-left: 60px; + height: 25px; + display: flex; + align-items: center; + + svg { + width: 60px; + float: left; + display: inline-block; + } + + .legend-labels { + // float: lef; + display: flex; + + .label { + // display: block; + font-size: $xsmall; + // margin-top: 10px; + // margin-left: 10px; + + // .color-category { + // width: 8px; + // height: 8px; + // border-radius: 10px; + // display: inline-block; + // margin: 0px 5px 0 0; + // } + } + } + + // &:first-child { + // .legend-labels .label { + // margin-top: 0; + // } + // } + } + + // .legend-item { + // display: block; + // width: 100%; + // display: inline-block; + // margin-bottom: 3px; + // padding-left: 80px; + + // .item-label { + // line-height: 15px; + // height: 15px; + // font-size: $normal; + // } + + // .color-marker { + // display: inline-block; + // width: 15px; + // height: 15px; + // float: left; + // margin: 0 10px 0 0; + // border-radius: 15px; + + // &.victims { background-color: #C90500; } + // &.military { background-color: #319C31; } + // &.nonstate { background-color: #AC28AC; } + // &.state-police { background-color: #0000BF; } + // &.iguala-municipal-police { background-color: #00558D; } + // &.federal-police { background-color: #5756A2; } + // &.huitzuco-municipal-police { background-color: #4ECAC1; } + // &.cocula-municipal-police { background-color: #095959; } + // &.ambulance { background-color: #ffffff; } + // &.other { background-color: #D3CE2A; } + // &.drivers { background-color: #822519; } + // &.communications { background-color: #a6a6a6; } + // &.GIEI { background-color: #ffffff; } + // &.PGR { background-color: #000000; } + // } + // } }