-
-
{desc}
+
+
+ close
- {(type || date || url) ? (
-
-
- {type ?
Evidence type
: null}
- {type ?
perm_media{type}
: null}
-
-
- {date ?
Date Published
: null}
- {date ?
today{date}
: null}
-
-
-
- ) : null}
+
{shortenedTitle}
+
+
+ {this.props.translations ? this.props.translations.map((trans, idx) => (
+ this.state.transIdx !== idx + 1 ? (
+
this.switchToTrans(idx + 1)}>{trans.code}
+ ) : (
+
this.switchToTrans(0)}>EN
+ )
+ )) : null}
+
-
-
+
e.stopPropagation()}>
+
+ selectTypeFromPathWithPoster(p, poster))} viewmediaIdx={this.state.mediaIdx} />
+
+
+
+
+
+
+
+
+
+ {(type || date || url) ? (
+
+
+ {type ?
Evidence type
: null}
+ {type ?
perm_media{type}
: null}
+
+
+ {date ?
Date Published
: null}
+ {date ?
today{date}
: null}
+
+
+
+ ) : null}
+
+
+
)
}
@@ -94,12 +94,11 @@ class SourceOverlay extends React.Component {
if (typeof (this.props.source) !== 'object') {
return this.renderError()
}
- const { url, title, paths, date, type, desc, poster } = this.props.source
const { transIdx } = this.state
return (
- {this.renderContent(transIdx === 0 ? this.props.source : this.props.translations[transIdx-1])}
+ {this.renderContent(transIdx === 0 ? this.props.source : this.props.translations[transIdx - 1])}
)
}
diff --git a/src/components/presentational/Map/Events.jsx b/src/components/presentational/Map/Events.jsx
index e459240..9fc557d 100644
--- a/src/components/presentational/Map/Events.jsx
+++ b/src/components/presentational/Map/Events.jsx
@@ -9,16 +9,16 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
return [x, y]
}
- function renderBorder() {
+ function renderBorder () {
return (
{}
)
@@ -110,20 +110,20 @@ function MapEvents ({ getCategoryColor, categories, projectPoint, styleLocation,
const customStyles = styleLocation ? styleLocation(location) : null
const extraRender = (customStyles) ? customStyles[1] : null
- const isSelected = selected.reduce( (acc, event) => {
- return acc || (event.latitude == location.latitude && event.longitude == location.longitude)
+ const isSelected = selected.reduce((acc, event) => {
+ return acc || (event.latitude === location.latitude && event.longitude === location.longitude)
}, false)
return (
-
onSelect(location.events) : null}
- >
- {renderLocationSlicesByCategory(location)}
- {extraRender ? extraRender() : null}
- {isSelected ? null : renderBorder()}
-
+
onSelect(location.events) : null}
+ >
+ {renderLocationSlicesByCategory(location)}
+ {extraRender ? extraRender() : null}
+ {isSelected ? null : renderBorder()}
+
)
}
diff --git a/src/components/presentational/Timeline/ZoomControls.js b/src/components/presentational/Timeline/ZoomControls.js
index 98c2309..1e551f1 100644
--- a/src/components/presentational/Timeline/ZoomControls.js
+++ b/src/components/presentational/Timeline/ZoomControls.js
@@ -1,8 +1,8 @@
import React from 'react'
-function zoomIsActive(duration, extent) {
+function zoomIsActive (duration, extent) {
if (duration > 1570000 && extent > 1570000) {
- return true;
+ return true
}
return duration === extent
}
diff --git a/src/components/presentational/covers/TemplateCover.js b/src/components/presentational/covers/TemplateCover.js
index ed18dc7..c4b2c8c 100644
--- a/src/components/presentational/covers/TemplateCover.js
+++ b/src/components/presentational/covers/TemplateCover.js
@@ -1,11 +1,10 @@
import React from 'react'
-import { connect } from "react-redux"
+import { connect } from 'react-redux'
import MediaOverlay from '../../Overlay/Media'
const ReactMarkdown = require('react-markdown')
const MEDIA_HIDDEN = -2
-const MEDIA_HOWTO = -1
class TemplateCover extends React.Component {
constructor (props) {
@@ -15,10 +14,10 @@ class TemplateCover extends React.Component {
}
}
- getVideo(index, headerEndIndex) {
- if(index < headerEndIndex) {
+ getVideo (index, headerEndIndex) {
+ if (index < headerEndIndex) {
return this.props.cover.headerVideos[index]
- } else if(index >= 0) {
+ } else if (index >= 0) {
return this.props.cover.videos[index]
} else {
return null
@@ -30,7 +29,7 @@ class TemplateCover extends React.Component {
var video = this.getVideo(this.state.video, headerVideos.length || 0)
return (
-
+
{
this.props.cover.bgVideo ? (
@@ -41,7 +40,7 @@ class TemplateCover extends React.Component {
preload='auto'
className='fullscreen-bg__video'
>
-
+
) : null
@@ -55,17 +54,17 @@ class TemplateCover extends React.Component {
}
- {
- headerVideos ? (
-
- { headerVideos.slice(0,2).map( (media, index) => (
-
this.setState({ video: index })}>
- {media.buttonTitle}
-
- ) ) }
-
- ) : null
- }
+ {
+ headerVideos ? (
+
+ { headerVideos.slice(0, 2).map((media, index) => (
+
this.setState({ video: index })}>
+ {media.buttonTitle}
+
+ )) }
+
+ ) : null
+ }
EXPLORE
@@ -80,8 +79,8 @@ class TemplateCover extends React.Component {
{/* NOTE: only take first four videos, drop any others for style reasons */}
- { this.props.cover.videos.slice(0,4).map( (media, index) => (
-
this.setState({ video: index + (headerVideos.length || 0)})} >
+ { this.props.cover.videos.slice(0, 4).map((media, index) => (
+
this.setState({ video: index + (headerVideos.length || 0) })} >
{media.buttonTitle}
{media.buttonSubtitle}
)) }
@@ -92,29 +91,29 @@ class TemplateCover extends React.Component {
{
- this.state.video != MEDIA_HIDDEN ? (
-
this.setState({ video: MEDIA_HIDDEN })}
- />
- ) : null }
+ this.state.video !== MEDIA_HIDDEN ? (
+ this.setState({ video: MEDIA_HIDDEN })}
+ />
+ ) : null }
)
}
}
-function mapStateToProps(state) {
+function mapStateToProps (state) {
return {
- cover : state.app.cover
+ cover: state.app.cover
}
}
-export default connect(mapStateToProps) (TemplateCover);
+export default connect(mapStateToProps)(TemplateCover)