Unread part of #579
This commit is contained in:
parent
cab9cef36e
commit
9dc9d96574
@ -4295,7 +4295,7 @@
|
||||
top = root.getBoundingClientRect().top;
|
||||
if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
|
||||
headRect = Header.toggle.getBoundingClientRect();
|
||||
top -= headRect.top + headRect.height;
|
||||
top -= headRect.top + headRect.height - 10;
|
||||
}
|
||||
return top;
|
||||
},
|
||||
@ -4305,7 +4305,7 @@
|
||||
bottom = clientHeight - root.getBoundingClientRect().bottom;
|
||||
if (Conf['Bottom Header']) {
|
||||
headRect = Header.toggle.getBoundingClientRect();
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height;
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height - 10;
|
||||
}
|
||||
return bottom;
|
||||
},
|
||||
@ -13798,8 +13798,8 @@
|
||||
padding: function() {
|
||||
var navHeight, pageHeight, _ref;
|
||||
navHeight = Header.bar.offsetHeight;
|
||||
pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0;
|
||||
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; }" : '');
|
||||
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 + 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; }" : '');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -4336,7 +4336,7 @@
|
||||
top = root.getBoundingClientRect().top;
|
||||
if (Conf['Fixed Header'] && !Conf['Bottom Header']) {
|
||||
headRect = Header.toggle.getBoundingClientRect();
|
||||
top -= headRect.top + headRect.height;
|
||||
top -= headRect.top + headRect.height - 10;
|
||||
}
|
||||
return top;
|
||||
},
|
||||
@ -4346,7 +4346,7 @@
|
||||
bottom = clientHeight - root.getBoundingClientRect().bottom;
|
||||
if (Conf['Bottom Header']) {
|
||||
headRect = Header.toggle.getBoundingClientRect();
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height;
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height - 10;
|
||||
}
|
||||
return bottom;
|
||||
},
|
||||
@ -13801,8 +13801,8 @@
|
||||
padding: function() {
|
||||
var navHeight, pageHeight, _ref;
|
||||
navHeight = Header.bar.offsetHeight;
|
||||
pageHeight = (_ref = $('.pagelist', d.body)) != null ? _ref.offsetHeight : void 0;
|
||||
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; }" : '');
|
||||
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 + 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; }" : '');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -342,7 +342,7 @@ Header =
|
||||
{top} = root.getBoundingClientRect()
|
||||
if Conf['Fixed Header'] and not Conf['Bottom Header']
|
||||
headRect = Header.toggle.getBoundingClientRect()
|
||||
top -= headRect.top + headRect.height
|
||||
top -= headRect.top + headRect.height - 10
|
||||
top
|
||||
|
||||
getBottomOf: (root) ->
|
||||
@ -350,8 +350,9 @@ Header =
|
||||
bottom = clientHeight - root.getBoundingClientRect().bottom
|
||||
if Conf['Bottom Header']
|
||||
headRect = Header.toggle.getBoundingClientRect()
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height
|
||||
bottom -= clientHeight - headRect.bottom + headRect.height - 10
|
||||
bottom
|
||||
|
||||
isHidden: ->
|
||||
{top} = Header.bar.getBoundingClientRect()
|
||||
if Conf['Bottom header']
|
||||
|
||||
@ -12,5 +12,5 @@ body {
|
||||
padding-top: #{navHeight + 1}px;
|
||||
}
|
||||
.bottom-header:not(.autohide) body {
|
||||
padding-bottom: #{navHeight + 1}px;
|
||||
padding-bottom: #{navHeight + 15}px;
|
||||
}
|
||||
@ -12,5 +12,5 @@
|
||||
}
|
||||
.index.pagination-sticky-bottom body,
|
||||
.index.pagination-bottom body {
|
||||
padding-bottom: #{pageHeight + 1}px;
|
||||
padding-bottom: #{pageHeight + 15}px;
|
||||
}
|
||||
@ -188,7 +188,7 @@ Style =
|
||||
|
||||
padding: ->
|
||||
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() %> """ +
|
||||
if pageHeight
|
||||
"""<%= grunt.file.read('src/General/css/padding.pages.css').replace(/\s+/g, ' ').trim() %>"""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user