@mjhls/mjh-framework 1.0.604-hamMagazine-v7 → 1.0.604-hamMagazine-v8

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.
@@ -160,8 +160,10 @@ var HamMagazine = function HamMagazine(props) {
160
160
  React.useEffect(function () {
161
161
  var navOffsetTop = document.getElementById('navbar-ham') && document.getElementById('navbar-ham').offsetTop;
162
162
  var adSection = document.querySelector('.AD728x90');
163
- var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
163
+ var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
164
+
164
165
  setTopHeight(mastHeadHeight);
166
+ console.log('mastHeight Head:::::::::::::::::::', mastHeadHeight);
165
167
  if (window.pageYOffset > navOffsetTop) {
166
168
  if (navRef.current && navRef.current.style) {
167
169
  topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
@@ -176,13 +178,13 @@ var HamMagazine = function HamMagazine(props) {
176
178
  if (navRef.current && navRef.current.style) {
177
179
  topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
178
180
  navRef.current.style.position = 'fixed';
179
- navRef.current.style.top = 0;
181
+ if (mastHeadHeight) navRef.current.style.top = mastHeadHeight + 'px';
180
182
  navRef.current.style.width = '100%';
181
183
  navRef.current.style.zIndex = '99999';
182
184
  }
183
185
  } else {
184
186
  if (navRef.current && navRef.current.style) {
185
- var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
187
+ var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
186
188
 
187
189
  topNavRef.current.style.paddingBottom = '0';
188
190
  navRef.current.style.position = 'relative';
@@ -199,7 +201,7 @@ var HamMagazine = function HamMagazine(props) {
199
201
  var trackScrolling = function trackScrolling() {
200
202
  var offsetTop = navRef.current.getBoundingClientRect().top;
201
203
  var navLinks = document.getElementById('nav-links');
202
- var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
204
+ var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight - 4;
203
205
  if (mastHeadHeight) offsetTop = offsetTop - mastHeadHeight;
204
206
  if (offsetTop <= 0) {
205
207
  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;
@@ -153,8 +153,10 @@ var HamMagazine = function HamMagazine(props) {
153
153
  useEffect(function () {
154
154
  var navOffsetTop = document.getElementById('navbar-ham') && document.getElementById('navbar-ham').offsetTop;
155
155
  var adSection = document.querySelector('.AD728x90');
156
- var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
156
+ var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
157
+
157
158
  setTopHeight(mastHeadHeight);
159
+ console.log('mastHeight Head:::::::::::::::::::', mastHeadHeight);
158
160
  if (window.pageYOffset > navOffsetTop) {
159
161
  if (navRef.current && navRef.current.style) {
160
162
  topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
@@ -169,13 +171,13 @@ var HamMagazine = function HamMagazine(props) {
169
171
  if (navRef.current && navRef.current.style) {
170
172
  topNavRef.current.style.paddingBottom = navRef.current.offsetHeight + 'px';
171
173
  navRef.current.style.position = 'fixed';
172
- navRef.current.style.top = 0;
174
+ if (mastHeadHeight) navRef.current.style.top = mastHeadHeight + 'px';
173
175
  navRef.current.style.width = '100%';
174
176
  navRef.current.style.zIndex = '99999';
175
177
  }
176
178
  } else {
177
179
  if (navRef.current && navRef.current.style) {
178
- var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight : 0;
180
+ var _mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight ? document.querySelector('.nav-brands').offsetHeight - 4 : 0;
179
181
 
180
182
  topNavRef.current.style.paddingBottom = '0';
181
183
  navRef.current.style.position = 'relative';
@@ -192,7 +194,7 @@ var HamMagazine = function HamMagazine(props) {
192
194
  var trackScrolling = function trackScrolling() {
193
195
  var offsetTop = navRef.current.getBoundingClientRect().top;
194
196
  var navLinks = document.getElementById('nav-links');
195
- var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight;
197
+ var mastHeadHeight = document.querySelector('.nav-brands') && document.querySelector('.nav-brands').offsetHeight - 4;
196
198
  if (mastHeadHeight) offsetTop = offsetTop - mastHeadHeight;
197
199
  if (offsetTop <= 0) {
198
200
  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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.604-hamMagazine-v7",
3
+ "version": "1.0.604-hamMagazine-v8",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",