Holtzman
Holtzman copied to clipboard
Definition of slider card margin should be dynamically defined
The margin values that are defined here should probably be dynamically generated from Junction so that they will always be consistent with the system as a whole.
https://github.com/NewSpring/Apollos/blob/master/sites/newspring/imports/pages/series/series.VideoList.jsx#L47
if (typeof window != "undefined" || window != null) {
let itemSize = (window.innerWidth - 40) * 0.8; // four-fifths
itemSize += 20; // account for margin
const items = this.props.sermons.content.sermons.length;
const width = (items * itemSize) + 40;
return {
width: `${width}px`
}