@@ -52,12 +57,15 @@ const CardSource = ({ source, isLoading, onClickHandler }) => {
: (
)}
diff --git a/src/components/presentational/Spinner.js b/src/components/presentational/Spinner.js
index 062bd83..f3c483c 100644
--- a/src/components/presentational/Spinner.js
+++ b/src/components/presentational/Spinner.js
@@ -1,8 +1,8 @@
import React from 'react';
-const Spinner = () => {
+const Spinner = ({ small }) => {
return (
-
+
diff --git a/src/js/utilities.js b/src/js/utilities.js
index e9692e2..4ba3755 100644
--- a/src/js/utilities.js
+++ b/src/js/utilities.js
@@ -72,3 +72,18 @@ export function formatterWithYear(datetime) {
export function formatter(datetime) {
return d3.timeFormat("%d %b, %H:%M")(datetime);
}
+
+/**
+ * Debugging function: put in place of a mapStateToProps function to
+ * view that source modal by default
+ */
+function injectSource(id) {
+ return state => ({
+ ...state,
+ app: {
+ ...state.app,
+ source: state.domain.sources[id]
+ }
+ })
+}
+
diff --git a/src/reducers/schema/sourceSchema.js b/src/reducers/schema/sourceSchema.js
index c465ba5..1b61ac0 100644
--- a/src/reducers/schema/sourceSchema.js
+++ b/src/reducers/schema/sourceSchema.js
@@ -2,11 +2,12 @@ import Joi from 'joi';
const sourceSchema = Joi.object().keys({
id: Joi.string().required(),
+ title: Joi.string().allow(''),
thumbnail: Joi.string().allow(''),
paths: Joi.array().required(),
type: Joi.string().allow(''),
- affil_1: Joi.string().allow(''),
- affil_2: Joi.string().allow(''),
+ // affil_1: Joi.string().allow(''),
+ // affil_2: Joi.string().allow(''),
url: Joi.string().allow(''),
desc: Joi.string().allow(''),
parent: Joi.string().allow(''),
diff --git a/src/scss/loading.scss b/src/scss/loading.scss
index 1fdcff6..063c622 100644
--- a/src/scss/loading.scss
+++ b/src/scss/loading.scss
@@ -42,6 +42,12 @@ https://github.com/tobiasahlin/SpinKit/blob/master/LICENSE
position: relative;
margin: 10px auto;
+
+ &.small {
+ width: 15px;
+ height: 15px;
+ margin: 5px 20px 5px 10px;
+ }
}
.double-bounce, .double-bounce-overlay {
diff --git a/src/scss/mediaoverlay.scss b/src/scss/mediaoverlay.scss
index 9046ba7..ae72493 100644
--- a/src/scss/mediaoverlay.scss
+++ b/src/scss/mediaoverlay.scss
@@ -48,34 +48,46 @@ $header-inset: 10px;
.mo-container {
background-color: rgba(239, 239, 239, 0.9);
- max-width: $panel-width;
- min-width: $panel-width;
- max-height: $panel-height;
- min-height: $panel-height;
+ // max-width: $panel-width;
+ // min-width: $panel-width;
+ // max-height: $panel-height;
+ // min-height: $panel-height;
display: flex;
flex-direction: column;
- justify-content: flex-start;
align-items: center;
+ height: 80vh;
+ max-width: 90vw;
+ box-shadow: 0 19px 19px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
.mo-media-container {
flex: 1;
display: flex;
+ flex-direction: column;
justify-content: center;
align-items: center;
}
}
.mo-media-container {
- // padding-top: 3*$header-inset;
font-family: "Lato", Helvetica, sans-serif;
- // max-height: $vimeo-height;
min-width: 100%;
- max-height: 500px;
+ max-height: 60vh;
+ overflow-y: auto;
.media-player {
width: 100%;
max-width: $vimeo-width;
}
+
+ .media-content {
+ display: flex;
+ flex-direction: column;
+ }
+
+ // NB: topcushion seems to be necessary with certain overflows..
+ &.topcushion {
+ padding-top: 150px;
+ }
}
.mo-meta-container {
@@ -144,16 +156,17 @@ $header-inset: 10px;
}
}
-.source-image-container {
- padding: 0 25px;
- overflow-y: scroll;
- height: 100%;
+.source-image-container, .source-text-container {
+ padding: 0 10em;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
.source-image, .source-video {
max-width: calc(100% - 20px);
max-height: 350px !important;
- height: 100%;
+ // height: 100%;
padding: 10px;
}
diff --git a/yarn.lock b/yarn.lock
index a455221..9f5e536 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3962,7 +3962,6 @@ lodash.tail@^4.1.1:
lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
- integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=
lodash@^4.0.0, lodash@^4.17.10, lodash@^4.17.3, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@~4.17.10:
version "4.17.11"
@@ -4036,6 +4035,10 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"
+marked@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/marked/-/marked-0.6.0.tgz#a18d01cfdcf8d15c3c455b71c8329e5e0f01faa1"
+
matcher@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/matcher/-/matcher-1.1.1.tgz#51d8301e138f840982b338b116bb0c09af62c1c2"
@@ -5244,7 +5247,6 @@ redux@^3.6.0:
redux@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5"
- integrity sha512-R7bAtSkk7nY6O/OYMVR9RiBI+XghjF9rlbl5806HJbQph0LJVHZrU5oaO4q70eUKiqMRqm4y07KLTlMZ2BlVmg==
dependencies:
loose-envify "^1.4.0"
symbol-observable "^1.2.0"
@@ -6403,7 +6405,6 @@ verror@1.10.0:
video-react@^0.13.1:
version "0.13.1"
resolved "https://registry.yarnpkg.com/video-react/-/video-react-0.13.1.tgz#5d0dc68748f9b12e118beea1998d6ae5f6cbd6ba"
- integrity sha512-AeGSpddfHv0UxeJztWUALYEjCdzXM1QdtQ5GD1VUd3vxcgwgIfB7EzFKcewRevSHHK8TDmjNksbvbWRobF/QeA==
dependencies:
classnames "^2.2.3"
lodash.throttle "^4.1.1"