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