@mjhls/mjh-framework 1.0.271 → 1.0.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/{ADInfeed-0da6acd4.js → ADInfeed-f560c2f9.js} +1 -1
- package/dist/cjs/{AdSlot-93d892f5.js → AdSlot-f69a31ec.js} +1 -1
- package/dist/cjs/DeckContent.js +2 -2
- package/dist/cjs/Figure-fe3e9705.js +145 -0
- package/dist/cjs/{GridContent-524f2ad8.js → GridContent-8d5a738c.js} +1 -1
- package/dist/cjs/GridContent.js +3 -3
- package/dist/cjs/{Normal-2eec2d56.js → Normal-7ed9eee9.js} +41 -20
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/index.js +16 -157
- package/dist/esm/{ADInfeed-e546ea87.js → ADInfeed-a77b2850.js} +1 -1
- package/dist/esm/{AdSlot-9b4ae186.js → AdSlot-69bf3195.js} +1 -1
- package/dist/esm/DeckContent.js +2 -2
- package/dist/esm/Figure-d6e22818.js +140 -0
- package/dist/esm/{GridContent-f4fd38a7.js → GridContent-b8b5f361.js} +1 -1
- package/dist/esm/GridContent.js +3 -3
- package/dist/esm/{Normal-f90f9ca7.js → Normal-21cfb458.js} +41 -20
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/index.js +24 -165
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var React__default = _interopDefault(React);
|
|
7
7
|
var Card = _interopDefault(require('react-bootstrap/Card'));
|
|
8
8
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
9
|
-
var AdSlot = require('./AdSlot-
|
|
9
|
+
var AdSlot = require('./AdSlot-f69a31ec.js');
|
|
10
10
|
|
|
11
11
|
var ADInfeed = function ADInfeed(_ref) {
|
|
12
12
|
var index = _ref.index,
|
|
@@ -1114,7 +1114,7 @@ var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
|
1114
1114
|
}, 500);
|
|
1115
1115
|
|
|
1116
1116
|
var matchAd = function matchAd(element) {
|
|
1117
|
-
return slotId.includes(element);
|
|
1117
|
+
return slotId && slotId.includes(element);
|
|
1118
1118
|
};
|
|
1119
1119
|
|
|
1120
1120
|
return React__default.createElement(
|
package/dist/cjs/DeckContent.js
CHANGED
|
@@ -28,9 +28,9 @@ var index$1 = require('./index-39beccb3.js');
|
|
|
28
28
|
var index$2 = require('./index-fa0fb52c.js');
|
|
29
29
|
var entities = require('./entities-310b46ee.js');
|
|
30
30
|
require('./slicedToArray-e38fb29d.js');
|
|
31
|
-
require('./AdSlot-
|
|
31
|
+
require('./AdSlot-f69a31ec.js');
|
|
32
32
|
require('./promise-b96c61f8.js');
|
|
33
|
-
var ADInfeed = require('./ADInfeed-
|
|
33
|
+
var ADInfeed = require('./ADInfeed-f560c2f9.js');
|
|
34
34
|
|
|
35
35
|
var DeckContent = function (_React$Component) {
|
|
36
36
|
inherits$2._inherits(DeckContent, _React$Component);
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
+
|
|
5
|
+
require('./_commonjsHelpers-06173234.js');
|
|
6
|
+
require('./_to-object-329a650b.js');
|
|
7
|
+
require('./web.dom.iterable-0998bdc3.js');
|
|
8
|
+
require('./core.get-iterator-method-e049ca4a.js');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var React__default = _interopDefault(React);
|
|
11
|
+
var index$1 = require('./index-39beccb3.js');
|
|
12
|
+
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
13
|
+
var reactBootstrap = require('react-bootstrap');
|
|
14
|
+
|
|
15
|
+
var urlFor = function urlFor(source, client) {
|
|
16
|
+
var builder = index$1.imageUrlBuilder(client);
|
|
17
|
+
return builder.image(source).auto('format');
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var compareProps = function compareProps(prevProps, nextProps) {
|
|
21
|
+
if (nextProps.node.asset && nextProps.node.asset._ref) {
|
|
22
|
+
return prevProps.node.asset._ref === nextProps.node.asset._ref;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var FigureComponent = function FigureComponent(props) {
|
|
27
|
+
var _useState = React.useState(false),
|
|
28
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
29
|
+
openImg = _useState2[0],
|
|
30
|
+
setOpenImg = _useState2[1];
|
|
31
|
+
|
|
32
|
+
var _useState3 = React.useState(''),
|
|
33
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
34
|
+
openImgSrc = _useState4[0],
|
|
35
|
+
setOpenImgSrc = _useState4[1];
|
|
36
|
+
|
|
37
|
+
var node = props.node,
|
|
38
|
+
client = props.client;
|
|
39
|
+
var caption = node.caption,
|
|
40
|
+
alt = node.alt,
|
|
41
|
+
blank = node.blank,
|
|
42
|
+
link = node.link,
|
|
43
|
+
_node$alignment = node.alignment,
|
|
44
|
+
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
45
|
+
var _node$widthP = node.widthP,
|
|
46
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
if (typeof window === 'undefined') {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var screenWidth = window.innerWidth;
|
|
54
|
+
|
|
55
|
+
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
56
|
+
widthP = client.clientConfig.defaultImageSize;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var imageFloat = null;
|
|
60
|
+
if (screenWidth > 1000) {
|
|
61
|
+
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
62
|
+
imageFloat = align;
|
|
63
|
+
} else {
|
|
64
|
+
var _align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
65
|
+
imageFloat = _align;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var figureMargin = null;
|
|
69
|
+
if (imageFloat === 'none') {
|
|
70
|
+
figureMargin = '0 auto 1rem';
|
|
71
|
+
}
|
|
72
|
+
if (imageFloat === 'left') {
|
|
73
|
+
figureMargin = '0 1.5rem 1.5rem 0';
|
|
74
|
+
}
|
|
75
|
+
if (imageFloat === 'right') {
|
|
76
|
+
figureMargin = '0 0 1.5rem 1.5rem';
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var imageWidth = null;
|
|
80
|
+
if (screenWidth > 1000) {
|
|
81
|
+
if (widthP === 'auto') {
|
|
82
|
+
if (imageFloat === 'none') {
|
|
83
|
+
imageWidth = 'auto';
|
|
84
|
+
} else {
|
|
85
|
+
imageWidth = '30%';
|
|
86
|
+
}
|
|
87
|
+
} else {
|
|
88
|
+
imageWidth = widthP + '%';
|
|
89
|
+
}
|
|
90
|
+
} else {
|
|
91
|
+
imageWidth = '100%';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (!node.asset) return null;
|
|
95
|
+
|
|
96
|
+
return React__default.createElement(
|
|
97
|
+
React__default.Fragment,
|
|
98
|
+
null,
|
|
99
|
+
imageWidth !== null && imageFloat !== null && React__default.createElement(
|
|
100
|
+
reactBootstrap.Figure,
|
|
101
|
+
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imageFloat, margin: figureMargin } },
|
|
102
|
+
link ? React__default.createElement(
|
|
103
|
+
'a',
|
|
104
|
+
{ target: blank ? '_blank' : '_self', href: link },
|
|
105
|
+
React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', src: urlFor(node, client).url(), alt: alt && alt }),
|
|
106
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
107
|
+
) : React__default.createElement(
|
|
108
|
+
React__default.Fragment,
|
|
109
|
+
null,
|
|
110
|
+
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
111
|
+
style: { width: '100%' },
|
|
112
|
+
className: 'figure-image',
|
|
113
|
+
src: urlFor(node, client).url(),
|
|
114
|
+
alt: alt && alt,
|
|
115
|
+
onClick: function onClick() {
|
|
116
|
+
setOpenImgSrc(urlFor(node, client).url());
|
|
117
|
+
setOpenImg(true);
|
|
118
|
+
}
|
|
119
|
+
}),
|
|
120
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
121
|
+
)
|
|
122
|
+
),
|
|
123
|
+
React__default.createElement(
|
|
124
|
+
'div',
|
|
125
|
+
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
126
|
+
React__default.createElement('img', { src: openImgSrc }),
|
|
127
|
+
React__default.createElement('a', {
|
|
128
|
+
className: 'lightbox-close',
|
|
129
|
+
onClick: function onClick() {
|
|
130
|
+
setOpenImgSrc('');
|
|
131
|
+
setOpenImg(false);
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
),
|
|
135
|
+
React__default.createElement(
|
|
136
|
+
'style',
|
|
137
|
+
{ jsx: 'true' },
|
|
138
|
+
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
139
|
+
)
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
var Figure = React__default.memo(FigureComponent, compareProps);
|
|
144
|
+
|
|
145
|
+
exports.default = Figure;
|
|
@@ -21,7 +21,7 @@ var Router__default = _interopDefault(Router);
|
|
|
21
21
|
var index$1 = require('./index-39beccb3.js');
|
|
22
22
|
var index$2 = require('./index-fa0fb52c.js');
|
|
23
23
|
var entities = require('./entities-310b46ee.js');
|
|
24
|
-
var ADInfeed = require('./ADInfeed-
|
|
24
|
+
var ADInfeed = require('./ADInfeed-f560c2f9.js');
|
|
25
25
|
var get$1 = require('./get-1f91592f.js');
|
|
26
26
|
|
|
27
27
|
var Dfp = React__default.lazy(function () {
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -24,11 +24,11 @@ require('./index-39beccb3.js');
|
|
|
24
24
|
require('./index-fa0fb52c.js');
|
|
25
25
|
require('./entities-310b46ee.js');
|
|
26
26
|
require('./slicedToArray-e38fb29d.js');
|
|
27
|
-
require('./AdSlot-
|
|
27
|
+
require('./AdSlot-f69a31ec.js');
|
|
28
28
|
require('./promise-b96c61f8.js');
|
|
29
|
-
require('./ADInfeed-
|
|
29
|
+
require('./ADInfeed-f560c2f9.js');
|
|
30
30
|
require('./get-1f91592f.js');
|
|
31
|
-
var GridContent = require('./GridContent-
|
|
31
|
+
var GridContent = require('./GridContent-8d5a738c.js');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
@@ -13,7 +13,7 @@ var Row = _interopDefault(require('react-bootstrap/Row'));
|
|
|
13
13
|
var Col = _interopDefault(require('react-bootstrap/Col'));
|
|
14
14
|
var Link = _interopDefault(require('next/link'));
|
|
15
15
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
16
|
-
var AdSlot = require('./AdSlot-
|
|
16
|
+
var AdSlot = require('./AdSlot-f69a31ec.js');
|
|
17
17
|
var get$1 = require('./get-1f91592f.js');
|
|
18
18
|
var reactBootstrap = require('react-bootstrap');
|
|
19
19
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -1297,7 +1297,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
1297
1297
|
|
|
1298
1298
|
React.useEffect(function () {
|
|
1299
1299
|
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
1300
|
-
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
1301
1300
|
var adSection = document.querySelector('.AD728x90');
|
|
1302
1301
|
var stickyNav = window.addEventListener('scroll', function () {
|
|
1303
1302
|
if (window.pageYOffset > navOffsetTop) {
|
|
@@ -1306,7 +1305,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
1306
1305
|
navRef.current.style.top = 0;
|
|
1307
1306
|
navRef.current.style.width = '100%';
|
|
1308
1307
|
navRef.current.style.zIndex = '9999';
|
|
1309
|
-
adSection.style.marginTop = navOffsetHeight + 'px';
|
|
1310
1308
|
}
|
|
1311
1309
|
} else {
|
|
1312
1310
|
if (navRef.current && navRef.current.style) {
|
|
@@ -2071,7 +2069,6 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
2071
2069
|
|
|
2072
2070
|
React.useEffect(function () {
|
|
2073
2071
|
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
2074
|
-
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
2075
2072
|
var adSection = document.querySelector('.AD728x90');
|
|
2076
2073
|
var stickyNav = window.addEventListener('scroll', function () {
|
|
2077
2074
|
if (window.pageYOffset > navOffsetTop) {
|
|
@@ -2080,7 +2077,6 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
2080
2077
|
navRef.current.style.top = 0;
|
|
2081
2078
|
navRef.current.style.width = '100%';
|
|
2082
2079
|
navRef.current.style.zIndex = '9999';
|
|
2083
|
-
adSection.style.marginTop = navOffsetHeight + 'px';
|
|
2084
2080
|
}
|
|
2085
2081
|
} else {
|
|
2086
2082
|
if (navRef.current && navRef.current.style) {
|
|
@@ -2371,8 +2367,29 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
2371
2367
|
adTargeting = _useState4[0],
|
|
2372
2368
|
setTargeting = _useState4[1];
|
|
2373
2369
|
|
|
2370
|
+
var adRef = React.useRef(null);
|
|
2371
|
+
|
|
2374
2372
|
React.useEffect(function () {
|
|
2375
2373
|
if (window && window.innerWidth && window.innerWidth < 768) {
|
|
2374
|
+
var navbar = document.querySelector('.navbar');
|
|
2375
|
+
var AdOffsetTop = adRef.current.getBoundingClientRect().top;
|
|
2376
|
+
window.addEventListener('scroll', function () {
|
|
2377
|
+
if (window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
|
|
2378
|
+
if (adRef.current && adRef.current.style) {
|
|
2379
|
+
adRef.current.style.position = 'fixed';
|
|
2380
|
+
adRef.current.style.top = '60px';
|
|
2381
|
+
adRef.current.style.left = '0px';
|
|
2382
|
+
adRef.current.style.zIndex = '9999';
|
|
2383
|
+
adRef.current.style.width = '100%';
|
|
2384
|
+
adRef.current.style.marginTop = '2px';
|
|
2385
|
+
}
|
|
2386
|
+
} else {
|
|
2387
|
+
if (adRef.current && adRef.current.style) {
|
|
2388
|
+
adRef.current.style.position = 'relative';
|
|
2389
|
+
adRef.current.style.top = '';
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
});
|
|
2376
2393
|
setMobileView(true);
|
|
2377
2394
|
adTargeting['pos'] = pos && pos.length ? pos : 'top-mobile';
|
|
2378
2395
|
} else {
|
|
@@ -2384,21 +2401,25 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
2384
2401
|
var browserSizes = [[728, 90], [970, 90], [320, 50], [300, 50]];
|
|
2385
2402
|
var mobileSizes = [[320, 50], [300, 50]];
|
|
2386
2403
|
|
|
2387
|
-
return React__default.createElement(
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
sizes:
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2404
|
+
return React__default.createElement(
|
|
2405
|
+
'div',
|
|
2406
|
+
{ className: 'leaderboard-ad-wrapper', ref: adRef, style: { backgroundColor: '#fff' } },
|
|
2407
|
+
React__default.createElement(AdSlot.DFPAdSlot, {
|
|
2408
|
+
slotId: slotId,
|
|
2409
|
+
networkID: networkID,
|
|
2410
|
+
adUnit: adUnit,
|
|
2411
|
+
targeting: adTargeting,
|
|
2412
|
+
className: 'AD728x90',
|
|
2413
|
+
sizes: mobileView ? mobileSizes : browserSizes,
|
|
2414
|
+
sizeMapping: [{
|
|
2415
|
+
viewport: [768, 1],
|
|
2416
|
+
sizes: [[728, 90], [970, 90]]
|
|
2417
|
+
}, {
|
|
2418
|
+
viewport: [1, 1],
|
|
2419
|
+
sizes: [[320, 50], [300, 50]]
|
|
2420
|
+
}]
|
|
2421
|
+
})
|
|
2422
|
+
);
|
|
2402
2423
|
};
|
|
2403
2424
|
|
|
2404
2425
|
// Main
|
|
@@ -15,13 +15,13 @@ require('react-bootstrap/Row');
|
|
|
15
15
|
require('react-bootstrap/Col');
|
|
16
16
|
require('next/link');
|
|
17
17
|
require('./slicedToArray-e38fb29d.js');
|
|
18
|
-
require('./AdSlot-
|
|
18
|
+
require('./AdSlot-f69a31ec.js');
|
|
19
19
|
require('./promise-b96c61f8.js');
|
|
20
20
|
require('./get-1f91592f.js');
|
|
21
21
|
require('react-bootstrap');
|
|
22
22
|
require('./index.esm-340d3792.js');
|
|
23
23
|
require('react-bootstrap/Button');
|
|
24
|
-
var TemplateNormal = require('./Normal-
|
|
24
|
+
var TemplateNormal = require('./Normal-7ed9eee9.js');
|
|
25
25
|
require('react-bootstrap/ListGroup');
|
|
26
26
|
require('next/head');
|
|
27
27
|
require('react-bootstrap/Nav');
|
package/dist/cjs/index.js
CHANGED
|
@@ -30,12 +30,12 @@ var index$1 = require('./index-39beccb3.js');
|
|
|
30
30
|
require('./index-fa0fb52c.js');
|
|
31
31
|
var entities = require('./entities-310b46ee.js');
|
|
32
32
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
33
|
-
var AdSlot = require('./AdSlot-
|
|
33
|
+
var AdSlot = require('./AdSlot-f69a31ec.js');
|
|
34
34
|
require('./promise-b96c61f8.js');
|
|
35
|
-
require('./ADInfeed-
|
|
35
|
+
require('./ADInfeed-f560c2f9.js');
|
|
36
36
|
var DeckContent = require('./DeckContent.js');
|
|
37
37
|
require('./get-1f91592f.js');
|
|
38
|
-
var GridContent = require('./GridContent-
|
|
38
|
+
var GridContent = require('./GridContent-8d5a738c.js');
|
|
39
39
|
var DeckQueue = require('./DeckQueue.js');
|
|
40
40
|
require('react-bootstrap/Media');
|
|
41
41
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
@@ -54,7 +54,7 @@ var IssueDeck = require('./IssueDeck.js');
|
|
|
54
54
|
require('react-bootstrap/Badge');
|
|
55
55
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
56
56
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
57
|
-
var TemplateNormal = require('./Normal-
|
|
57
|
+
var TemplateNormal = require('./Normal-7ed9eee9.js');
|
|
58
58
|
require('react-bootstrap/ListGroup');
|
|
59
59
|
var Head = _interopDefault(require('next/head'));
|
|
60
60
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -67,6 +67,7 @@ require('react-bootstrap/Form');
|
|
|
67
67
|
require('react-bootstrap/FormControl');
|
|
68
68
|
var Modal = _interopDefault(require('react-bootstrap/Modal'));
|
|
69
69
|
var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
|
|
70
|
+
var dynamic = _interopDefault(require('next/dynamic'));
|
|
70
71
|
var Carousel = _interopDefault(require('react-bootstrap/Carousel'));
|
|
71
72
|
var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
|
|
72
73
|
var DropdownButton = _interopDefault(require('react-bootstrap/DropdownButton'));
|
|
@@ -3082,153 +3083,7 @@ var ADWelcome = function ADWelcome(_ref) {
|
|
|
3082
3083
|
);
|
|
3083
3084
|
};
|
|
3084
3085
|
|
|
3085
|
-
var urlFor$1 = function urlFor(source,
|
|
3086
|
-
var builder = index$1.imageUrlBuilder(client);
|
|
3087
|
-
return builder.image(source).auto('format');
|
|
3088
|
-
};
|
|
3089
|
-
|
|
3090
|
-
var FigureComponent = function FigureComponent(_ref) {
|
|
3091
|
-
var node = _ref.node,
|
|
3092
|
-
client = _ref.client;
|
|
3093
|
-
|
|
3094
|
-
var imgElement = React.useRef(null);
|
|
3095
|
-
|
|
3096
|
-
var _useState = React.useState(null),
|
|
3097
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
3098
|
-
imageWidth = _useState2[0],
|
|
3099
|
-
setimageWidth = _useState2[1];
|
|
3100
|
-
|
|
3101
|
-
var _useState3 = React.useState(null),
|
|
3102
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
3103
|
-
imgFloat = _useState4[0],
|
|
3104
|
-
setimgFloat = _useState4[1];
|
|
3105
|
-
|
|
3106
|
-
var _useState5 = React.useState(false),
|
|
3107
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
3108
|
-
openImg = _useState6[0],
|
|
3109
|
-
setOpenImg = _useState6[1];
|
|
3110
|
-
|
|
3111
|
-
var _useState7 = React.useState(''),
|
|
3112
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
3113
|
-
openImgSrc = _useState8[0],
|
|
3114
|
-
setOpenImgSrc = _useState8[1];
|
|
3115
|
-
|
|
3116
|
-
var caption = node.caption,
|
|
3117
|
-
alt = node.alt,
|
|
3118
|
-
blank = node.blank,
|
|
3119
|
-
link = node.link,
|
|
3120
|
-
_node$alignment = node.alignment,
|
|
3121
|
-
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
3122
|
-
var _node$widthP = node.widthP,
|
|
3123
|
-
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
3127
|
-
widthP = client.clientConfig.defaultImageSize;
|
|
3128
|
-
}
|
|
3129
|
-
|
|
3130
|
-
var figureMargin = void 0;
|
|
3131
|
-
if (imgFloat === 'none') {
|
|
3132
|
-
figureMargin = '0 auto 1rem';
|
|
3133
|
-
}
|
|
3134
|
-
if (imgFloat === 'left') {
|
|
3135
|
-
figureMargin = '0 1.5rem 1.5rem 0';
|
|
3136
|
-
}
|
|
3137
|
-
if (imgFloat === 'right') {
|
|
3138
|
-
figureMargin = '0 0 1.5rem 1.5rem';
|
|
3139
|
-
}
|
|
3140
|
-
|
|
3141
|
-
var loadImg = function loadImg() {
|
|
3142
|
-
var screenWidth = window.innerWidth;
|
|
3143
|
-
if (screenWidth > 1000) {
|
|
3144
|
-
if (widthP === 'auto') {
|
|
3145
|
-
if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
|
|
3146
|
-
} else {
|
|
3147
|
-
setimageWidth(widthP + '%');
|
|
3148
|
-
}
|
|
3149
|
-
} else {
|
|
3150
|
-
setimageWidth('100%');
|
|
3151
|
-
}
|
|
3152
|
-
};
|
|
3153
|
-
|
|
3154
|
-
React.useEffect(function () {
|
|
3155
|
-
var screenWidth = window.innerWidth;
|
|
3156
|
-
if (screenWidth > 1000) {
|
|
3157
|
-
if (widthP === 'auto') {
|
|
3158
|
-
if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
|
|
3159
|
-
} else {
|
|
3160
|
-
setimageWidth(widthP + '%');
|
|
3161
|
-
}
|
|
3162
|
-
} else {
|
|
3163
|
-
setimageWidth('100%');
|
|
3164
|
-
}
|
|
3165
|
-
}, [widthP, imgFloat]);
|
|
3166
|
-
|
|
3167
|
-
React.useEffect(function () {
|
|
3168
|
-
var screenWidth = window.innerWidth;
|
|
3169
|
-
if (screenWidth > 1000) {
|
|
3170
|
-
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
3171
|
-
setimgFloat(align);
|
|
3172
|
-
} else {
|
|
3173
|
-
var _align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
3174
|
-
setimgFloat(_align);
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3178
|
-
}, []);
|
|
3179
|
-
|
|
3180
|
-
if (!node.asset) return null;
|
|
3181
|
-
|
|
3182
|
-
return React__default.createElement(
|
|
3183
|
-
React__default.Fragment,
|
|
3184
|
-
null,
|
|
3185
|
-
imageWidth && imgFloat && React__default.createElement(
|
|
3186
|
-
reactBootstrap.Figure,
|
|
3187
|
-
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imgFloat, margin: figureMargin } },
|
|
3188
|
-
link ? React__default.createElement(
|
|
3189
|
-
'a',
|
|
3190
|
-
{ target: blank ? '_blank' : '_self', href: link },
|
|
3191
|
-
React__default.createElement(reactBootstrap.Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node, client).url(), alt: alt && alt }),
|
|
3192
|
-
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
3193
|
-
) : React__default.createElement(
|
|
3194
|
-
React__default.Fragment,
|
|
3195
|
-
null,
|
|
3196
|
-
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
3197
|
-
style: { width: '100%' },
|
|
3198
|
-
className: 'figure-image',
|
|
3199
|
-
ref: imgElement,
|
|
3200
|
-
onLoad: loadImg,
|
|
3201
|
-
src: urlFor$1(node, client).url(),
|
|
3202
|
-
alt: alt && alt,
|
|
3203
|
-
onClick: function onClick() {
|
|
3204
|
-
setOpenImgSrc(urlFor$1(node, client).url());
|
|
3205
|
-
setOpenImg(true);
|
|
3206
|
-
}
|
|
3207
|
-
}),
|
|
3208
|
-
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
3209
|
-
)
|
|
3210
|
-
),
|
|
3211
|
-
React__default.createElement(
|
|
3212
|
-
'div',
|
|
3213
|
-
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
3214
|
-
React__default.createElement('img', { src: openImgSrc }),
|
|
3215
|
-
React__default.createElement('a', {
|
|
3216
|
-
className: 'lightbox-close',
|
|
3217
|
-
onClick: function onClick() {
|
|
3218
|
-
setOpenImgSrc('');
|
|
3219
|
-
setOpenImg(false);
|
|
3220
|
-
}
|
|
3221
|
-
})
|
|
3222
|
-
),
|
|
3223
|
-
React__default.createElement(
|
|
3224
|
-
'style',
|
|
3225
|
-
{ jsx: 'true' },
|
|
3226
|
-
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
3227
|
-
)
|
|
3228
|
-
);
|
|
3229
|
-
};
|
|
3230
|
-
|
|
3231
|
-
var urlFor$2 = function urlFor(source, builder) {
|
|
3086
|
+
var urlFor$1 = function urlFor(source, builder) {
|
|
3232
3087
|
return builder.image(source).auto('format');
|
|
3233
3088
|
};
|
|
3234
3089
|
|
|
@@ -3279,7 +3134,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3279
3134
|
return React__default.createElement(
|
|
3280
3135
|
reactBootstrap.Carousel.Item,
|
|
3281
3136
|
{ key: slide._key },
|
|
3282
|
-
React__default.createElement('img', { src: slide.asset && urlFor$
|
|
3137
|
+
React__default.createElement('img', { src: slide.asset && urlFor$1(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
|
|
3283
3138
|
slide.caption && React__default.createElement(
|
|
3284
3139
|
'p',
|
|
3285
3140
|
{ className: 'p-2' },
|
|
@@ -13522,7 +13377,7 @@ var Leads = function Leads(_ref) {
|
|
|
13522
13377
|
);
|
|
13523
13378
|
};
|
|
13524
13379
|
|
|
13525
|
-
var urlFor$
|
|
13380
|
+
var urlFor$2 = function urlFor(source, client) {
|
|
13526
13381
|
var builder = index$1.imageUrlBuilder(client);
|
|
13527
13382
|
return builder.image(source).auto('format');
|
|
13528
13383
|
};
|
|
@@ -13576,7 +13431,7 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
13576
13431
|
React__default.createElement(
|
|
13577
13432
|
'a',
|
|
13578
13433
|
{ href: slide.slideshowImage.link && slide.slideshowImage.link, target: slide.slideshowImage.blank ? '_blank' : '_self' },
|
|
13579
|
-
React__default.createElement('img', { src: urlFor$
|
|
13434
|
+
React__default.createElement('img', { src: urlFor$2(slide.slideshowImage, client).url(), alt: slide.slideshowImage.alt || 'slideshow image', style: { width: '100%' } })
|
|
13580
13435
|
),
|
|
13581
13436
|
React__default.createElement(
|
|
13582
13437
|
'div',
|
|
@@ -13614,6 +13469,10 @@ var NativeAd = function NativeAd(props) {
|
|
|
13614
13469
|
);
|
|
13615
13470
|
};
|
|
13616
13471
|
|
|
13472
|
+
var Figure = dynamic(function () {
|
|
13473
|
+
return new Promise(function (resolve) { resolve(require('./Figure-fe3e9705.js')); });
|
|
13474
|
+
}, { ssr: false });
|
|
13475
|
+
|
|
13617
13476
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
13618
13477
|
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)/i.test(url)) {
|
|
13619
13478
|
return true;
|
|
@@ -13669,7 +13528,7 @@ var getSerializers = function getSerializers() {
|
|
|
13669
13528
|
figure: function figure(_ref3) {
|
|
13670
13529
|
var node = _ref3.node;
|
|
13671
13530
|
|
|
13672
|
-
return React__default.createElement(
|
|
13531
|
+
return React__default.createElement(Figure, { node: node, client: client });
|
|
13673
13532
|
},
|
|
13674
13533
|
slideshow: function slideshow(_ref4) {
|
|
13675
13534
|
var node = _ref4.node;
|
|
@@ -13977,13 +13836,13 @@ var SetCookie = function SetCookie(key, value) {
|
|
|
13977
13836
|
js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
|
|
13978
13837
|
};
|
|
13979
13838
|
|
|
13980
|
-
var urlFor$
|
|
13839
|
+
var urlFor$3 = function urlFor(source, client) {
|
|
13981
13840
|
var builder = index$1.imageUrlBuilder(client);
|
|
13982
13841
|
return builder.image(source).auto('format');
|
|
13983
13842
|
};
|
|
13984
13843
|
|
|
13985
13844
|
var renderCardImage = function renderCardImage(thumbnail, client, imageHeight, imageWidth) {
|
|
13986
|
-
var url = urlFor$
|
|
13845
|
+
var url = urlFor$3(thumbnail, client);
|
|
13987
13846
|
if (imageHeight) url = url.height(imageHeight);
|
|
13988
13847
|
if (imageWidth) url = url.width(imageWidth);
|
|
13989
13848
|
return url.url();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState } from 'react';
|
|
2
2
|
import Card from 'react-bootstrap/Card';
|
|
3
3
|
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
4
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
4
|
+
import { D as DFPAdSlot } from './AdSlot-69bf3195.js';
|
|
5
5
|
|
|
6
6
|
var ADInfeed = function ADInfeed(_ref) {
|
|
7
7
|
var index = _ref.index,
|
|
@@ -1109,7 +1109,7 @@ var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
|
1109
1109
|
}, 500);
|
|
1110
1110
|
|
|
1111
1111
|
var matchAd = function matchAd(element) {
|
|
1112
|
-
return slotId.includes(element);
|
|
1112
|
+
return slotId && slotId.includes(element);
|
|
1113
1113
|
};
|
|
1114
1114
|
|
|
1115
1115
|
return React__default.createElement(
|
package/dist/esm/DeckContent.js
CHANGED
|
@@ -22,9 +22,9 @@ import { i as imageUrlBuilder } from './index-3849e3fe.js';
|
|
|
22
22
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
23
23
|
import { c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
24
|
import './slicedToArray-d0a9593a.js';
|
|
25
|
-
import './AdSlot-
|
|
25
|
+
import './AdSlot-69bf3195.js';
|
|
26
26
|
import './promise-683a9c54.js';
|
|
27
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
27
|
+
import { A as ADInfeed } from './ADInfeed-a77b2850.js';
|
|
28
28
|
|
|
29
29
|
var DeckContent = function (_React$Component) {
|
|
30
30
|
_inherits(DeckContent, _React$Component);
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import './_to-object-b9b796ec.js';
|
|
3
|
+
import './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import './core.get-iterator-method-31c1fb1a.js';
|
|
5
|
+
import React__default, { useState } from 'react';
|
|
6
|
+
import { i as imageUrlBuilder } from './index-3849e3fe.js';
|
|
7
|
+
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
8
|
+
import { Figure as Figure$1 } from 'react-bootstrap';
|
|
9
|
+
|
|
10
|
+
var urlFor = function urlFor(source, client) {
|
|
11
|
+
var builder = imageUrlBuilder(client);
|
|
12
|
+
return builder.image(source).auto('format');
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var compareProps = function compareProps(prevProps, nextProps) {
|
|
16
|
+
if (nextProps.node.asset && nextProps.node.asset._ref) {
|
|
17
|
+
return prevProps.node.asset._ref === nextProps.node.asset._ref;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var FigureComponent = function FigureComponent(props) {
|
|
22
|
+
var _useState = useState(false),
|
|
23
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
24
|
+
openImg = _useState2[0],
|
|
25
|
+
setOpenImg = _useState2[1];
|
|
26
|
+
|
|
27
|
+
var _useState3 = useState(''),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
openImgSrc = _useState4[0],
|
|
30
|
+
setOpenImgSrc = _useState4[1];
|
|
31
|
+
|
|
32
|
+
var node = props.node,
|
|
33
|
+
client = props.client;
|
|
34
|
+
var caption = node.caption,
|
|
35
|
+
alt = node.alt,
|
|
36
|
+
blank = node.blank,
|
|
37
|
+
link = node.link,
|
|
38
|
+
_node$alignment = node.alignment,
|
|
39
|
+
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
40
|
+
var _node$widthP = node.widthP,
|
|
41
|
+
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
if (typeof window === 'undefined') {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
var screenWidth = window.innerWidth;
|
|
49
|
+
|
|
50
|
+
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
51
|
+
widthP = client.clientConfig.defaultImageSize;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var imageFloat = null;
|
|
55
|
+
if (screenWidth > 1000) {
|
|
56
|
+
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
57
|
+
imageFloat = align;
|
|
58
|
+
} else {
|
|
59
|
+
var _align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
60
|
+
imageFloat = _align;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
var figureMargin = null;
|
|
64
|
+
if (imageFloat === 'none') {
|
|
65
|
+
figureMargin = '0 auto 1rem';
|
|
66
|
+
}
|
|
67
|
+
if (imageFloat === 'left') {
|
|
68
|
+
figureMargin = '0 1.5rem 1.5rem 0';
|
|
69
|
+
}
|
|
70
|
+
if (imageFloat === 'right') {
|
|
71
|
+
figureMargin = '0 0 1.5rem 1.5rem';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var imageWidth = null;
|
|
75
|
+
if (screenWidth > 1000) {
|
|
76
|
+
if (widthP === 'auto') {
|
|
77
|
+
if (imageFloat === 'none') {
|
|
78
|
+
imageWidth = 'auto';
|
|
79
|
+
} else {
|
|
80
|
+
imageWidth = '30%';
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
imageWidth = widthP + '%';
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
imageWidth = '100%';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!node.asset) return null;
|
|
90
|
+
|
|
91
|
+
return React__default.createElement(
|
|
92
|
+
React__default.Fragment,
|
|
93
|
+
null,
|
|
94
|
+
imageWidth !== null && imageFloat !== null && React__default.createElement(
|
|
95
|
+
Figure$1,
|
|
96
|
+
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imageFloat, margin: figureMargin } },
|
|
97
|
+
link ? React__default.createElement(
|
|
98
|
+
'a',
|
|
99
|
+
{ target: blank ? '_blank' : '_self', href: link },
|
|
100
|
+
React__default.createElement(Figure$1.Image, { style: { width: '100%' }, className: 'figure-image', src: urlFor(node, client).url(), alt: alt && alt }),
|
|
101
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
102
|
+
) : React__default.createElement(
|
|
103
|
+
React__default.Fragment,
|
|
104
|
+
null,
|
|
105
|
+
React__default.createElement(Figure$1.Image, {
|
|
106
|
+
style: { width: '100%' },
|
|
107
|
+
className: 'figure-image',
|
|
108
|
+
src: urlFor(node, client).url(),
|
|
109
|
+
alt: alt && alt,
|
|
110
|
+
onClick: function onClick() {
|
|
111
|
+
setOpenImgSrc(urlFor(node, client).url());
|
|
112
|
+
setOpenImg(true);
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
116
|
+
)
|
|
117
|
+
),
|
|
118
|
+
React__default.createElement(
|
|
119
|
+
'div',
|
|
120
|
+
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
121
|
+
React__default.createElement('img', { src: openImgSrc }),
|
|
122
|
+
React__default.createElement('a', {
|
|
123
|
+
className: 'lightbox-close',
|
|
124
|
+
onClick: function onClick() {
|
|
125
|
+
setOpenImgSrc('');
|
|
126
|
+
setOpenImg(false);
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
),
|
|
130
|
+
React__default.createElement(
|
|
131
|
+
'style',
|
|
132
|
+
{ jsx: 'true' },
|
|
133
|
+
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
var Figure = React__default.memo(FigureComponent, compareProps);
|
|
139
|
+
|
|
140
|
+
export default Figure;
|
|
@@ -15,7 +15,7 @@ import { withRouter } from 'next/router';
|
|
|
15
15
|
import { i as imageUrlBuilder } from './index-3849e3fe.js';
|
|
16
16
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
17
17
|
import { c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
18
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
18
|
+
import { A as ADInfeed } from './ADInfeed-a77b2850.js';
|
|
19
19
|
import { g as get_1 } from './get-b2201dc8.js';
|
|
20
20
|
|
|
21
21
|
var Dfp = React__default.lazy(function () {
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -22,8 +22,8 @@ import './index-3849e3fe.js';
|
|
|
22
22
|
import './index-5f9f807a.js';
|
|
23
23
|
import './entities-7cc3bf45.js';
|
|
24
24
|
import './slicedToArray-d0a9593a.js';
|
|
25
|
-
import './AdSlot-
|
|
25
|
+
import './AdSlot-69bf3195.js';
|
|
26
26
|
import './promise-683a9c54.js';
|
|
27
|
-
import './ADInfeed-
|
|
27
|
+
import './ADInfeed-a77b2850.js';
|
|
28
28
|
import './get-b2201dc8.js';
|
|
29
|
-
export { G as default } from './GridContent-
|
|
29
|
+
export { G as default } from './GridContent-b8b5f361.js';
|
|
@@ -8,7 +8,7 @@ import Row from 'react-bootstrap/Row';
|
|
|
8
8
|
import Col from 'react-bootstrap/Col';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
11
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
11
|
+
import { D as DFPAdSlot } from './AdSlot-69bf3195.js';
|
|
12
12
|
import { g as get_1 } from './get-b2201dc8.js';
|
|
13
13
|
import { Dropdown } from 'react-bootstrap';
|
|
14
14
|
import { G as GenIcon, b as IoMdLogIn, c as IoIosHome } from './index.esm-536609db.js';
|
|
@@ -1292,7 +1292,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
1292
1292
|
|
|
1293
1293
|
useEffect(function () {
|
|
1294
1294
|
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
1295
|
-
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
1296
1295
|
var adSection = document.querySelector('.AD728x90');
|
|
1297
1296
|
var stickyNav = window.addEventListener('scroll', function () {
|
|
1298
1297
|
if (window.pageYOffset > navOffsetTop) {
|
|
@@ -1301,7 +1300,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
1301
1300
|
navRef.current.style.top = 0;
|
|
1302
1301
|
navRef.current.style.width = '100%';
|
|
1303
1302
|
navRef.current.style.zIndex = '9999';
|
|
1304
|
-
adSection.style.marginTop = navOffsetHeight + 'px';
|
|
1305
1303
|
}
|
|
1306
1304
|
} else {
|
|
1307
1305
|
if (navRef.current && navRef.current.style) {
|
|
@@ -2066,7 +2064,6 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
2066
2064
|
|
|
2067
2065
|
useEffect(function () {
|
|
2068
2066
|
var navOffsetTop = navRef.current.getBoundingClientRect().top;
|
|
2069
|
-
var navOffsetHeight = navRef.current.getBoundingClientRect().height;
|
|
2070
2067
|
var adSection = document.querySelector('.AD728x90');
|
|
2071
2068
|
var stickyNav = window.addEventListener('scroll', function () {
|
|
2072
2069
|
if (window.pageYOffset > navOffsetTop) {
|
|
@@ -2075,7 +2072,6 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
2075
2072
|
navRef.current.style.top = 0;
|
|
2076
2073
|
navRef.current.style.width = '100%';
|
|
2077
2074
|
navRef.current.style.zIndex = '9999';
|
|
2078
|
-
adSection.style.marginTop = navOffsetHeight + 'px';
|
|
2079
2075
|
}
|
|
2080
2076
|
} else {
|
|
2081
2077
|
if (navRef.current && navRef.current.style) {
|
|
@@ -2366,8 +2362,29 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
2366
2362
|
adTargeting = _useState4[0],
|
|
2367
2363
|
setTargeting = _useState4[1];
|
|
2368
2364
|
|
|
2365
|
+
var adRef = useRef(null);
|
|
2366
|
+
|
|
2369
2367
|
useEffect(function () {
|
|
2370
2368
|
if (window && window.innerWidth && window.innerWidth < 768) {
|
|
2369
|
+
var navbar = document.querySelector('.navbar');
|
|
2370
|
+
var AdOffsetTop = adRef.current.getBoundingClientRect().top;
|
|
2371
|
+
window.addEventListener('scroll', function () {
|
|
2372
|
+
if (window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
|
|
2373
|
+
if (adRef.current && adRef.current.style) {
|
|
2374
|
+
adRef.current.style.position = 'fixed';
|
|
2375
|
+
adRef.current.style.top = '60px';
|
|
2376
|
+
adRef.current.style.left = '0px';
|
|
2377
|
+
adRef.current.style.zIndex = '9999';
|
|
2378
|
+
adRef.current.style.width = '100%';
|
|
2379
|
+
adRef.current.style.marginTop = '2px';
|
|
2380
|
+
}
|
|
2381
|
+
} else {
|
|
2382
|
+
if (adRef.current && adRef.current.style) {
|
|
2383
|
+
adRef.current.style.position = 'relative';
|
|
2384
|
+
adRef.current.style.top = '';
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
});
|
|
2371
2388
|
setMobileView(true);
|
|
2372
2389
|
adTargeting['pos'] = pos && pos.length ? pos : 'top-mobile';
|
|
2373
2390
|
} else {
|
|
@@ -2379,21 +2396,25 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
2379
2396
|
var browserSizes = [[728, 90], [970, 90], [320, 50], [300, 50]];
|
|
2380
2397
|
var mobileSizes = [[320, 50], [300, 50]];
|
|
2381
2398
|
|
|
2382
|
-
return React__default.createElement(
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
sizes:
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2399
|
+
return React__default.createElement(
|
|
2400
|
+
'div',
|
|
2401
|
+
{ className: 'leaderboard-ad-wrapper', ref: adRef, style: { backgroundColor: '#fff' } },
|
|
2402
|
+
React__default.createElement(DFPAdSlot, {
|
|
2403
|
+
slotId: slotId,
|
|
2404
|
+
networkID: networkID,
|
|
2405
|
+
adUnit: adUnit,
|
|
2406
|
+
targeting: adTargeting,
|
|
2407
|
+
className: 'AD728x90',
|
|
2408
|
+
sizes: mobileView ? mobileSizes : browserSizes,
|
|
2409
|
+
sizeMapping: [{
|
|
2410
|
+
viewport: [768, 1],
|
|
2411
|
+
sizes: [[728, 90], [970, 90]]
|
|
2412
|
+
}, {
|
|
2413
|
+
viewport: [1, 1],
|
|
2414
|
+
sizes: [[320, 50], [300, 50]]
|
|
2415
|
+
}]
|
|
2416
|
+
})
|
|
2417
|
+
);
|
|
2397
2418
|
};
|
|
2398
2419
|
|
|
2399
2420
|
// Main
|
|
@@ -13,13 +13,13 @@ import 'react-bootstrap/Row';
|
|
|
13
13
|
import 'react-bootstrap/Col';
|
|
14
14
|
import 'next/link';
|
|
15
15
|
import './slicedToArray-d0a9593a.js';
|
|
16
|
-
import './AdSlot-
|
|
16
|
+
import './AdSlot-69bf3195.js';
|
|
17
17
|
import './promise-683a9c54.js';
|
|
18
18
|
import './get-b2201dc8.js';
|
|
19
19
|
import 'react-bootstrap';
|
|
20
20
|
import './index.esm-536609db.js';
|
|
21
21
|
import 'react-bootstrap/Button';
|
|
22
|
-
export { T as default } from './Normal-
|
|
22
|
+
export { T as default } from './Normal-21cfb458.js';
|
|
23
23
|
import 'react-bootstrap/ListGroup';
|
|
24
24
|
import 'next/head';
|
|
25
25
|
import 'react-bootstrap/Nav';
|
package/dist/esm/index.js
CHANGED
|
@@ -22,13 +22,13 @@ import { i as imageUrlBuilder } from './index-3849e3fe.js';
|
|
|
22
22
|
import './index-5f9f807a.js';
|
|
23
23
|
import { h as html_decode_1, c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
24
|
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
25
|
-
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-
|
|
26
|
-
export { D as AdSlot, B as Beam } from './AdSlot-
|
|
25
|
+
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-69bf3195.js';
|
|
26
|
+
export { D as AdSlot, B as Beam } from './AdSlot-69bf3195.js';
|
|
27
27
|
import './promise-683a9c54.js';
|
|
28
|
-
import './ADInfeed-
|
|
28
|
+
import './ADInfeed-a77b2850.js';
|
|
29
29
|
export { default as DeckContent } from './DeckContent.js';
|
|
30
30
|
import './get-b2201dc8.js';
|
|
31
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
31
|
+
export { A as AD, G as GridContent } from './GridContent-b8b5f361.js';
|
|
32
32
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
33
33
|
import 'react-bootstrap/Media';
|
|
34
34
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
@@ -39,7 +39,7 @@ export { default as GroupDeck } from './GroupDeck.js';
|
|
|
39
39
|
import { g as getYoutubeId } from './YoutubeGroup-a87b8967.js';
|
|
40
40
|
export { Y as YoutubeGroup } from './YoutubeGroup-a87b8967.js';
|
|
41
41
|
import 'smoothscroll-polyfill';
|
|
42
|
-
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1,
|
|
42
|
+
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Carousel, Table, Figure as Figure$1, Button as Button$1, ProgressBar, Card } from 'react-bootstrap';
|
|
43
43
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
44
44
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
45
45
|
export { default as VideoSeriesListing } from './VideoSeriesListing.js';
|
|
@@ -50,8 +50,8 @@ export { default as IssueDeck } from './IssueDeck.js';
|
|
|
50
50
|
import 'react-bootstrap/Badge';
|
|
51
51
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
52
52
|
import Spinner from 'react-bootstrap/Spinner';
|
|
53
|
-
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-
|
|
54
|
-
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-
|
|
53
|
+
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-21cfb458.js';
|
|
54
|
+
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-21cfb458.js';
|
|
55
55
|
import 'react-bootstrap/ListGroup';
|
|
56
56
|
import Head from 'next/head';
|
|
57
57
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -64,6 +64,7 @@ import 'react-bootstrap/Form';
|
|
|
64
64
|
import 'react-bootstrap/FormControl';
|
|
65
65
|
import Modal from 'react-bootstrap/Modal';
|
|
66
66
|
import Pagination from 'react-bootstrap/Pagination';
|
|
67
|
+
import dynamic from 'next/dynamic';
|
|
67
68
|
import Carousel$1 from 'react-bootstrap/Carousel';
|
|
68
69
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
69
70
|
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
@@ -3080,153 +3081,7 @@ var ADWelcome = function ADWelcome(_ref) {
|
|
|
3080
3081
|
);
|
|
3081
3082
|
};
|
|
3082
3083
|
|
|
3083
|
-
var urlFor$1 = function urlFor(source,
|
|
3084
|
-
var builder = imageUrlBuilder(client);
|
|
3085
|
-
return builder.image(source).auto('format');
|
|
3086
|
-
};
|
|
3087
|
-
|
|
3088
|
-
var FigureComponent = function FigureComponent(_ref) {
|
|
3089
|
-
var node = _ref.node,
|
|
3090
|
-
client = _ref.client;
|
|
3091
|
-
|
|
3092
|
-
var imgElement = useRef(null);
|
|
3093
|
-
|
|
3094
|
-
var _useState = useState(null),
|
|
3095
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
3096
|
-
imageWidth = _useState2[0],
|
|
3097
|
-
setimageWidth = _useState2[1];
|
|
3098
|
-
|
|
3099
|
-
var _useState3 = useState(null),
|
|
3100
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
3101
|
-
imgFloat = _useState4[0],
|
|
3102
|
-
setimgFloat = _useState4[1];
|
|
3103
|
-
|
|
3104
|
-
var _useState5 = useState(false),
|
|
3105
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
3106
|
-
openImg = _useState6[0],
|
|
3107
|
-
setOpenImg = _useState6[1];
|
|
3108
|
-
|
|
3109
|
-
var _useState7 = useState(''),
|
|
3110
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
3111
|
-
openImgSrc = _useState8[0],
|
|
3112
|
-
setOpenImgSrc = _useState8[1];
|
|
3113
|
-
|
|
3114
|
-
var caption = node.caption,
|
|
3115
|
-
alt = node.alt,
|
|
3116
|
-
blank = node.blank,
|
|
3117
|
-
link = node.link,
|
|
3118
|
-
_node$alignment = node.alignment,
|
|
3119
|
-
alignment = _node$alignment === undefined ? 'center' : _node$alignment;
|
|
3120
|
-
var _node$widthP = node.widthP,
|
|
3121
|
-
widthP = _node$widthP === undefined ? 'auto' : _node$widthP;
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
if (client.clientConfig && client.clientConfig.defaultImageSize && widthP === 'auto') {
|
|
3125
|
-
widthP = client.clientConfig.defaultImageSize;
|
|
3126
|
-
}
|
|
3127
|
-
|
|
3128
|
-
var figureMargin = void 0;
|
|
3129
|
-
if (imgFloat === 'none') {
|
|
3130
|
-
figureMargin = '0 auto 1rem';
|
|
3131
|
-
}
|
|
3132
|
-
if (imgFloat === 'left') {
|
|
3133
|
-
figureMargin = '0 1.5rem 1.5rem 0';
|
|
3134
|
-
}
|
|
3135
|
-
if (imgFloat === 'right') {
|
|
3136
|
-
figureMargin = '0 0 1.5rem 1.5rem';
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
var loadImg = function loadImg() {
|
|
3140
|
-
var screenWidth = window.innerWidth;
|
|
3141
|
-
if (screenWidth > 1000) {
|
|
3142
|
-
if (widthP === 'auto') {
|
|
3143
|
-
if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
|
|
3144
|
-
} else {
|
|
3145
|
-
setimageWidth(widthP + '%');
|
|
3146
|
-
}
|
|
3147
|
-
} else {
|
|
3148
|
-
setimageWidth('100%');
|
|
3149
|
-
}
|
|
3150
|
-
};
|
|
3151
|
-
|
|
3152
|
-
useEffect(function () {
|
|
3153
|
-
var screenWidth = window.innerWidth;
|
|
3154
|
-
if (screenWidth > 1000) {
|
|
3155
|
-
if (widthP === 'auto') {
|
|
3156
|
-
if (imgFloat === 'none') setimageWidth('auto');else setimageWidth('30%');
|
|
3157
|
-
} else {
|
|
3158
|
-
setimageWidth(widthP + '%');
|
|
3159
|
-
}
|
|
3160
|
-
} else {
|
|
3161
|
-
setimageWidth('100%');
|
|
3162
|
-
}
|
|
3163
|
-
}, [widthP, imgFloat]);
|
|
3164
|
-
|
|
3165
|
-
useEffect(function () {
|
|
3166
|
-
var screenWidth = window.innerWidth;
|
|
3167
|
-
if (screenWidth > 1000) {
|
|
3168
|
-
var align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
3169
|
-
setimgFloat(align);
|
|
3170
|
-
} else {
|
|
3171
|
-
var _align = ['center', 'top'].includes(alignment.toLowerCase()) ? 'none' : alignment.toLowerCase();
|
|
3172
|
-
setimgFloat(_align);
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3176
|
-
}, []);
|
|
3177
|
-
|
|
3178
|
-
if (!node.asset) return null;
|
|
3179
|
-
|
|
3180
|
-
return React__default.createElement(
|
|
3181
|
-
React__default.Fragment,
|
|
3182
|
-
null,
|
|
3183
|
-
imageWidth && imgFloat && React__default.createElement(
|
|
3184
|
-
Figure,
|
|
3185
|
-
{ className: 'd-block', style: { width: imageWidth, maxWidth: '100%', clear: 'both', float: imgFloat, margin: figureMargin } },
|
|
3186
|
-
link ? React__default.createElement(
|
|
3187
|
-
'a',
|
|
3188
|
-
{ target: blank ? '_blank' : '_self', href: link },
|
|
3189
|
-
React__default.createElement(Figure.Image, { style: { width: '100%' }, className: 'figure-image', ref: imgElement, onLoad: loadImg, src: urlFor$1(node, client).url(), alt: alt && alt }),
|
|
3190
|
-
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
3191
|
-
) : React__default.createElement(
|
|
3192
|
-
React__default.Fragment,
|
|
3193
|
-
null,
|
|
3194
|
-
React__default.createElement(Figure.Image, {
|
|
3195
|
-
style: { width: '100%' },
|
|
3196
|
-
className: 'figure-image',
|
|
3197
|
-
ref: imgElement,
|
|
3198
|
-
onLoad: loadImg,
|
|
3199
|
-
src: urlFor$1(node, client).url(),
|
|
3200
|
-
alt: alt && alt,
|
|
3201
|
-
onClick: function onClick() {
|
|
3202
|
-
setOpenImgSrc(urlFor$1(node, client).url());
|
|
3203
|
-
setOpenImg(true);
|
|
3204
|
-
}
|
|
3205
|
-
}),
|
|
3206
|
-
caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
|
|
3207
|
-
)
|
|
3208
|
-
),
|
|
3209
|
-
React__default.createElement(
|
|
3210
|
-
'div',
|
|
3211
|
-
{ className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
|
|
3212
|
-
React__default.createElement('img', { src: openImgSrc }),
|
|
3213
|
-
React__default.createElement('a', {
|
|
3214
|
-
className: 'lightbox-close',
|
|
3215
|
-
onClick: function onClick() {
|
|
3216
|
-
setOpenImgSrc('');
|
|
3217
|
-
setOpenImg(false);
|
|
3218
|
-
}
|
|
3219
|
-
})
|
|
3220
|
-
),
|
|
3221
|
-
React__default.createElement(
|
|
3222
|
-
'style',
|
|
3223
|
-
{ jsx: 'true' },
|
|
3224
|
-
'\n figure-caption {\n font-size: 90%;\n color: #6c757d;\n }\n /*Eliminates padding, centers the thumbnail */\n\n /* Styles the lightbox, removes it from sight and adds the fade-in transition */\n\n .lightbox-target {\n position: fixed;\n top: -100%;\n width: 100%;\n background: rgba(0, 0, 0, 0.7);\n width: 100%;\n opacity: 0;\n -webkit-transition: opacity 0.5s ease-in-out;\n -moz-transition: opacity 0.5s ease-in-out;\n -o-transition: opacity 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n overflow: hidden;\n }\n\n .lightbox-target.close {\n opacity: 0;\n }\n\n /* Styles the lightbox image, centers it vertically and horizontally, adds the zoom-in transition and makes it responsive using a combination of margin and absolute positioning */\n\n .lightbox-target img {\n margin: auto;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n max-height: 0%;\n max-width: 0%;\n border: 3px solid white;\n box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);\n box-sizing: border-box;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Styles the close link, adds the slide down transition */\n\n a.lightbox-close {\n display: block;\n width: 50px;\n height: 50px;\n box-sizing: border-box;\n background: white;\n color: black;\n text-decoration: none;\n position: absolute;\n top: -80px;\n right: 0;\n -webkit-transition: 0.5s ease-in-out;\n -moz-transition: 0.5s ease-in-out;\n -o-transition: 0.5s ease-in-out;\n transition: 0.5s ease-in-out;\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:before {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n }\n\n /* Provides part of the "X" to eliminate an image from the close link */\n\n a.lightbox-close:after {\n content: \'\';\n display: block;\n height: 30px;\n width: 1px;\n background: black;\n position: absolute;\n left: 26px;\n top: 10px;\n -webkit-transform: rotate(-45deg);\n -moz-transform: rotate(-45deg);\n -o-transform: rotate(-45deg);\n transform: rotate(-45deg);\n }\n\n /* Uses the :target pseudo-class to perform the animations upon clicking the .lightbox-target anchor */\n\n .lightbox-target.open {\n opacity: 1;\n top: 0;\n bottom: 0;\n right: 0;\n z-index: 9999;\n }\n\n .lightbox-target.open img {\n max-height: 100%;\n max-width: 100%;\n }\n\n .lightbox-target.open a.lightbox-close {\n top: 0px;\n }\n '
|
|
3225
|
-
)
|
|
3226
|
-
);
|
|
3227
|
-
};
|
|
3228
|
-
|
|
3229
|
-
var urlFor$2 = function urlFor(source, builder) {
|
|
3084
|
+
var urlFor$1 = function urlFor(source, builder) {
|
|
3230
3085
|
return builder.image(source).auto('format');
|
|
3231
3086
|
};
|
|
3232
3087
|
|
|
@@ -3277,7 +3132,7 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3277
3132
|
return React__default.createElement(
|
|
3278
3133
|
Carousel.Item,
|
|
3279
3134
|
{ key: slide._key },
|
|
3280
|
-
React__default.createElement('img', { src: slide.asset && urlFor$
|
|
3135
|
+
React__default.createElement('img', { src: slide.asset && urlFor$1(slide.asset, builder).url(), alt: slide.alt && slide.alt, style: { width: '100%' } }),
|
|
3281
3136
|
slide.caption && React__default.createElement(
|
|
3282
3137
|
'p',
|
|
3283
3138
|
{ className: 'p-2' },
|
|
@@ -5977,14 +5832,14 @@ var Media = function Media(_ref) {
|
|
|
5977
5832
|
if (uploadDoc && uploadDoc.asset) {
|
|
5978
5833
|
if (poster && poster.asset && caption && caption !== '') {
|
|
5979
5834
|
return React__default.createElement(
|
|
5980
|
-
Figure,
|
|
5835
|
+
Figure$1,
|
|
5981
5836
|
{ className: 'mb-3' },
|
|
5982
5837
|
React__default.createElement(
|
|
5983
5838
|
'a',
|
|
5984
5839
|
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
5985
|
-
React__default.createElement(Figure.Image, { src: urlFor(poster).url(), fluid: true }),
|
|
5840
|
+
React__default.createElement(Figure$1.Image, { src: urlFor(poster).url(), fluid: true }),
|
|
5986
5841
|
React__default.createElement(
|
|
5987
|
-
Figure.Caption,
|
|
5842
|
+
Figure$1.Caption,
|
|
5988
5843
|
{ className: 'text-center' },
|
|
5989
5844
|
caption
|
|
5990
5845
|
)
|
|
@@ -5992,12 +5847,12 @@ var Media = function Media(_ref) {
|
|
|
5992
5847
|
);
|
|
5993
5848
|
} else if (poster && poster.asset) {
|
|
5994
5849
|
return React__default.createElement(
|
|
5995
|
-
Figure,
|
|
5850
|
+
Figure$1,
|
|
5996
5851
|
{ className: 'mb-3' },
|
|
5997
5852
|
React__default.createElement(
|
|
5998
5853
|
'a',
|
|
5999
5854
|
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
6000
|
-
React__default.createElement(Figure.Image, { src: urlFor(poster).url(), fluid: true })
|
|
5855
|
+
React__default.createElement(Figure$1.Image, { src: urlFor(poster).url(), fluid: true })
|
|
6001
5856
|
)
|
|
6002
5857
|
);
|
|
6003
5858
|
} else if (caption && caption !== '') {
|
|
@@ -13520,7 +13375,7 @@ var Leads = function Leads(_ref) {
|
|
|
13520
13375
|
);
|
|
13521
13376
|
};
|
|
13522
13377
|
|
|
13523
|
-
var urlFor$
|
|
13378
|
+
var urlFor$2 = function urlFor(source, client) {
|
|
13524
13379
|
var builder = imageUrlBuilder(client);
|
|
13525
13380
|
return builder.image(source).auto('format');
|
|
13526
13381
|
};
|
|
@@ -13574,7 +13429,7 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
13574
13429
|
React__default.createElement(
|
|
13575
13430
|
'a',
|
|
13576
13431
|
{ href: slide.slideshowImage.link && slide.slideshowImage.link, target: slide.slideshowImage.blank ? '_blank' : '_self' },
|
|
13577
|
-
React__default.createElement('img', { src: urlFor$
|
|
13432
|
+
React__default.createElement('img', { src: urlFor$2(slide.slideshowImage, client).url(), alt: slide.slideshowImage.alt || 'slideshow image', style: { width: '100%' } })
|
|
13578
13433
|
),
|
|
13579
13434
|
React__default.createElement(
|
|
13580
13435
|
'div',
|
|
@@ -13612,6 +13467,10 @@ var NativeAd = function NativeAd(props) {
|
|
|
13612
13467
|
);
|
|
13613
13468
|
};
|
|
13614
13469
|
|
|
13470
|
+
var Figure = dynamic(function () {
|
|
13471
|
+
return import('./Figure-d6e22818.js');
|
|
13472
|
+
}, { ssr: false });
|
|
13473
|
+
|
|
13615
13474
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
13616
13475
|
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)/i.test(url)) {
|
|
13617
13476
|
return true;
|
|
@@ -13667,7 +13526,7 @@ var getSerializers = function getSerializers() {
|
|
|
13667
13526
|
figure: function figure(_ref3) {
|
|
13668
13527
|
var node = _ref3.node;
|
|
13669
13528
|
|
|
13670
|
-
return React__default.createElement(
|
|
13529
|
+
return React__default.createElement(Figure, { node: node, client: client });
|
|
13671
13530
|
},
|
|
13672
13531
|
slideshow: function slideshow(_ref4) {
|
|
13673
13532
|
var node = _ref4.node;
|
|
@@ -13975,13 +13834,13 @@ var SetCookie = function SetCookie(key, value) {
|
|
|
13975
13834
|
js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
|
|
13976
13835
|
};
|
|
13977
13836
|
|
|
13978
|
-
var urlFor$
|
|
13837
|
+
var urlFor$3 = function urlFor(source, client) {
|
|
13979
13838
|
var builder = imageUrlBuilder(client);
|
|
13980
13839
|
return builder.image(source).auto('format');
|
|
13981
13840
|
};
|
|
13982
13841
|
|
|
13983
13842
|
var renderCardImage = function renderCardImage(thumbnail, client, imageHeight, imageWidth) {
|
|
13984
|
-
var url = urlFor$
|
|
13843
|
+
var url = urlFor$3(thumbnail, client);
|
|
13985
13844
|
if (imageHeight) url = url.height(imageHeight);
|
|
13986
13845
|
if (imageWidth) url = url.width(imageWidth);
|
|
13987
13846
|
return url.url();
|