~gg/blog-theme

8fc3c9baff585d4c8b5c1cb5d563d0609234acad — Gui Goncalves 3 months ago dc38d29
Move JS banner to its own script
2 files changed, 11 insertions(+), 11 deletions(-)

M layouts/partials/noscript.html
A static/js/js-banner.js
M layouts/partials/noscript.html => layouts/partials/noscript.html +1 -11
@@ 6,16 6,6 @@
     document.addEventListener('DOMContentLoaded', fn);
   }
 }

 ready(() => {
   const h1 = document.createElement('h1');
   h1.innerText = 'Please disable JavaScript';
   h1.style.color = 'white';
   h1.style.position = 'absolute';
   h1.style.width = '100%';
   h1.style.zIndex = 10;
   h1.style.textAlign = 'center';
   document.body.appendChild(h1);
 });
</script>
<script src="{{ .Site.BaseURL }}js/mystify.js"></script>
<script src="{{ .Site.BaseURL }}js/js-banner.js"></script>

A static/js/js-banner.js => static/js/js-banner.js +10 -0
@@ 0,0 1,10 @@
 ready(() => {
   const h1 = document.createElement('h1');
   h1.innerText = 'Please disable JavaScript';
   h1.style.color = 'white';
   h1.style.position = 'absolute';
   h1.style.width = '100%';
   h1.style.zIndex = 10;
   h1.style.textAlign = 'center';
   document.body.appendChild(h1);
 });