From bd7087a5282294ca264374d67cb1f18a57124e9b Mon Sep 17 00:00:00 2001 From: Ryan L McIntyre Date: Sun, 28 Jul 2019 10:42:00 -0700 Subject: [PATCH] Clean-up --- _includes/css/nerd-font-tweaks.css | 30 -------------- _posts/2017-01-04-icon-cheat-sheet.md | 4 +- site.js | 59 --------------------------- 3 files changed, 1 insertion(+), 92 deletions(-) diff --git a/_includes/css/nerd-font-tweaks.css b/_includes/css/nerd-font-tweaks.css index 19f9942b0..73168b6b3 100644 --- a/_includes/css/nerd-font-tweaks.css +++ b/_includes/css/nerd-font-tweaks.css @@ -42,7 +42,6 @@ p { max-height: 480px; overflow-x: hidden; overflow-y: scroll; - /* padding-top: 60px; */ padding-top: 20px; } @@ -67,9 +66,6 @@ p { border: 2px solid #0fbfcf; color: #0fbfcf !important; cursor: pointer; - /* border-top: none; */ - /* border-top-left-radius: unset; */ - /* border-top-right-radius: unset; */ } #main .nerd-font-cheat-sheet .column:hover .codepoint { @@ -120,22 +116,6 @@ p { text-align: left; } - -/* #main .nerd-font-cheat-sheet .glyph-popout-copy-clipboard { - background: #585547; - border: 2px solid #0fbfcf; - border-bottom: none; - display: block; - position: absolute; - bottom: 144px; - border-top-right-radius: 5px; - border-top-left-radius: 5px; - padding-left: 10px; - padding-right: 10px; - left: -2px; - right: -2px; -} */ - #main .nerd-font-cheat-sheet .glyph-popout-copy-clipboard { background: #585547; border: 2px solid #0fbfcf; @@ -150,9 +130,6 @@ p { } #main .nerd-font-cheat-sheet span.glyph-popout-copy-clipboard span { -/* font-size: 12px; - font-weight: bold; - display: block; */ font-size: 12px; font-weight: bold; display: block; @@ -180,12 +157,6 @@ p { } #main .nerd-font-cheat-sheet span.glyph-popout-copy-clipboard span:not(:first-child):hover { -/* background: #767260; - text-decoration: underline; - border-radius: 2px; - border-style: dashed; - border-color: #0fbfcf; - border-width: 2px; */ background: #767260; text-decoration: underline; border-radius: 2px; @@ -195,7 +166,6 @@ p { } /* gitter chat tweaks */ - .gitter-open-chat-button { border-color: white; border-width: 1px 1px 0px 1px; diff --git a/_posts/2017-01-04-icon-cheat-sheet.md b/_posts/2017-01-04-icon-cheat-sheet.md index 75fdf9230..5de6f287c 100644 --- a/_posts/2017-01-04-icon-cheat-sheet.md +++ b/_posts/2017-01-04-icon-cheat-sheet.md @@ -15262,6 +15262,4 @@ page: cheat-sheet {% endhighlight %} I really - - - \ No newline at end of file + \ No newline at end of file diff --git a/site.js b/site.js index a30c86dd8..d4cf6e681 100644 --- a/site.js +++ b/site.js @@ -240,61 +240,6 @@ $(document).ready(function (){ } } -/* document.getElementById('glyphCheatSheet').addEventListener('mouseover', function (event) { - const target = event.target - if (target.matches('.column') && target.children.length > 2 && !target.contains(target.querySelector('.glyph-popout-copy-clipboard'))) { - console.log(target.value); - const className = target.children[1].innerText; - const codePoint = target.children[2].innerText; - const unicodeChar = target.children[0].dataset.content && target.children[0].dataset.content.charAt(0); - console.log('class', className, 'codepoint', codePoint, 'unicodeChar', unicodeChar); - document.getElementById('glyphCheatSheetCopyFrom').innerText = className; - - const newNode = document.createElement('span'); - const copyClassNode = document.createElement('span'); - const copyCodePoint = document.createElement('span'); - newNode.className = 'glyph-popout-copy-clipboard'; - copyClassNode.innerText = 'Copy Class'; - copyCodePoint.innerText = 'Copy Hex'; - newNode.appendChild(copyClassNode); - newNode.appendChild(copyCodePoint); - target.children[0].before(newNode); - // copyToClipboard('foooo'); - //document.getElementById('glyphCheatSheet').insertBefore(newNode, target); - } - }); */ - -/* document.getElementById('glyphCheatSheet').addEventListener('click', function (event) { - console.log('clicked'); - copyToClipboard('foooo copied'); - }); */ - -/* document.getElementById('glyphCheatSheet').addEventListener('mouseout', function (event) { - const target = event.target; - const e = event.toElement || event.relatedTarget; - const isOriginalNodeEvent = e.parentNode == this || e == this; // avoid removal on child elements - const doesToElementContainOriginalNode = e.contains(this); - // no need to capture 'this' > it is always the #glyphCheatSheet - console.log('mouse out', 'target', target, 'toElement', event.toElement, 'relatedTarget', event.relatedTarget); - console.log('isOriginal', isOriginalNodeEvent, 'doesContain', doesToElementContainOriginalNode); - console.log('target matches column', target.matches('.column')); - if (isOriginalNodeEvent || doesToElementContainOriginalNode) { - if (target.matches('.column')) { - console.log('is .column'); - //target.querySelectorAll('.glyph-popout-copy-clipboard').forEach(el => el.remove()); // @TODO fix reliance on querySelectorAll and use of forEach - target.querySelector('.glyph-popout-copy-clipboard').remove(); - } - else if (target.parentNode.matches('.column') && target.parentNode.querySelector('.glyph-popout-copy-clipboard')) { - console.log('is parent .column'); - target.parentNode.querySelector('.glyph-popout-copy-clipboard').remove(); - } - else { - console.log('is NOT original event', 'this', this, 'e', e, 'e.parentNode', e.parentNode); - } - } - }); - */ - document.getElementById('glyphCheatSheet').addEventListener("mouseenter", function(e) { if(e.target.className === "column") { console.log("entered column"); @@ -341,15 +286,11 @@ $(document).ready(function (){ textToCopy = event.target.parentNode.parentNode.querySelector('.codepoint').innerText; } else if (event.target.className === 'copy-glyph') { - // console.log('copy glyph', event.target.parentNode.parentNode.querySelector('.nf'), event.target.parentNode.parentNode.querySelector('.nf').innerHTML); - // textToCopy = event.target.parentNode.parentNode.querySelector('.nf').innerHTML; textToCopy = window.getComputedStyle( document.querySelector(`.${event.target.parentNode.parentNode.querySelector('.class-name').innerText}`), ':before' ).getPropertyValue('content').replace(/"/g,''); } copyToClipboard(textToCopy); - // console.log('clicked'); - // copyToClipboard('foooo copied'); } }); });