Sane defaults for body padding
This commit is contained in:
parent
9a96253e62
commit
9d69beb137
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user