Barış Soner Uşaklı 3 years ago
commit f46755cf33

@ -100,6 +100,10 @@
&+.timeline-event:before { &+.timeline-event:before {
display: none; display: none;
} }
.timeline-text.timeago {
display: none;
}
} }
} }
@ -145,6 +149,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink: 0;
width: 32px; width: 32px;
height: 32px; height: 32px;
padding: 0; padding: 0;

@ -18,6 +18,10 @@ body {
min-height: 100%; min-height: 100%;
} }
#panel {
padding-top: var(--panel-offset);
}
@media (max-width: @screen-xs-max) { @media (max-width: @screen-xs-max) {
.slideout-panel { .slideout-panel {
min-height: 100vh; min-height: 100vh;

@ -41,7 +41,7 @@
} }
.topic-header { .topic-header {
position: sticky; position: sticky;
top: @navbar-height; top: calc(var(--panel-offset) + @navbar-height);
background-color: @body-bg; background-color: @body-bg;
z-index: @zindex-navbar; z-index: @zindex-navbar;
margin-left: -15px; margin-left: -15px;
@ -50,6 +50,12 @@
padding-right: 15px; padding-right: 15px;
} }
@media (max-width: @screen-md-max) {
.topic-header {
top: calc(var(--panel-offset) + @navbar-height - 70px);
}
}
.topic-info { .topic-info {
border-bottom: 1px solid @post-border-color; border-bottom: 1px solid @post-border-color;
margin-bottom: 10px; margin-bottom: 10px;

@ -1,6 +1,6 @@
{ {
"name": "nodebb-theme-persona", "name": "nodebb-theme-persona",
"version": "11.3.2", "version": "11.3.4",
"nbbpm": { "nbbpm": {
"compatibility": "^1.18.0" "compatibility": "^1.18.0"
}, },

@ -7,10 +7,10 @@ $(document).ready(function () {
setupEditedByIcon(); setupEditedByIcon();
setupQuickReply(); setupQuickReply();
configureNavbarHiding(); configureNavbarHiding();
fixHeaderPadding(); updatePanelOffset();
$(window).on('resize', utils.debounce(configureNavbarHiding, 200)); $(window).on('resize', utils.debounce(configureNavbarHiding, 200));
$(window).on('resize', fixHeaderPadding); $(window).on('resize', updatePanelOffset);
$(window).on('action:app.loggedIn', function () { $(window).on('action:app.loggedIn', function () {
setupMobileMenu(); setupMobileMenu();
@ -21,25 +21,24 @@ $(document).ready(function () {
setupMobileMenu(); setupMobileMenu();
}); });
function fixHeaderPadding() { function updatePanelOffset() {
var env = utils.findBootstrapEnvironment(); var env = utils.findBootstrapEnvironment();
const headerEl = document.getElementById('header-menu'); const headerEl = document.getElementById('header-menu');
const panelEl = document.getElementById('panel');
if (!headerEl || !panelEl) { if (!headerEl) {
return; return;
} }
const headerRect = headerEl.getBoundingClientRect(); const headerRect = headerEl.getBoundingClientRect();
const headerStyle = window.getComputedStyle(headerEl); const headerStyle = window.getComputedStyle(headerEl);
let paddingTop = headerRect.y + headerRect.height + (parseInt(headerStyle.marginTop, 10) || 0) + (parseInt(headerStyle.marginBottom, 10) || 0); let offset = headerRect.y + headerRect.height + (parseInt(headerStyle.marginTop, 10) || 0) + (parseInt(headerStyle.marginBottom, 10) || 0);
// body element itself introduces a hardcoded 70px padding on desktop resolution // body element itself introduces a hardcoded 70px padding on desktop resolution
if (env === 'lg') { if (env === 'lg') {
paddingTop -= 70; offset -= 70;
} }
panelEl.style.paddingTop = `${paddingTop}px`; document.documentElement.style.setProperty('--panel-offset', `${offset}px`);
} }
var lastBSEnv = ''; var lastBSEnv = '';

Loading…
Cancel
Save