diff --git a/src/components/CardStack.jsx b/src/components/CardStack.jsx index 86d4b0e..6c04976 100644 --- a/src/components/CardStack.jsx +++ b/src/components/CardStack.jsx @@ -65,9 +65,16 @@ class CardStack extends React.Component { } render() { - if (this.props.selected.length > 0) { + const { isCardstack, isNarrative, selected } = this.props + if (selected.length > 0) { return ( -
+
{this.renderCardStackHeader()} {this.renderCardStackContent()}
diff --git a/src/components/Dashboard.jsx b/src/components/Dashboard.jsx index 9986768..370de79 100644 --- a/src/components/Dashboard.jsx +++ b/src/components/Dashboard.jsx @@ -78,6 +78,7 @@ class Dashboard extends React.Component { this.handleSelect([ narrative.steps[0] ]) this.props.actions.updateNarrative(narrative) } + moveInNarrative(amt) { const { current } = this.props.app.narrativeState const { narrative } = this.props.app diff --git a/src/scss/cardstack.scss b/src/scss/cardstack.scss index 1879969..90f3e77 100644 --- a/src/scss/cardstack.scss +++ b/src/scss/cardstack.scss @@ -1,7 +1,9 @@ @import 'burger'; @import 'card'; -$card-width: 500px; +$card-width: 370px; +$narrative-info-max-height: 250px; +$timeline-height: 170px; .card-stack { position: absolute; @@ -15,6 +17,13 @@ $card-width: 500px; color: white; -webkit-font-smoothing: antialiased; + &.narrative-mode { + right: auto; + left: 10px; + top: $narrative-info-max-height; + height: calc(100% - #{$narrative-info-max-height} - #{$timeline-height}); + } + &.full-height { max-height: calc(100% - 20px); } diff --git a/src/scss/narrativecard.scss b/src/scss/narrativecard.scss index 2987204..863b070 100644 --- a/src/scss/narrativecard.scss +++ b/src/scss/narrativecard.scss @@ -1,3 +1,5 @@ +$narrative-info-width: 370px; + /* NARRATIVE INFO */ @@ -6,10 +8,9 @@ NARRATIVE INFO top: 10px; left: 10px; // height: auto; - min-height: 500px; height: auto; max-height: 500px; - width: 370px; + width: $narrative-info-width; box-sizing: border-box; padding: 15px; max-height: calc(100% - 250px);