diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 22:19:14 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-06-21 22:19:14 +0200 |
| commit | f0983f54c7ea863855a0e035e784bf45f1e29c5b (patch) | |
| tree | 4857dda0dba9d945b4c1198fae4d054c681c2d98 /public/bundle.js | |
| parent | 32858022edf1142d2b05e98290d8cca9b6a8c87a (diff) | |
mobile css
Diffstat (limited to 'public/bundle.js')
| -rw-r--r-- | public/bundle.js | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/public/bundle.js b/public/bundle.js index e2ceee0..9e5f57a 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -5609,9 +5609,9 @@ NavLink.defaultProps = { Object.defineProperty(exports, "__esModule", { value: true }); -var isIphone = navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i); -var isIpad = navigator.userAgent.match(/iPad/i); -var isAndroid = navigator.userAgent.match(/Android/i); +var isIphone = !!navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i); +var isIpad = !!navigator.userAgent.match(/iPad/i); +var isAndroid = !!navigator.userAgent.match(/Android/i); var isMobile = isIphone || isIpad || isAndroid; var isDesktop = !isMobile; @@ -5748,6 +5748,12 @@ var _lethargy = __webpack_require__(53); var _reactRouterDom = __webpack_require__(22); +var _util = __webpack_require__(52); + +var _util2 = _interopRequireDefault(_util); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } @@ -5776,6 +5782,7 @@ var Scroller = function (_Component) { _createClass(Scroller, [{ key: 'onWheel', value: function onWheel(e) { + if (_util2.default.isMobile) return; e.preventDefault(); e.stopPropagation(); var scrollDirection = this.lethargy.check(e); @@ -5805,14 +5812,26 @@ var Scroller = function (_Component) { (0, _preact.h)( 'div', null, - painting.title, - (0, _preact.h)('br', null), - painting.medium, - (0, _preact.h)('br', null), - painting.date, - (0, _preact.h)('br', null), - painting.image.caption, - (0, _preact.h)('br', null), + (0, _preact.h)( + 'div', + null, + painting.title + ), + (0, _preact.h)( + 'div', + null, + painting.medium + ), + (0, _preact.h)( + 'div', + null, + painting.date + ), + (0, _preact.h)( + 'div', + null, + painting.image.caption + ), (0, _preact.h)('br', null), (0, _preact.h)( _reactRouterDom.Link, @@ -5887,11 +5906,22 @@ var Modal = function (_Component) { _createClass(Modal, [{ key: 'render', value: function render() { + if (this.props.visible) { + document.body.classList.add("inModal"); + } else { + document.body.classList.remove("inModal"); + } + var className = this.props.visible ? 'modal visible' : 'modal'; + return (0, _preact.h)( 'div', { 'class': className }, - this.props.children + (0, _preact.h)( + 'div', + { 'class': 'inner' }, + this.props.children + ) ); } }]); @@ -5943,6 +5973,7 @@ var Details = function (_Component) { value: function render() { var painting = this.props.painting; if (!painting) return; + var source_images = findImages(painting.parameters); var parameters = breakUpJSON(painting.parameters); return (0, _preact.h)( |
