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 {
|
#main .nerd-font-cheat-sheet {
|
||||||
max-height: 520px;
|
// max-height: 520px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: scroll;
|
// overflow-y: scroll;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -23,9 +23,12 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
elementGlyphCheatSheet.onscroll = function () {
|
document.onscroll = function () {
|
||||||
const threshold = 10;
|
const elementDoc = document.documentElement;
|
||||||
if ((elementGlyphCheatSheet.offsetHeight + elementGlyphCheatSheet.scrollTop + threshold) >= elementGlyphCheatSheet.scrollHeight) {
|
const elementIconsTop = elementGlyphCheatSheet.getBoundingClientRect().top + elementDoc.scrollTop;
|
||||||
|
|
||||||
|
if (elementDoc.clientHeight + elementDoc.scrollTop >=
|
||||||
|
elementGlyphCheatSheet.clientHeight + elementIconsTop) {
|
||||||
console.log("load more search results");
|
console.log("load more search results");
|
||||||
loadMoreSearchResults();
|
loadMoreSearchResults();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user