nodebb-theme-persona 11.3.0 → 11.3.1
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/package.json +1 -1
- package/public/persona.js +6 -2
package/package.json
CHANGED
package/public/persona.js
CHANGED
|
@@ -25,17 +25,21 @@ $(document).ready(function () {
|
|
|
25
25
|
var env = utils.findBootstrapEnvironment();
|
|
26
26
|
const headerEl = document.getElementById('header-menu');
|
|
27
27
|
const panelEl = document.getElementById('panel');
|
|
28
|
+
|
|
29
|
+
if (!headerEl || !panelEl) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
const headerRect = headerEl.getBoundingClientRect();
|
|
29
34
|
const headerStyle = window.getComputedStyle(headerEl);
|
|
30
|
-
let paddingTop = headerRect.y + headerRect.height + (parseInt(headerStyle.marginTop, 10) || 0) + (parseInt(headerStyle.marginBottom, 10) || 0);
|
|
31
35
|
|
|
36
|
+
let paddingTop = headerRect.y + headerRect.height + (parseInt(headerStyle.marginTop, 10) || 0) + (parseInt(headerStyle.marginBottom, 10) || 0);
|
|
32
37
|
// body element itself introduces a hardcoded 70px padding on desktop resolution
|
|
33
38
|
if (env === 'lg') {
|
|
34
39
|
paddingTop -= 70;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
panelEl.style.paddingTop = `${paddingTop}px`;
|
|
38
|
-
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
var lastBSEnv = '';
|