@mjhls/mjh-framework 1.0.604-hamMagazine-v7 → 1.0.604-hamMagazine-v9
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/dist/cjs/HamMagazine.js +11 -5
- package/dist/cjs/index.js +0 -5
- package/dist/esm/HamMagazine.js +11 -5
- package/dist/esm/index.js +0 -4
- package/package.json +1 -1
package/dist/cjs/HamMagazine.js
CHANGED
|
@@ -108,8 +108,12 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
108
108
|
React.useEffect(function () {
|
|
109
109
|
// handling the top mast component
|
|
110
110
|
var topNavHeight = document.querySelector('.top-nav-secondary') && document.querySelector('.top-nav-secondary').offsetHeight;
|
|
111
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
|
|
112
|
+
var topNav = 0;
|
|
113
|
+
if (mastHeadHeight) topNav = topNav + mastHeadHeight;else if (topNavHeight) topNav = topNav + topNavHeight;
|
|
114
|
+
if (navRef.current.offsetHeight) topNav = topNav + navRef.current.offsetHeight;
|
|
111
115
|
// Setting the top of the search component based on the offset of navigation component.
|
|
112
|
-
searchRef.current.style.top =
|
|
116
|
+
searchRef.current.style.top = topNav + 1 + 'px';
|
|
113
117
|
document.addEventListener('scroll', trackScrolling);
|
|
114
118
|
return function () {
|
|
115
119
|
document.removeEventListener('scroll', trackScrolling);
|
|
@@ -160,8 +164,10 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
160
164
|
React.useEffect(function () {
|
|
161
165
|
var navOffsetTop = document.getElementById('navbar-ham') && document.getElementById('navbar-ham').offsetTop;
|
|
162
166
|
var adSection = document.querySelector('.AD728x90');
|
|
163
|
-
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
|
|
167
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
|
|
168
|
+
|
|
164
169
|
setTopHeight(mastHeadHeight);
|
|
170
|
+
console.log('mastHeight Head:::::::::::::::::::', mastHeadHeight);
|
|
165
171
|
if (window.pageYOffset > navOffsetTop) {
|
|
166
172
|
if (navRef.current && navRef.current.style) {
|
|
167
173
|
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
@@ -176,13 +182,13 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
176
182
|
if (navRef.current && navRef.current.style) {
|
|
177
183
|
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
178
184
|
navRef.current.style.position = 'fixed';
|
|
179
|
-
navRef.current.style.top =
|
|
185
|
+
if (mastHeadHeight) navRef.current.style.top = mastHeadHeight + 'px';
|
|
180
186
|
navRef.current.style.width = '100%';
|
|
181
187
|
navRef.current.style.zIndex = '99999';
|
|
182
188
|
}
|
|
183
189
|
} else {
|
|
184
190
|
if (navRef.current && navRef.current.style) {
|
|
185
|
-
var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
|
|
191
|
+
var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
|
|
186
192
|
|
|
187
193
|
topNavRef.current.style.paddingBottom = '0';
|
|
188
194
|
navRef.current.style.position = 'relative';
|
|
@@ -199,7 +205,7 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
199
205
|
var trackScrolling = function trackScrolling() {
|
|
200
206
|
var offsetTop = navRef.current.getBoundingClientRect().top;
|
|
201
207
|
var navLinks = document.getElementById('nav-links');
|
|
202
|
-
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
|
|
208
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight - 4;
|
|
203
209
|
if (mastHeadHeight) offsetTop = offsetTop - mastHeadHeight;
|
|
204
210
|
if (offsetTop <= 0) {
|
|
205
211
|
setIsSticky(true);
|
package/dist/cjs/index.js
CHANGED
|
@@ -157,10 +157,6 @@ var SetCookie = require('./SetCookie.js');
|
|
|
157
157
|
require('./index-bd6c9f56.js');
|
|
158
158
|
var getRelatedArticle = require('./getRelatedArticle.js');
|
|
159
159
|
var getQuery = require('./getQuery.js');
|
|
160
|
-
var Auth = require('./Auth.js');
|
|
161
|
-
require('swr');
|
|
162
|
-
require('passport-local');
|
|
163
|
-
require('mysql');
|
|
164
160
|
var getTargeting = require('./getTargeting-5a0b8ee4.js');
|
|
165
161
|
var View = require('./View.js');
|
|
166
162
|
var urlFor = require('./urlFor.js');
|
|
@@ -246,7 +242,6 @@ exports.getSeriesDetail = getSeriesDetail;
|
|
|
246
242
|
exports.SetCookie = SetCookie;
|
|
247
243
|
exports.getRelatedArticle = getRelatedArticle;
|
|
248
244
|
exports.getQuery = getQuery;
|
|
249
|
-
exports.Auth = Auth.default;
|
|
250
245
|
exports.getTargeting = getTargeting.getTargeting;
|
|
251
246
|
exports.View = View;
|
|
252
247
|
exports.urlFor = urlFor;
|
package/dist/esm/HamMagazine.js
CHANGED
|
@@ -101,8 +101,12 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
101
101
|
useEffect(function () {
|
|
102
102
|
// handling the top mast component
|
|
103
103
|
var topNavHeight = document.querySelector('.top-nav-secondary') && document.querySelector('.top-nav-secondary').offsetHeight;
|
|
104
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
|
|
105
|
+
var topNav = 0;
|
|
106
|
+
if (mastHeadHeight) topNav = topNav + mastHeadHeight;else if (topNavHeight) topNav = topNav + topNavHeight;
|
|
107
|
+
if (navRef.current.offsetHeight) topNav = topNav + navRef.current.offsetHeight;
|
|
104
108
|
// Setting the top of the search component based on the offset of navigation component.
|
|
105
|
-
searchRef.current.style.top =
|
|
109
|
+
searchRef.current.style.top = topNav + 1 + 'px';
|
|
106
110
|
document.addEventListener('scroll', trackScrolling);
|
|
107
111
|
return function () {
|
|
108
112
|
document.removeEventListener('scroll', trackScrolling);
|
|
@@ -153,8 +157,10 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
153
157
|
useEffect(function () {
|
|
154
158
|
var navOffsetTop = document.getElementById('navbar-ham') && document.getElementById('navbar-ham').offsetTop;
|
|
155
159
|
var adSection = document.querySelector('.AD728x90');
|
|
156
|
-
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
|
|
160
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
|
|
161
|
+
|
|
157
162
|
setTopHeight(mastHeadHeight);
|
|
163
|
+
console.log('mastHeight Head:::::::::::::::::::', mastHeadHeight);
|
|
158
164
|
if (window.pageYOffset > navOffsetTop) {
|
|
159
165
|
if (navRef.current && navRef.current.style) {
|
|
160
166
|
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
@@ -169,13 +175,13 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
169
175
|
if (navRef.current && navRef.current.style) {
|
|
170
176
|
topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
|
|
171
177
|
navRef.current.style.position = 'fixed';
|
|
172
|
-
navRef.current.style.top =
|
|
178
|
+
if (mastHeadHeight) navRef.current.style.top = mastHeadHeight + 'px';
|
|
173
179
|
navRef.current.style.width = '100%';
|
|
174
180
|
navRef.current.style.zIndex = '99999';
|
|
175
181
|
}
|
|
176
182
|
} else {
|
|
177
183
|
if (navRef.current && navRef.current.style) {
|
|
178
|
-
var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
|
|
184
|
+
var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
|
|
179
185
|
|
|
180
186
|
topNavRef.current.style.paddingBottom = '0';
|
|
181
187
|
navRef.current.style.position = 'relative';
|
|
@@ -192,7 +198,7 @@ var HamMagazine = function HamMagazine(props) {
|
|
|
192
198
|
var trackScrolling = function trackScrolling() {
|
|
193
199
|
var offsetTop = navRef.current.getBoundingClientRect().top;
|
|
194
200
|
var navLinks = document.getElementById('nav-links');
|
|
195
|
-
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
|
|
201
|
+
var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight - 4;
|
|
196
202
|
if (mastHeadHeight) offsetTop = offsetTop - mastHeadHeight;
|
|
197
203
|
if (offsetTop <= 0) {
|
|
198
204
|
setIsSticky(true);
|
package/dist/esm/index.js
CHANGED
|
@@ -153,10 +153,6 @@ export { default as SetCookie } from './SetCookie.js';
|
|
|
153
153
|
import './index-db3bb315.js';
|
|
154
154
|
export { default as getRelatedArticle } from './getRelatedArticle.js';
|
|
155
155
|
export { default as getQuery } from './getQuery.js';
|
|
156
|
-
export { default as Auth } from './Auth.js';
|
|
157
|
-
import 'swr';
|
|
158
|
-
import 'passport-local';
|
|
159
|
-
import 'mysql';
|
|
160
156
|
export { g as getTargeting } from './getTargeting-962c9cf6.js';
|
|
161
157
|
export { default as View } from './View.js';
|
|
162
158
|
export { default as urlFor } from './urlFor.js';
|