diff --git a/package.json b/package.json index 1c4058e09..bfd1ef9de 100644 --- a/package.json +++ b/package.json @@ -118,9 +118,9 @@ "qs": "^5.2.0", "raf": "^3.2.0", "rc-slider": "^3.7.2", - "react": "^15.1.0", + "react": "^15.2.0", "react-addons-css-transition-group": "^15.2.0", - "react-addons-test-utils": "^0.14.0", + "react-addons-test-utils": "^15.2.0", "react-burger-menu": "^1.4.4", "react-dom": "^15.1.0", "react-flex-carousel": "^0.1.7", @@ -162,7 +162,7 @@ "chai": "^3.3.0", "chai-as-promised": "^5.1.0", "compression": "^1.6.0", - "eslint": "1.8.0", + "eslint": "1.10.3", "eslint-config-rackt": "^1.1.1", "eslint-loader": "^1.0.0", "eslint-plugin-babel": "^3.0.0", diff --git a/src/components/article/Audio.js b/src/components/article/Audio.js index 98e84d733..477647fc3 100644 --- a/src/components/article/Audio.js +++ b/src/components/article/Audio.js @@ -191,12 +191,12 @@ class Audio extends React.Component { } render() { - const { content } = this.props + const { content, device } = this.props const { duration, isFocused, isOncePlayed, isPlaying, seek } = this.state const { url, coverPhoto, title, description } = _.get(content, 0, {}) return ( -
+
+
{ +export const InfoBox = ({ content, device }) => { let infoBox = _.get(content, [ 0 ], {}) return (
-
+
-
+

{infoBox.title}

diff --git a/src/components/article/InfoBox.scss b/src/components/article/InfoBox.scss index fcba1eb0f..c364de883 100644 --- a/src/components/article/InfoBox.scss +++ b/src/components/article/InfoBox.scss @@ -3,7 +3,20 @@ @import '../../themes/font-mixins.scss'; @import '../../themes/media-queries.scss'; -.infoBoxContainer { +@include mq($max-width: $screen-xs-max) { + .infobox-text { + h4 { + font-size: rem(20); + line-height: 1.2; + } + >div { + font-size: rem(15); + line-height: 1.8; + } + } +} + +.infobox-container { $logo-width: rem(23); $logo-height: rem(24); background-color: $white; @@ -19,7 +32,7 @@ margin-top: -($logo-height / 2); } - .infoBoxText { + .infobox-text { padding: rem(36) rem(24) 0 rem(24); h4 { color: $gray-15; @@ -38,18 +51,11 @@ width: 100%; } } -} -@include mq($max-width: $screen-xs-max) { - .infoBoxText { - h4 { - font-size: rem(20); - line-height: 1.2; - } - - >div { - font-size: rem(15); - line-height: 1.8; + &.mobile { + .infobox-text { + @extend .infobox-text; } } } + diff --git a/src/components/article/slideshow/navigation.js b/src/components/article/slideshow/navigation.js index f2e4902ef..38ec1ffc1 100644 --- a/src/components/article/slideshow/navigation.js +++ b/src/components/article/slideshow/navigation.js @@ -1,4 +1,7 @@ 'use strict' +import classNames from 'classnames' +import disabledLeftNav from '../../../../static/asset/disabled-left-arrow.svg' +import disabledRightNav from '../../../../static/asset/disabled-right-arrow.svg' import leftNav from '../../../../static/asset/left-arrow.svg' import rightNav from '../../../../static/asset/right-arrow.svg' import styles from './navigation.scss' @@ -6,22 +9,22 @@ import React from 'react' const navigation = (props) => { - const { onSlideLeft, onSlideRight } = props + const { onSlideLeft, onSlideRight, isLeftNavDisabled, isRightNavDisabled } = props return ( ) diff --git a/src/components/article/slideshow/navigation.scss b/src/components/article/slideshow/navigation.scss index 9d29406eb..84d0c9145 100644 --- a/src/components/article/slideshow/navigation.scss +++ b/src/components/article/slideshow/navigation.scss @@ -15,6 +15,10 @@ left: 0; top: 0; bottom: 0; + + &.disabled { + cursor: auto; + } } .ss-right-nav { @@ -22,4 +26,8 @@ right: 0; top: 0; bottom: 0; + + &.disabled { + cursor: auto; + } } diff --git a/src/components/article/slideshow/slideshow.js b/src/components/article/slideshow/slideshow.js index c38c9978a..1585db41e 100644 --- a/src/components/article/slideshow/slideshow.js +++ b/src/components/article/slideshow/slideshow.js @@ -11,7 +11,7 @@ import Thumbnails from './thumbnails' import React, { Component } from 'react' // eslint-disable-line import UI_SETTING from '../../../constants/ui-settings' -export class Slideshow extends Component { +class Slideshow extends Component { constructor(props, context) { super(props, context) this.state = { @@ -109,9 +109,8 @@ export class Slideshow extends Component { render() { - const { content } = this.props + const { content, device } = this.props const { currentIndex } = this.state - // let items = this._prepareItemsForImageGallery(content) let { slides, thumbnails } = this._parseContent(content) let description = _.get(content, [ currentIndex, 'description' ], '') @@ -122,7 +121,7 @@ export class Slideshow extends Component { return (
this._slideshow = i} > @@ -144,6 +143,8 @@ export class Slideshow extends Component {
-
- -
+
diff --git a/static/asset/disabled-left-arrow.svg b/static/asset/disabled-left-arrow.svg new file mode 100755 index 000000000..43de8ab8d --- /dev/null +++ b/static/asset/disabled-left-arrow.svg @@ -0,0 +1,12 @@ + + + + icon-arrow-left + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/static/asset/disabled-right-arrow.svg b/static/asset/disabled-right-arrow.svg new file mode 100755 index 000000000..e85bda5aa --- /dev/null +++ b/static/asset/disabled-right-arrow.svg @@ -0,0 +1,12 @@ + + + + icon-arrow-right + Created with Sketch. + + + + + + + \ No newline at end of file