diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 6fac054b0..7525d156e 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -13698,15 +13698,11 @@ } }, padding: function() { - var css, navHeight, pageHeight, _ref; + var navHeight, pageHeight, _ref; navHeight = Header.bar.offsetHeight; pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0; - css = "body { padding-bottom: 1px; } .fourchan-ss-navigation.fixed.top-header:not(.autohide) body::before { top: " + navHeight + "px; } .fourchan-ss-navigation.fixed.bottom-header:not(.autohide) body::before { bottom: " + navHeight + "px; } .top-header:not(.autohide) body { padding-top: " + (navHeight + 1) + "px; } .bottom-header:not(.autohide) body { padding-bottom: " + (navHeight + 1) + "px; }"; - if (pageHeight) { - css += ".fourchan-ss-navigation.index.pagination-sticky-top body::before, .fourchan-ss-navigation.index.pagination-top body::before { top: " + pageHeight + "px; } .fourchan-ss-navigation.index.pagination-sticky-bottom body::before, .fourchan-ss-navigation.index.pagination-bottom body::before { bottom: " + pageHeight + "px; } .index.pagination-sticky-top body, .index.pagination-top body { padding-top: " + (pageHeight + 1) + "px; } .index.pagination-sticky-bottom body, .index.pagination-bottom body { padding-bottom: " + (pageHeight + 1) + "px; }"; - } - return Style.paddingSheet.textContent = css; + return Style.paddingSheet.textContent = ("body { padding-bottom: 15px; padding-top: 15px; } .fourchan-ss-navigation.fixed.top-header:not(.autohide) body::before { top: " + navHeight + "px; } .fourchan-ss-navigation.fixed.bottom-header:not(.autohide) body::before { bottom: " + navHeight + "px; } .top-header:not(.autohide) body { padding-top: " + (navHeight + 1) + "px; } .bottom-header:not(.autohide) body { padding-bottom: " + (navHeight + 1) + "px; } ") + (pageHeight ? ".fourchan-ss-navigation.index.pagination-sticky-top body::before, .fourchan-ss-navigation.index.pagination-top body::before { top: " + pageHeight + "px; } .fourchan-ss-navigation.index.pagination-sticky-bottom body::before, .fourchan-ss-navigation.index.pagination-bottom body::before { bottom: " + pageHeight + "px; } .index.pagination-sticky-top body, .index.pagination-top body { padding-top: " + (pageHeight + 1) + "px; } .index.pagination-sticky-bottom body, .index.pagination-bottom body { padding-bottom: " + (pageHeight + 1) + "px; }" : ''); }, color: function(hex) { this.hex = "#" + hex; diff --git a/builds/crx/script.js b/builds/crx/script.js index 16b0fdcba..52417226d 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -13690,15 +13690,11 @@ } }, padding: function() { - var css, navHeight, pageHeight, _ref; + var navHeight, pageHeight, _ref; navHeight = Header.bar.offsetHeight; pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0; - css = "body { padding-bottom: 1px; } .fourchan-ss-navigation.fixed.top-header:not(.autohide) body::before { top: " + navHeight + "px; } .fourchan-ss-navigation.fixed.bottom-header:not(.autohide) body::before { bottom: " + navHeight + "px; } .top-header:not(.autohide) body { padding-top: " + (navHeight + 1) + "px; } .bottom-header:not(.autohide) body { padding-bottom: " + (navHeight + 1) + "px; }"; - if (pageHeight) { - css += ".fourchan-ss-navigation.index.pagination-sticky-top body::before, .fourchan-ss-navigation.index.pagination-top body::before { top: " + pageHeight + "px; } .fourchan-ss-navigation.index.pagination-sticky-bottom body::before, .fourchan-ss-navigation.index.pagination-bottom body::before { bottom: " + pageHeight + "px; } .index.pagination-sticky-top body, .index.pagination-top body { padding-top: " + (pageHeight + 1) + "px; } .index.pagination-sticky-bottom body, .index.pagination-bottom body { padding-bottom: " + (pageHeight + 1) + "px; }"; - } - return Style.paddingSheet.textContent = css; + return Style.paddingSheet.textContent = ("body { padding-bottom: 15px; padding-top: 15px; } .fourchan-ss-navigation.fixed.top-header:not(.autohide) body::before { top: " + navHeight + "px; } .fourchan-ss-navigation.fixed.bottom-header:not(.autohide) body::before { bottom: " + navHeight + "px; } .top-header:not(.autohide) body { padding-top: " + (navHeight + 1) + "px; } .bottom-header:not(.autohide) body { padding-bottom: " + (navHeight + 1) + "px; } ") + (pageHeight ? ".fourchan-ss-navigation.index.pagination-sticky-top body::before, .fourchan-ss-navigation.index.pagination-top body::before { top: " + pageHeight + "px; } .fourchan-ss-navigation.index.pagination-sticky-bottom body::before, .fourchan-ss-navigation.index.pagination-bottom body::before { bottom: " + pageHeight + "px; } .index.pagination-sticky-top body, .index.pagination-top body { padding-top: " + (pageHeight + 1) + "px; } .index.pagination-sticky-bottom body, .index.pagination-bottom body { padding-bottom: " + (pageHeight + 1) + "px; }" : ''); }, color: function(hex) { this.hex = "#" + hex; diff --git a/src/General/css/padding.nav.css b/src/General/css/padding.nav.css index 976422fcc..d4a3f55e1 100644 --- a/src/General/css/padding.nav.css +++ b/src/General/css/padding.nav.css @@ -1,5 +1,6 @@ body { - padding-bottom: 1px; + padding-bottom: 15px; + padding-top: 15px; } .fourchan-ss-navigation.fixed.top-header:not(.autohide) body::before { top: #{navHeight}px; diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index f48a03f55..b847c02fa 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -175,12 +175,10 @@ Style = padding: -> navHeight = Header.bar.offsetHeight pageHeight = ($ '.pagelist', d.body)?.offsetHeight - css = """<%= grunt.file.read('src/General/css/padding.nav.css').replace(/\s+/g, ' ').trim() %>""" - - if pageHeight - css += """<%= grunt.file.read('src/General/css/padding.pages.css').replace(/\s+/g, ' ').trim() %>""" - - Style.paddingSheet.textContent = css + Style.paddingSheet.textContent = """<%= grunt.file.read('src/General/css/padding.nav.css').replace(/\s+/g, ' ').trim() %> """ + + if pageHeight + """<%= grunt.file.read('src/General/css/padding.pages.css').replace(/\s+/g, ' ').trim() %>""" + else '' color: (hex) -> @hex = "#" + hex