@mjhls/mjh-framework 1.0.619 → 1.0.621
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/AccordionPanel.js +1 -1
- package/dist/cjs/ArticleSeriesListing.js +1 -1
- package/dist/cjs/HamMagazine.js +82 -49
- package/dist/cjs/NavMagazine.js +251 -334
- package/dist/cjs/NavNative.js +2 -3
- package/dist/cjs/SocialSearchComponent-5cbde5e0.js +196 -0
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/Ustream.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{index.esm-fbd1f7e9.js → index.esm-876ca9ff.js} +0 -5
- package/dist/cjs/{SocialNavFooter-9a07520f.js → index.esm-d1259b34.js} +8 -0
- package/dist/cjs/index.js +3 -3
- package/dist/esm/AccordionPanel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +1 -1
- package/dist/esm/HamMagazine.js +82 -49
- package/dist/esm/NavMagazine.js +251 -334
- package/dist/esm/NavNative.js +1 -2
- package/dist/esm/SocialSearchComponent-00385695.js +191 -0
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{SocialNavFooter-4fb16720.js → index.esm-73e847d2.js} +8 -1
- package/dist/esm/{index.esm-4b1d94b7.js → index.esm-85cb09e6.js} +1 -5
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
- package/dist/cjs/index.esm-0e5c6a9e.js +0 -11
- package/dist/esm/index.esm-16536e81.js +0 -9
package/dist/cjs/NavMagazine.js
CHANGED
|
@@ -21,19 +21,19 @@ require('./asyncToGenerator-8e707718.js');
|
|
|
21
21
|
require('./_set-species-4458e975.js');
|
|
22
22
|
var Segment = require('./beam-d22818d3.js');
|
|
23
23
|
require('./react-social-icons-cd0d9d3b.js');
|
|
24
|
-
|
|
25
|
-
var index_esm = require('./index.esm-
|
|
26
|
-
|
|
24
|
+
require('./iconBase-68959171.js');
|
|
25
|
+
var index_esm = require('./index.esm-876ca9ff.js');
|
|
26
|
+
require('react-bootstrap/Button');
|
|
27
27
|
var Nav = _interopDefault(require('react-bootstrap/Nav'));
|
|
28
28
|
var Navbar = _interopDefault(require('react-bootstrap/Navbar'));
|
|
29
29
|
var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
|
|
30
30
|
var index_esm$1 = require('./index.esm-66ffa47a.js');
|
|
31
31
|
var NavFooter = require('./NavFooter-76c913e3.js');
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var
|
|
32
|
+
var index_esm$2 = require('./index.esm-d1259b34.js');
|
|
33
|
+
require('./SocialIcons.js');
|
|
34
|
+
require('react-bootstrap/Form');
|
|
35
|
+
require('react-bootstrap/FormControl');
|
|
36
|
+
var SocialSearchComponent = require('./SocialSearchComponent-5cbde5e0.js');
|
|
37
37
|
|
|
38
38
|
var NavMagazine = function NavMagazine(props) {
|
|
39
39
|
/*
|
|
@@ -67,8 +67,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
67
67
|
|
|
68
68
|
var navRef = React.useRef(null);
|
|
69
69
|
var topNavRef = React.useRef(null);
|
|
70
|
-
// reference to mobile search component
|
|
71
|
-
var searchRef = React.useRef(null);
|
|
72
70
|
|
|
73
71
|
var _useState = React.useState(false),
|
|
74
72
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
@@ -80,65 +78,108 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
80
78
|
screenWidth = _useState4[0],
|
|
81
79
|
setScreenWidth = _useState4[1];
|
|
82
80
|
|
|
81
|
+
var _useState5 = React.useState(null),
|
|
82
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
83
|
+
userAgent = _useState6[0],
|
|
84
|
+
setUserAgent = _useState6[1];
|
|
85
|
+
|
|
86
|
+
var _useState7 = React.useState(0),
|
|
87
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
88
|
+
resolution = _useState8[0],
|
|
89
|
+
setResolution = _useState8[1];
|
|
90
|
+
|
|
91
|
+
var _useState9 = React.useState(true),
|
|
92
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
93
|
+
isDesktop = _useState10[0],
|
|
94
|
+
setIsDesktop = _useState10[1];
|
|
95
|
+
|
|
96
|
+
var _useState11 = React.useState(0),
|
|
97
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
98
|
+
topOffset = _useState12[0],
|
|
99
|
+
setTopOffset = _useState12[1];
|
|
100
|
+
|
|
83
101
|
React.useEffect(function () {
|
|
84
102
|
// handling the top mast component
|
|
85
103
|
var topNavHeight = document.querySelector('.top-nav-secondary') && document.querySelector('.top-nav-secondary').offsetHeight;
|
|
86
|
-
// Setting the top of the search component based on the offset of navigation component.
|
|
87
|
-
searchRef.current.style.top = (topNavHeight ? topNavHeight + navRef.current.offsetHeight : navRef.current.offsetHeight) + 1 + 'px';
|
|
88
|
-
document.addEventListener('scroll', trackScrolling);
|
|
89
|
-
return function () {
|
|
90
|
-
document.removeEventListener('scroll', trackScrolling);
|
|
91
|
-
};
|
|
92
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
93
104
|
}, []);
|
|
94
105
|
|
|
95
106
|
React.useEffect(function () {
|
|
107
|
+
// Check for desktop or mobile device
|
|
108
|
+
if (window && window.innerWidth < 1200) setIsDesktop(false);
|
|
109
|
+
|
|
110
|
+
// Hiding light-nav with logo on mobile devices
|
|
111
|
+
if (window && window.innerWidth < 1200 && topNavRef) topNavRef.current.style.display = 'none';
|
|
112
|
+
|
|
113
|
+
// Initial User agent setup on refresh or on load
|
|
114
|
+
setUserAgent(navigator.userAgent.toString());
|
|
115
|
+
|
|
116
|
+
// Initial screenwidth setup on refresh or on load
|
|
96
117
|
setScreenWidth(parseInt(window.innerWidth));
|
|
97
118
|
}, []);
|
|
98
119
|
|
|
120
|
+
// Check for browser resize
|
|
121
|
+
React.useEffect(function () {
|
|
122
|
+
if (resolution === 0) {
|
|
123
|
+
setResolution(window.innerWidth);
|
|
124
|
+
}
|
|
125
|
+
var handleResize = function handleResize() {
|
|
126
|
+
if (resolution === 0) {
|
|
127
|
+
setResolution(window.innerWidth);
|
|
128
|
+
} else {
|
|
129
|
+
if (window.innerWidth < 768 && resolution >= 768) {
|
|
130
|
+
console.log('Detected Mobile Resolution');
|
|
131
|
+
window.location.reload();
|
|
132
|
+
} else if (window.innerWidth >= 768 && resolution < 768) {
|
|
133
|
+
console.log('Detected Tablet/Desktop Resolution');
|
|
134
|
+
window.location.reload();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
window.addEventListener('resize', handleResize);
|
|
139
|
+
}, [resolution]);
|
|
140
|
+
|
|
141
|
+
// Check for change in useragent with change in screen resolution
|
|
142
|
+
React.useEffect(function () {
|
|
143
|
+
var handleResize = function handleResize() {
|
|
144
|
+
if (userAgent && userAgent !== navigator.userAgent.toString()) {
|
|
145
|
+
console.log('Browser change detected, refreshing');
|
|
146
|
+
window.location.reload();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
window.addEventListener('resize', handleResize);
|
|
150
|
+
}, [userAgent]);
|
|
151
|
+
|
|
152
|
+
// Handling navigation and logo position on scroll
|
|
99
153
|
React.useEffect(function () {
|
|
100
154
|
var navOffsetTop = document.getElementById('navbar-ham') && document.getElementById('navbar-ham').offsetTop;
|
|
101
155
|
var adSection = document.querySelector('.AD728x90');
|
|
156
|
+
var navLinks = document.getElementById('nav-links');
|
|
157
|
+
var mastNav = document.querySelector('.nav-brands');
|
|
158
|
+
if (mastNav && mastNav.offsetHeight) setTopOffset(mastNav.offsetHeight - 3);
|
|
159
|
+
|
|
102
160
|
if (window.pageYOffset > navOffsetTop) {
|
|
103
161
|
if (navRef.current && navRef.current.style) {
|
|
104
|
-
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
105
162
|
navRef.current.style.position = 'fixed';
|
|
106
|
-
navRef.current.style.top =
|
|
107
|
-
navRef.current.style.width = '100%';
|
|
108
|
-
navRef.current.style.zIndex = '99999';
|
|
109
|
-
// Making the search Sticky on scroll
|
|
110
|
-
searchRef.current.style.position = 'fixed';
|
|
111
|
-
searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
|
|
112
|
-
searchRef.current.style.zIndex = '99999';
|
|
113
|
-
searchRef.current.style.width = '100%';
|
|
163
|
+
if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
|
|
114
164
|
}
|
|
115
165
|
}
|
|
116
166
|
var stickyNav = window.addEventListener('scroll', function () {
|
|
117
167
|
if (window.pageYOffset > navOffsetTop) {
|
|
118
168
|
if (navRef.current && navRef.current.style) {
|
|
119
|
-
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
120
169
|
navRef.current.style.position = 'fixed';
|
|
121
|
-
navRef.current.style.top =
|
|
122
|
-
navRef.current.style.width = '100%';
|
|
123
|
-
navRef.current.style.zIndex = '99999';
|
|
124
|
-
// Making the search Sticky on scroll
|
|
125
|
-
searchRef.current.style.position = 'fixed';
|
|
126
|
-
searchRef.current.style.top = navRef.current.offsetHeight + 1 + 'px';
|
|
127
|
-
searchRef.current.style.zIndex = '99999';
|
|
128
|
-
searchRef.current.style.width = '100%';
|
|
170
|
+
if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
|
|
129
171
|
}
|
|
172
|
+
setIsSticky(true);
|
|
173
|
+
navLinks.style.margin = 'auto';
|
|
130
174
|
} else {
|
|
131
|
-
var topNavHeight = document.querySelector('.top-nav-secondary') && document.querySelector('.top-nav-secondary').offsetHeight;
|
|
132
175
|
if (navRef.current && navRef.current.style) {
|
|
133
176
|
topNavRef.current.style.paddingBottom = '0';
|
|
134
177
|
navRef.current.style.position = 'relative';
|
|
135
|
-
navRef.current.style.top = '';
|
|
136
178
|
if (adSection) adSection.style.marginTop = '';
|
|
137
|
-
|
|
138
|
-
searchRef.current.style.position = 'fixed';
|
|
139
|
-
searchRef.current.style.top = (topNavHeight ? topNavHeight + navRef.current.offsetHeight : navRef.current.offsetHeight) + 1 + 'px';
|
|
140
|
-
searchRef.current.style.width = '100%';
|
|
179
|
+
if (mastNav && mastNav.offsetHeight) navRef.current.style.top = mastNav.offsetHeight;
|
|
141
180
|
}
|
|
181
|
+
setIsSticky(false);
|
|
182
|
+
navLinks.style.margin = '0px auto 0px 0px';
|
|
142
183
|
}
|
|
143
184
|
});
|
|
144
185
|
return function () {
|
|
@@ -146,38 +187,24 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
146
187
|
};
|
|
147
188
|
}, []);
|
|
148
189
|
|
|
149
|
-
var trackScrolling = function trackScrolling() {
|
|
150
|
-
var offsetTop = navRef.current.getBoundingClientRect().top;
|
|
151
|
-
var navLinks = document.getElementById('nav-links');
|
|
152
|
-
if (offsetTop === 0) {
|
|
153
|
-
setIsSticky(true);
|
|
154
|
-
navLinks.style.margin = 'auto';
|
|
155
|
-
navLinks.style.padding = '0px 8% 0px 0px';
|
|
156
|
-
} else {
|
|
157
|
-
setIsSticky(false);
|
|
158
|
-
navLinks.style.margin = '0px auto 0px 0px';
|
|
159
|
-
navLinks.style.padding = '0px';
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
|
|
163
190
|
//const userLoggedIn = props.user ? true : false
|
|
164
191
|
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
userLoggedIn =
|
|
168
|
-
setUserLoggedIn =
|
|
192
|
+
var _useState13 = React.useState(false),
|
|
193
|
+
_useState14 = slicedToArray._slicedToArray(_useState13, 2),
|
|
194
|
+
userLoggedIn = _useState14[0],
|
|
195
|
+
setUserLoggedIn = _useState14[1];
|
|
169
196
|
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
userChecked =
|
|
173
|
-
setUserChecked =
|
|
197
|
+
var _useState15 = React.useState(false),
|
|
198
|
+
_useState16 = slicedToArray._slicedToArray(_useState15, 2),
|
|
199
|
+
userChecked = _useState16[0],
|
|
200
|
+
setUserChecked = _useState16[1];
|
|
174
201
|
// Search Term
|
|
175
202
|
|
|
176
203
|
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
searchKey =
|
|
180
|
-
setSearchKey =
|
|
204
|
+
var _useState17 = React.useState(''),
|
|
205
|
+
_useState18 = slicedToArray._slicedToArray(_useState17, 2),
|
|
206
|
+
searchKey = _useState18[0],
|
|
207
|
+
setSearchKey = _useState18[1];
|
|
181
208
|
|
|
182
209
|
React.useEffect(function () {
|
|
183
210
|
setUserLoggedIn(props.user ? true : false);
|
|
@@ -186,130 +213,6 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
186
213
|
}
|
|
187
214
|
}, [props.user, userChecked]);
|
|
188
215
|
|
|
189
|
-
// Search function
|
|
190
|
-
var submitSearch = function submitSearch(e) {
|
|
191
|
-
e.preventDefault();
|
|
192
|
-
window.location.href = '/search?searchTerm=' + searchKey;
|
|
193
|
-
};
|
|
194
|
-
|
|
195
|
-
// Toggling class of an element.Can't use toggle() as IE doesn't support toggle()
|
|
196
|
-
var toggleClass = function toggleClass(selector, type, addOn) {
|
|
197
|
-
if (type === 'id') {
|
|
198
|
-
var searchBar = document.getElementById(selector);
|
|
199
|
-
if (searchBar && searchBar.classList && searchBar.classList.contains(addOn)) {
|
|
200
|
-
searchBar.classList.remove(addOn);
|
|
201
|
-
} else if (searchBar && searchBar.classList) {
|
|
202
|
-
searchBar.classList.add(addOn);
|
|
203
|
-
}
|
|
204
|
-
} else if (type === 'class') {
|
|
205
|
-
var searchBtn = document.getElementsByClassName(selector)[0];
|
|
206
|
-
if (searchBtn && searchBtn.classList && searchBtn.classList.contains(addOn)) {
|
|
207
|
-
searchBtn.classList.remove(addOn);
|
|
208
|
-
} else if (searchBtn && searchBtn.classList) {
|
|
209
|
-
searchBtn.classList.add(addOn);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// Search Component
|
|
215
|
-
var socialSearchComponent = function socialSearchComponent(type) {
|
|
216
|
-
if (type === 'mobile') {
|
|
217
|
-
return React__default.createElement(
|
|
218
|
-
'div',
|
|
219
|
-
{ id: 'search-content-mobile' },
|
|
220
|
-
React__default.createElement(
|
|
221
|
-
'div',
|
|
222
|
-
{ id: 'search-bar-mobile', ref: searchRef },
|
|
223
|
-
React__default.createElement(
|
|
224
|
-
Form,
|
|
225
|
-
{ inline: true, onSubmit: function onSubmit(e) {
|
|
226
|
-
return submitSearch(e);
|
|
227
|
-
} },
|
|
228
|
-
React__default.createElement(FormControl, { placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
|
|
229
|
-
return setSearchKey(e.target.value);
|
|
230
|
-
} }),
|
|
231
|
-
React__default.createElement(
|
|
232
|
-
Button,
|
|
233
|
-
{ variant: 'primary', style: { backgroundColor: 'var(--secondary)', border: 'none' }, onClick: function onClick(e) {
|
|
234
|
-
return submitSearch(e);
|
|
235
|
-
} },
|
|
236
|
-
'Search'
|
|
237
|
-
)
|
|
238
|
-
)
|
|
239
|
-
),
|
|
240
|
-
React__default.createElement(
|
|
241
|
-
iconBase.IconContext.Provider,
|
|
242
|
-
{ value: { color: socialIconVariant === 'light' ? 'white' : 'black', className: 'search-btn-mobile', size: '50px' } },
|
|
243
|
-
React__default.createElement(index_esm$2.GoSearch, {
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
var navToggle = document.getElementsByClassName('navbar-toggler')[0];
|
|
246
|
-
if (navToggle && navToggle.classList && !navToggle.classList.contains('collapsed')) {
|
|
247
|
-
var nav = document.querySelectorAll('.navbar-collapse');
|
|
248
|
-
for (var i = 0; i < nav.length; i++) {
|
|
249
|
-
if (nav[i] && nav[i].classList) nav[i].classList.remove('show');
|
|
250
|
-
}
|
|
251
|
-
if (navToggle && navToggle.classList) navToggle.classList.add('collapsed');
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
toggleClass('search-bar-mobile', 'id', 'show');
|
|
255
|
-
toggleClass('search-btn-mobile', 'class', 'active-search');
|
|
256
|
-
}
|
|
257
|
-
})
|
|
258
|
-
),
|
|
259
|
-
React__default.createElement(
|
|
260
|
-
'style',
|
|
261
|
-
{ jsx: 'true' },
|
|
262
|
-
'\n #search-content-mobile {\n display: flex;\n }\n @media screen and (min-width: 1200px) {\n #search-content-mobile {\n display: none;\n }\n }\n #search-content-mobile .search-btn-mobile {\n padding: 5px;\n position: absolute;\n right: 4%;\n height: 35px;\n width: 35px;\n margin-top: 4px;\n cursor: pointer;\n top: 12px;\n }\n #search-content-mobile #search-bar-mobile {\n position: fixed;\n display: none;\n left: 0px;\n width: 100%;\n border-radius: 5px;\n padding: 10px;\n background-color: var(--primary);\n }\n #search-content-mobile #search-bar-mobile .form-inline {\n margin-top: 0px;\n width: 100% !important;\n }\n #search-content-mobile #search-bar-mobile .form-inline .form-control {\n width: 78%;\n border-radius: 5px;\n height: 45px;\n }\n #search-content-mobile #search-bar-mobile .form-inline .btn {\n width: 20%;\n border-radius: 5px;\n background-color: #040c5a;\n height: 45px;\n margin-left: 5px;\n padding: 1px;\n }\n .show {\n display: block !important;\n }\n .active-search {\n border-radius: 5px;\n border: 1px solid var(--secondary);\n }\n '
|
|
263
|
-
)
|
|
264
|
-
);
|
|
265
|
-
} else if (type === 'desktop') {
|
|
266
|
-
return React__default.createElement(
|
|
267
|
-
'div',
|
|
268
|
-
{ id: 'search-content-desktop' },
|
|
269
|
-
React__default.createElement(
|
|
270
|
-
'div',
|
|
271
|
-
{ id: 'search-bar-desktop' },
|
|
272
|
-
React__default.createElement(
|
|
273
|
-
Form,
|
|
274
|
-
{ inline: true, onSubmit: function onSubmit(e) {
|
|
275
|
-
return submitSearch(e);
|
|
276
|
-
} },
|
|
277
|
-
React__default.createElement(FormControl, { placeholder: 'Search', type: 'text', value: searchKey, onChange: function onChange(e) {
|
|
278
|
-
return setSearchKey(e.target.value);
|
|
279
|
-
} }),
|
|
280
|
-
React__default.createElement(
|
|
281
|
-
Button,
|
|
282
|
-
{ variant: 'primary', style: { backgroundColor: 'var(--secondary)', border: 'none' }, onClick: function onClick(e) {
|
|
283
|
-
return submitSearch(e);
|
|
284
|
-
} },
|
|
285
|
-
'Search'
|
|
286
|
-
)
|
|
287
|
-
)
|
|
288
|
-
),
|
|
289
|
-
React__default.createElement(
|
|
290
|
-
iconBase.IconContext.Provider,
|
|
291
|
-
{ value: { color: socialIconVariant === 'light' ? 'white' : 'black', className: 'search-btn-desktop', size: '50px' } },
|
|
292
|
-
React__default.createElement(index_esm$2.GoSearch, {
|
|
293
|
-
onClick: function onClick() {
|
|
294
|
-
toggleClass('search-bar-desktop', 'id', 'show');
|
|
295
|
-
toggleClass('search-btn-desktop', 'class', 'active-search');
|
|
296
|
-
}
|
|
297
|
-
})
|
|
298
|
-
),
|
|
299
|
-
settings && settings.socialLinks && settings.socialLinks.length !== 0 && React__default.createElement(
|
|
300
|
-
'div',
|
|
301
|
-
{ id: 'social-tab-desktop', style: { display: 'flex' } },
|
|
302
|
-
settings.socialLinks && React__default.createElement(SocialIcons, { socialLinks: settings.socialLinks, variant: socialIconVariant })
|
|
303
|
-
),
|
|
304
|
-
React__default.createElement(
|
|
305
|
-
'style',
|
|
306
|
-
{ jsx: 'true' },
|
|
307
|
-
'\n #social-tab-desktops {\n position: relative;\n display: flex;\n left: 0px;\n }\n #social-tab-desktops svg {\n height: 25px !important;\n width: 25px !important;\n }\n @media screen and (max-width: 1199px) {\n #search-content-desktop {\n display: none !important;\n }\n }\n @media screen and (min-width: 992px) {\n .mobile-nav {\n width: 100% !important;\n }\n }\n #search-content-desktop {\n display: flex;\n padding-top: 1px;\n height: 35px;\n position: absolute;\n right: 5%;\n top: 14px;\n }\n #search-content-desktop .search-btn-desktop {\n padding: 5px;\n height: 35px;\n width: 32px;\n margin: -2px 5px 0px 0px;\n cursor: pointer;\n }\n #search-content-desktop #search-bar-desktop {\n display: none;\n background-color: var(--primary);\n position: relative;\n width: 400px;\n border-radius: 5px;\n height: 48px;\n top: 50px;\n }\n #search-content-desktop #search-bar-desktop .form-inline {\n padding: 5px;\n }\n #search-content-desktop #search-bar-desktop .form-inline .form-control {\n width: 78%;\n border-radius: 5px;\n }\n #search-content-desktop #search-bar-desktop .form-inline .btn {\n width: 20%;\n border-radius: 5px;\n padding: 7px;\n margin-left: 5px;\n }\n .show {\n display: block !important;\n }\n .active-search {\n border-radius: 5px;\n border: 1px solid var(--secondary);\n }\n '
|
|
308
|
-
)
|
|
309
|
-
);
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
|
|
313
216
|
return React__default.createElement(
|
|
314
217
|
React__default.Fragment,
|
|
315
218
|
null,
|
|
@@ -406,18 +309,33 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
406
309
|
),
|
|
407
310
|
React__default.createElement(
|
|
408
311
|
Navbar,
|
|
409
|
-
{
|
|
312
|
+
{
|
|
313
|
+
id: 'navbar-ham',
|
|
314
|
+
style: { width: '100%', display: 'flex', top: topOffset, overflow: 'auto' },
|
|
315
|
+
className: main.main_40 ? 'bottom-nav ios-nav' : 'bottom-nav ',
|
|
316
|
+
variant: 'dark',
|
|
317
|
+
expand: 'xl',
|
|
318
|
+
bg: 'primary',
|
|
319
|
+
sticky: 'top',
|
|
320
|
+
ref: navRef },
|
|
410
321
|
React__default.createElement(
|
|
411
322
|
Container,
|
|
412
323
|
{ className: 'mobile-nav android-nav', style: { display: 'flex' } },
|
|
413
324
|
React__default.createElement(
|
|
414
325
|
'div',
|
|
415
|
-
{ className: 'nav-toggle' },
|
|
326
|
+
{ className: 'nav-toggle', style: { display: 'flex' } },
|
|
416
327
|
React__default.createElement(Navbar.Toggle, {
|
|
417
328
|
'aria-controls': 'basic-navbar-nav',
|
|
418
329
|
onClick: function onClick() {
|
|
330
|
+
// Set overflow fix for iPhones safari browsers
|
|
331
|
+
if (main.main_40) {
|
|
332
|
+
var mainNav = document.querySelector('#navbar-ham');
|
|
333
|
+
if (mainNav && mainNav.style) mainNav.style.overflow = 'auto';
|
|
334
|
+
}
|
|
335
|
+
|
|
419
336
|
var searchBar = document.getElementById('search-bar-mobile');
|
|
420
337
|
var searchBtn = document.getElementsByClassName('search-btn-mobile');
|
|
338
|
+
|
|
421
339
|
if (searchBar && searchBar.classList) {
|
|
422
340
|
searchBar.classList.remove('show');
|
|
423
341
|
}
|
|
@@ -425,85 +343,63 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
425
343
|
searchBtn[0].classList.remove('active-search');
|
|
426
344
|
}
|
|
427
345
|
}
|
|
428
|
-
})
|
|
346
|
+
}),
|
|
347
|
+
!isDesktop && React__default.createElement(
|
|
348
|
+
'div',
|
|
349
|
+
{ className: 'site-logo-wrapper', style: { margin: 'auto' } },
|
|
350
|
+
React__default.createElement(
|
|
351
|
+
'a',
|
|
352
|
+
{ href: '/' },
|
|
353
|
+
React__default.createElement('img', { src: invertedLogo ? invertedLogo : logo, style: { padding: '0px ', objectFit: 'contain', maxHeight: '45px' } })
|
|
354
|
+
)
|
|
355
|
+
),
|
|
356
|
+
!isDesktop && React__default.createElement(SocialSearchComponent.SocialSearchComponent, { type: 'mobile', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
|
|
429
357
|
),
|
|
430
358
|
React__default.createElement(
|
|
431
359
|
'div',
|
|
432
|
-
{ className: '
|
|
433
|
-
React__default.createElement(
|
|
434
|
-
|
|
435
|
-
{
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
React__default.Fragment,
|
|
453
|
-
null,
|
|
454
|
-
React__default.createElement(
|
|
455
|
-
'a',
|
|
456
|
-
{ key: 'mobile-profile', href: '/auth/profile', className: 'nav-link' },
|
|
457
|
-
'Profile'
|
|
360
|
+
{ className: 'navigation-menu-list', style: { width: '100%', maxHeight: '85vh' } },
|
|
361
|
+
subNav && React__default.createElement(
|
|
362
|
+
Navbar.Collapse,
|
|
363
|
+
{ id: 'basic-navbar-sub' },
|
|
364
|
+
React__default.createElement(
|
|
365
|
+
Nav,
|
|
366
|
+
{ className: 'mr-auto' },
|
|
367
|
+
showLogin && userChecked && userLoggedIn && React__default.createElement(
|
|
368
|
+
React__default.Fragment,
|
|
369
|
+
null,
|
|
370
|
+
React__default.createElement(
|
|
371
|
+
'a',
|
|
372
|
+
{ key: 'mobile-profile', href: '/auth/profile', className: 'nav-link' },
|
|
373
|
+
'Profile'
|
|
374
|
+
),
|
|
375
|
+
React__default.createElement(
|
|
376
|
+
'a',
|
|
377
|
+
{ key: 'mobile-logout', href: '/api/auth/logout', className: 'nav-link' },
|
|
378
|
+
'Log Out'
|
|
379
|
+
)
|
|
458
380
|
),
|
|
459
|
-
React__default.createElement(
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
381
|
+
showLogin && userChecked && !userLoggedIn && React__default.createElement(
|
|
382
|
+
React__default.Fragment,
|
|
383
|
+
null,
|
|
384
|
+
React__default.createElement(
|
|
385
|
+
'a',
|
|
386
|
+
{ key: 'mobile-signup', href: '/auth/signup', className: 'nav-link' },
|
|
387
|
+
'Sign Up'
|
|
388
|
+
),
|
|
389
|
+
React__default.createElement(
|
|
390
|
+
'a',
|
|
391
|
+
{ key: 'mobile-login', href: '/auth/login', className: 'nav-link' },
|
|
392
|
+
'Log In'
|
|
393
|
+
)
|
|
472
394
|
),
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
)
|
|
478
|
-
),
|
|
479
|
-
subNav && subNav.map(function (row, index) {
|
|
480
|
-
if (row.subQuery && row.subQuery.length > 0) {
|
|
481
|
-
return row.name ? React__default.createElement(
|
|
482
|
-
'div',
|
|
483
|
-
null,
|
|
484
|
-
React__default.createElement(
|
|
485
|
-
NavDropdown,
|
|
486
|
-
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
487
|
-
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
488
|
-
if (ddRow.type === 'divider') {
|
|
489
|
-
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
490
|
-
} else {
|
|
491
|
-
if (ddRow.url && ddRow.name) {
|
|
492
|
-
return ddRow.url && ddRow.name ? React__default.createElement(
|
|
493
|
-
'a',
|
|
494
|
-
{ key: subIndex, href: Segment.Segment.getURL(ddRow.url, ddRow), target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
495
|
-
ddRow.name
|
|
496
|
-
) : null;
|
|
497
|
-
} else return null;
|
|
498
|
-
}
|
|
499
|
-
})
|
|
500
|
-
),
|
|
501
|
-
React__default.createElement(
|
|
502
|
-
'noscript',
|
|
395
|
+
subNav && subNav.map(function (row, index) {
|
|
396
|
+
if (row.subQuery && row.subQuery.length > 0) {
|
|
397
|
+
return row.name ? React__default.createElement(
|
|
398
|
+
'div',
|
|
503
399
|
null,
|
|
504
400
|
React__default.createElement(
|
|
505
|
-
|
|
506
|
-
|
|
401
|
+
NavDropdown,
|
|
402
|
+
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
507
403
|
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
508
404
|
if (ddRow.type === 'divider') {
|
|
509
405
|
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
@@ -517,60 +413,62 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
517
413
|
} else return null;
|
|
518
414
|
}
|
|
519
415
|
})
|
|
416
|
+
),
|
|
417
|
+
React__default.createElement(
|
|
418
|
+
'noscript',
|
|
419
|
+
null,
|
|
420
|
+
React__default.createElement(
|
|
421
|
+
'div',
|
|
422
|
+
null,
|
|
423
|
+
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
424
|
+
if (ddRow.type === 'divider') {
|
|
425
|
+
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
426
|
+
} else {
|
|
427
|
+
if (ddRow.url && ddRow.name) {
|
|
428
|
+
return ddRow.url && ddRow.name ? React__default.createElement(
|
|
429
|
+
'a',
|
|
430
|
+
{ key: subIndex, href: Segment.Segment.getURL(ddRow.url, ddRow), target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
431
|
+
ddRow.name
|
|
432
|
+
) : null;
|
|
433
|
+
} else return null;
|
|
434
|
+
}
|
|
435
|
+
})
|
|
436
|
+
)
|
|
520
437
|
)
|
|
521
|
-
)
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
}
|
|
530
|
-
})
|
|
531
|
-
)
|
|
532
|
-
),
|
|
533
|
-
React__default.createElement(
|
|
534
|
-
Navbar.Collapse,
|
|
535
|
-
{ id: 'basic-navbar-nav' },
|
|
536
|
-
isSticky && invertedLogo && React__default.createElement(
|
|
537
|
-
Nav.Item,
|
|
538
|
-
{ className: 'nav-mobile-logo' },
|
|
539
|
-
React__default.createElement(
|
|
540
|
-
'a',
|
|
541
|
-
{ href: '/' },
|
|
542
|
-
React__default.createElement('img', { src: invertedLogo, className: 'mobile-logo', style: { height: '38px' }, alt: website.title ? website.title : website.name ? website.name : 'Website Logo' })
|
|
438
|
+
) : null;
|
|
439
|
+
} else {
|
|
440
|
+
return row.url && row.name ? React__default.createElement(
|
|
441
|
+
'a',
|
|
442
|
+
{ key: index, href: Segment.Segment.getURL(row.url, row), target: row.blank ? '_blank' : '_self', className: 'nav-link' },
|
|
443
|
+
row.name
|
|
444
|
+
) : null;
|
|
445
|
+
}
|
|
446
|
+
})
|
|
543
447
|
)
|
|
544
448
|
),
|
|
545
449
|
React__default.createElement(
|
|
546
|
-
|
|
547
|
-
{ id: 'nav
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
) : null;
|
|
565
|
-
}
|
|
566
|
-
})
|
|
567
|
-
),
|
|
568
|
-
React__default.createElement(
|
|
569
|
-
'noscript',
|
|
450
|
+
Navbar.Collapse,
|
|
451
|
+
{ id: 'basic-navbar-nav' },
|
|
452
|
+
isSticky && invertedLogo && isDesktop && React__default.createElement(
|
|
453
|
+
Nav.Item,
|
|
454
|
+
{ className: 'nav-mobile-logo' },
|
|
455
|
+
React__default.createElement(
|
|
456
|
+
'a',
|
|
457
|
+
{ href: '/' },
|
|
458
|
+
React__default.createElement('img', { src: invertedLogo, className: 'mobile-logo', style: { height: '38px' }, alt: website.title ? website.title : website.name ? website.name : 'Website Logo' })
|
|
459
|
+
)
|
|
460
|
+
),
|
|
461
|
+
React__default.createElement(
|
|
462
|
+
Nav,
|
|
463
|
+
{ id: 'nav-links', style: { marginRight: 'auto' } },
|
|
464
|
+
dataObject && dataObject.map(function (row, index) {
|
|
465
|
+
if (row.subQuery && row.subQuery.length > 0) {
|
|
466
|
+
return row.name ? React__default.createElement(
|
|
467
|
+
'div',
|
|
570
468
|
null,
|
|
571
469
|
React__default.createElement(
|
|
572
|
-
|
|
573
|
-
|
|
470
|
+
NavDropdown,
|
|
471
|
+
{ key: index, title: row.name, id: 'basic-nav-dropdown' },
|
|
574
472
|
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
575
473
|
if (ddRow.type === 'divider') {
|
|
576
474
|
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
@@ -582,29 +480,48 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
582
480
|
) : null;
|
|
583
481
|
}
|
|
584
482
|
})
|
|
483
|
+
),
|
|
484
|
+
React__default.createElement(
|
|
485
|
+
'noscript',
|
|
486
|
+
null,
|
|
487
|
+
React__default.createElement(
|
|
488
|
+
'div',
|
|
489
|
+
null,
|
|
490
|
+
row.subQuery && row.subQuery.map(function (ddRow, subIndex) {
|
|
491
|
+
if (ddRow.type === 'divider') {
|
|
492
|
+
return React__default.createElement(NavDropdown.Divider, { key: subIndex });
|
|
493
|
+
} else {
|
|
494
|
+
return ddRow.url && ddRow.name ? React__default.createElement(
|
|
495
|
+
'a',
|
|
496
|
+
{ key: subIndex, href: Segment.Segment.getURL(ddRow.url, ddRow), target: ddRow.blank ? '_blank' : '_self', className: 'dropdown-item' },
|
|
497
|
+
ddRow.name
|
|
498
|
+
) : null;
|
|
499
|
+
}
|
|
500
|
+
})
|
|
501
|
+
)
|
|
585
502
|
)
|
|
586
|
-
)
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
)
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
503
|
+
) : null;
|
|
504
|
+
} else {
|
|
505
|
+
return row.url && row.name ? React__default.createElement(
|
|
506
|
+
'a',
|
|
507
|
+
{ key: index, href: Segment.Segment.getURL(row.url, row), target: row.blank ? '_blank' : '_self', className: 'nav-link' },
|
|
508
|
+
row.name
|
|
509
|
+
) : null;
|
|
510
|
+
}
|
|
511
|
+
})
|
|
512
|
+
)
|
|
513
|
+
),
|
|
514
|
+
website && React__default.createElement(
|
|
515
|
+
Navbar.Collapse,
|
|
516
|
+
{ id: 'basic-navbar-sub' },
|
|
517
|
+
React__default.createElement(
|
|
518
|
+
Nav,
|
|
519
|
+
{ className: 'mr-auto' },
|
|
520
|
+
socialFooterNav ? React__default.createElement(index_esm$2.SocialNavFooter, { website: website, showLogo: true }) : React__default.createElement(NavFooter.NavFooter, { website: website, showLogo: true })
|
|
521
|
+
)
|
|
605
522
|
)
|
|
606
523
|
),
|
|
607
|
-
|
|
524
|
+
isDesktop && React__default.createElement(SocialSearchComponent.SocialSearchComponent, { type: 'desktop', socialIconVariant: socialIconVariant, website: website, navID: 'navbar-ham' })
|
|
608
525
|
)
|
|
609
526
|
),
|
|
610
527
|
React__default.createElement(
|
|
@@ -619,7 +536,7 @@ var NavMagazine = function NavMagazine(props) {
|
|
|
619
536
|
React__default.createElement(
|
|
620
537
|
'style',
|
|
621
538
|
{ jsx: 'true' },
|
|
622
|
-
'\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width:
|
|
539
|
+
'\n .sticky-home {\n position: relative;\n top: -3px;\n left: -6px;\n cursor: pointer;\n }\n .nav-item svg {\n margin-bottom: 2px;\n }\n #nav-login,\n #nav-logout,\n #nav-register {\n padding: 0.5rem;\n cursor: pointer;\n }\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: none;\n }\n #nav-mobile-logout,\n #nav-mobile-login {\n position: absolute;\n right: 1rem;\n }\n #nav-mobile-register {\n position: absolute;\n left: 1rem;\n }\n @media screen and (max-width: 767px) {\n .logo {\n width: 100%;\n padding-left: 10px;\n padding-right: 10px;\n }\n }\n @media screen and (max-width: 1199px) {\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .nav-open {\n position: relative;\n }\n .mobile-nav .nav-toggle {\n width: 100%;\n }\n .android-nav {\n max-height: 80vh;\n }\n .ios-nav {\n max-height: none;\n }\n .mobile-nav .nav-toggle .navbar-toggler {\n float: left;\n height: 45px;\n }\n .mobile-nav .form-inline .mobile-search {\n width: auto;\n }\n .sticky-home {\n display: none;\n }\n .dropdown-menu {\n max-height: 315px;\n overflow: auto;\n }\n ::-webkit-scrollbar {\n width: 10px;\n }\n ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(214, 214, 214, 0.8);\n box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);\n }\n .navbar-expand-xl .show#basic-navbar-sub {\n display: block;\n }\n .navbar .mobile-nav .navbar-collapse.show {\n padding-bottom: 10px;\n border-bottom: 0.5px solid white;\n }\n .navbar .mobile-nav .navbar-collapse .form-inline {\n display: none;\n }\n .navbar .mobile-nav .navbar-collapse {\n margin-top: 15px;\n }\n .navbar .mobile-nav .navbar-collapse:last-child {\n border-bottom: none;\n margin-bottom: 0px;\n padding-bottom: 0px;\n margin-top: 0px;\n padding-top: 10px;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer ul {\n list-style-type: none;\n padding: inherit;\n margin-bottom: 0rem;\n }\n .navbar .mobile-nav .navbar-collapse .nav-footer .nav-link {\n text-transform: capitalize !important;\n font-weight: 300;\n }\n .navbar .mobile-nav .dropdown-item:focus {\n background-color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: white;\n white-space: inherit !important;\n margin-bottom: 5px;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: inherit;\n border: none;\n }\n .navbar .mobile-nav .dropdown-menu.show {\n max-height: 100px;\n }\n }\n @media screen and (min-width: 1200px) {\n #navbar-ham {\n overflow: visible !important;\n }\n #basic-navbar-sub {\n display: none !important;\n }\n .navbar .mobile-nav .dropdown-menu .dropdown-item {\n color: #696969;\n }\n .navbar .mobile-nav .dropdown-menu {\n background: white;\n border: 1 px solid #708090;\n }\n .navbar.bg-primary {\n z-index: 3000000 !important;\n }\n }\n @media screen and (max-width: 1199px) {\n #nav-mobile-login,\n #nav-mobile-logout,\n #nav-mobile-register {\n display: block;\n }\n .navbar-top {\n flex-direction: row;\n justify-content: space-around !important;\n align-items: center;\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n width: 100%;\n }\n }\n '
|
|
623
540
|
)
|
|
624
541
|
);
|
|
625
542
|
};
|