1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-06 21:49:40 +02:00

Reworks cheat sheet layout with flexbox and clean-up console.logs

This commit is contained in:
Ryan L McIntyre 2020-12-05 03:12:10 -08:00
parent f9ccf1c4a0
commit fb920fc0fd
3 changed files with 10 additions and 3 deletions

View File

@ -46,6 +46,11 @@ a.nerd-font-button:before {
}
}
#icon-cheat-sheet .container {
max-width: none;
width: auto;
}
#main .nerd-font-buttons {
line-height: 4em;
}
@ -62,6 +67,10 @@ a.nerd-font-button:before {
overflow-x: hidden;
overflow-y: scroll;
padding-top: 20px;
max-width: none;
justify-content: center;
display: flex;
flex-flow: row wrap;
}
#glyphCheatSheet .column {

View File

@ -12,7 +12,7 @@ style: container
<input type="text" id="glyphSearch" placeholder="Search for glyphs/icons..." title="Type in a glyph name or hex codepoint" class="nerd-font-cheat-sheet-search" />
<div id="glyphCheatSheet" class="nerd-font-cheat-sheet container">
<div id="glyphCheatSheet" class="nerd-font-cheat-sheet">
<div class="column">
<div class="nf nf-custom-c center"></div>
<div class="class-name">nf-custom-c</div><div class="codepoint">e61e</div>

View File

@ -232,7 +232,6 @@ document.addEventListener('DOMContentLoaded', function () {
'mouseenter',
function (e) {
if (e.target.classList.contains('column')) {
console.log('entered column');
// add Node
const newNode = document.createElement('span');
const copyTextNode = document.createElement('span');
@ -264,7 +263,6 @@ document.addEventListener('DOMContentLoaded', function () {
'mouseleave',
function (e) {
if (e.target.classList.contains('column')) {
console.log('left column');
e.target.querySelector('.glyph-popout-copy-clipboard').remove();
}
},