mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
Update search page style
- Fix having multiple vertical scrollbars - Update icons lazy loading accordingly
This commit is contained in:
parent
cd2e548e98
commit
1df198249a
@ -110,9 +110,9 @@ a.nerd-font-button:before {
|
||||
}
|
||||
|
||||
#main .nerd-font-cheat-sheet {
|
||||
max-height: 520px;
|
||||
// max-height: 520px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
// overflow-y: scroll;
|
||||
margin-top: 40px;
|
||||
max-width: none;
|
||||
justify-content: center;
|
||||
|
@ -23,9 +23,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
));
|
||||
|
||||
elementGlyphCheatSheet.onscroll = function () {
|
||||
const threshold = 10;
|
||||
if ((elementGlyphCheatSheet.offsetHeight + elementGlyphCheatSheet.scrollTop + threshold) >= elementGlyphCheatSheet.scrollHeight) {
|
||||
document.onscroll = function () {
|
||||
const elementDoc = document.documentElement;
|
||||
const elementIconsTop = elementGlyphCheatSheet.getBoundingClientRect().top + elementDoc.scrollTop;
|
||||
|
||||
if (elementDoc.clientHeight + elementDoc.scrollTop >=
|
||||
elementGlyphCheatSheet.clientHeight + elementIconsTop) {
|
||||
console.log("load more search results");
|
||||
loadMoreSearchResults();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user