Unread part of #579

This commit is contained in:
Zixaphir 2014-02-16 04:16:33 -07:00
parent cab9cef36e
commit 9dc9d96574
6 changed files with 14 additions and 13 deletions

View File

@ -4295,7 +4295,7 @@
top = root.getBoundingClientRect().top; top = root.getBoundingClientRect().top;
if (Conf['Fixed Header'] && !Conf['Bottom Header']) { if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
headRect = Header.toggle.getBoundingClientRect(); headRect = Header.toggle.getBoundingClientRect();
top -= headRect.top + headRect.height; top -= headRect.top + headRect.height - 10;
} }
return top; return top;
}, },
@ -4305,7 +4305,7 @@
bottom = clientHeight - root.getBoundingClientRect().bottom; bottom = clientHeight - root.getBoundingClientRect().bottom;
if (Conf['Bottom Header']) { if (Conf['Bottom Header']) {
headRect = Header.toggle.getBoundingClientRect(); headRect = Header.toggle.getBoundingClientRect();
bottom -= clientHeight - headRect.bottom + headRect.height; bottom -= clientHeight - headRect.bottom + headRect.height - 10;
} }
return bottom; return bottom;
}, },
@ -13798,8 +13798,8 @@
padding: function() { padding: function() {
var navHeight, pageHeight, _ref; var navHeight, pageHeight, _ref;
navHeight = Header.bar.offsetHeight; navHeight = Header.bar.offsetHeight;
pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0; pageHeight = ((_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0) || 15;
return Style.sheets.padding.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; }" : ''); return Style.sheets.padding.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 + 15) + "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 + 15) + "px; }" : '');
} }
}; };

View File

@ -4336,7 +4336,7 @@
top = root.getBoundingClientRect().top; top = root.getBoundingClientRect().top;
if (Conf['Fixed Header'] && !Conf['Bottom Header']) { if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
headRect = Header.toggle.getBoundingClientRect(); headRect = Header.toggle.getBoundingClientRect();
top -= headRect.top + headRect.height; top -= headRect.top + headRect.height - 10;
} }
return top; return top;
}, },
@ -4346,7 +4346,7 @@
bottom = clientHeight - root.getBoundingClientRect().bottom; bottom = clientHeight - root.getBoundingClientRect().bottom;
if (Conf['Bottom Header']) { if (Conf['Bottom Header']) {
headRect = Header.toggle.getBoundingClientRect(); headRect = Header.toggle.getBoundingClientRect();
bottom -= clientHeight - headRect.bottom + headRect.height; bottom -= clientHeight - headRect.bottom + headRect.height - 10;
} }
return bottom; return bottom;
}, },
@ -13801,8 +13801,8 @@
padding: function() { padding: function() {
var navHeight, pageHeight, _ref; var navHeight, pageHeight, _ref;
navHeight = Header.bar.offsetHeight; navHeight = Header.bar.offsetHeight;
pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0; pageHeight = ((_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0) || 15;
return Style.sheets.padding.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; }" : ''); return Style.sheets.padding.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 + 15) + "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 + 15) + "px; }" : '');
} }
}; };

View File

@ -342,7 +342,7 @@ Header =
{top} = root.getBoundingClientRect() {top} = root.getBoundingClientRect()
if Conf['Fixed Header'] and not Conf['Bottom Header'] if Conf['Fixed Header'] and not Conf['Bottom Header']
headRect = Header.toggle.getBoundingClientRect() headRect = Header.toggle.getBoundingClientRect()
top -= headRect.top + headRect.height top -= headRect.top + headRect.height - 10
top top
getBottomOf: (root) -> getBottomOf: (root) ->
@ -350,8 +350,9 @@ Header =
bottom = clientHeight - root.getBoundingClientRect().bottom bottom = clientHeight - root.getBoundingClientRect().bottom
if Conf['Bottom Header'] if Conf['Bottom Header']
headRect = Header.toggle.getBoundingClientRect() headRect = Header.toggle.getBoundingClientRect()
bottom -= clientHeight - headRect.bottom + headRect.height bottom -= clientHeight - headRect.bottom + headRect.height - 10
bottom bottom
isHidden: -> isHidden: ->
{top} = Header.bar.getBoundingClientRect() {top} = Header.bar.getBoundingClientRect()
if Conf['Bottom header'] if Conf['Bottom header']

View File

@ -12,5 +12,5 @@ body {
padding-top: #{navHeight + 1}px; padding-top: #{navHeight + 1}px;
} }
.bottom-header:not(.autohide) body { .bottom-header:not(.autohide) body {
padding-bottom: #{navHeight + 1}px; padding-bottom: #{navHeight + 15}px;
} }

View File

@ -12,5 +12,5 @@
} }
.index.pagination-sticky-bottom body, .index.pagination-sticky-bottom body,
.index.pagination-bottom body { .index.pagination-bottom body {
padding-bottom: #{pageHeight + 1}px; padding-bottom: #{pageHeight + 15}px;
} }

View File

@ -188,7 +188,7 @@ Style =
padding: -> padding: ->
navHeight = Header.bar.offsetHeight navHeight = Header.bar.offsetHeight
pageHeight = ($ '.pagelist', d.body)?.offsetHeight pageHeight = ($ '.pagelist', d.body)?.offsetHeight or 15
Style.sheets.padding.textContent = """<%= grunt.file.read('src/General/css/padding.nav.css').replace(/\s+/g, ' ').trim() %> """ + Style.sheets.padding.textContent = """<%= grunt.file.read('src/General/css/padding.nav.css').replace(/\s+/g, ' ').trim() %> """ +
if pageHeight if pageHeight
"""<%= grunt.file.read('src/General/css/padding.pages.css').replace(/\s+/g, ' ').trim() %>""" """<%= grunt.file.read('src/General/css/padding.pages.css').replace(/\s+/g, ' ').trim() %>"""