mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-12-19 20:12:52 +02:00
Simplifies the DOM structure of cheat sheet page
This commit is contained in:
parent
a4677555c1
commit
608acc7218
@ -67,7 +67,7 @@ p {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#main .nerd-font-cheat-sheet .column span {
|
||||
#main .nerd-font-cheat-sheet .column .class-name, #main .nerd-font-cheat-sheet .column .codepoint {
|
||||
font-family: 'mono';
|
||||
font-size: 12px;
|
||||
max-width: 98px;
|
||||
@ -75,7 +75,7 @@ p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#main .nerd-font-cheat-sheet .nerd-font {
|
||||
#main .nerd-font-cheat-sheet .nf {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
15
site.js
15
site.js
@ -125,15 +125,18 @@ $(document).ready(function (){
|
||||
var i = 0;
|
||||
var elements = container.find('.column');
|
||||
var length = elements.length;
|
||||
var element;
|
||||
var elementClassName, elementCodePoint;
|
||||
|
||||
for (; i < length; i++) {
|
||||
element = $(elements[i]).find('span');
|
||||
if (element) {
|
||||
if (element.text().toUpperCase().indexOf(filter) > -1) {
|
||||
element.parent().show();
|
||||
elementClassName = $(elements[i]).find('div.class-name');
|
||||
elementCodePoint = $(elements[i]).find('div.codepoint');
|
||||
if (elementClassName && elementCodePoint) {
|
||||
if (elementClassName.text().toUpperCase().indexOf(filter) > -1
|
||||
|| elementCodePoint.text().toUpperCase().indexOf(filter) > -1
|
||||
) {
|
||||
elementClassName.parent().show();
|
||||
} else {
|
||||
element.parent().hide();
|
||||
elementClassName.parent().hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user