Holtzman icon indicating copy to clipboard operation
Holtzman copied to clipboard

Definition of slider card margin should be dynamically defined

Open briankalwat opened this issue 8 years ago • 2 comments

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`
}

briankalwat avatar Aug 04 '16 14:08 briankalwat