my website, hosted on wisp.place

chore: remove "load giscus" button

- just load it anyway, no need for a manual button lol
- lazy loaded so it hopefully shouldnt cause any lag until you scroll near it?? i mean it shouldn't cause lag on majority of devices anyway
- remove loading gif so it fits with the site better

+22 -26
+5
public/giscus-theme.css
··· 98 98 .BtnGroup-item .btn { 99 99 background-color: transparent !important; 100 100 } 101 + 102 + main .gsc-loading-image { 103 + background: none !important; 104 + display: none !important; 105 + }
+17 -26
src/layouts/Layout.astro
··· 66 66 <body class="prose"> 67 67 <Header /> 68 68 <main><slot /></main> 69 - <button 70 - id="load-giscus" 71 - onclick=" 72 - const script = document.createElement('script'); 73 - script.id = 'giscus-script'; 74 - script.src = 'https://giscus.app/client.js'; 75 - script.setAttribute('data-repo', 'intergrav/devins.page'); 76 - script.setAttribute('data-repo-id', 'R_kgDONW1wiA'); 77 - script.setAttribute('data-category', 'giscus'); 78 - script.setAttribute('data-category-id', 'DIC_kwDONW1wiM4Cr7lb'); 79 - script.setAttribute('data-mapping', 'pathname'); 80 - script.setAttribute('data-strict', '1'); 81 - script.setAttribute('data-reactions-enabled', '1'); 82 - script.setAttribute('data-emit-metadata', '0'); 83 - script.setAttribute('data-input-position', 'bottom'); 84 - script.setAttribute('data-theme', 'https://devins.page/giscus-theme.css'); 85 - script.setAttribute('data-lang', 'en'); 86 - script.crossOrigin = 'anonymous'; 87 - script.async = true; 88 - this.insertAdjacentElement('afterend', script); 89 - this.remove(); 90 - " 91 - type="button" 92 - style="margin-block: 1rem; margin-left: auto; margin-right: auto; display:block" 93 - >load giscus comments</button 94 - > 69 + <script 70 + src="https://giscus.app/client.js" 71 + data-repo="intergrav/devins.page" 72 + data-repo-id="R_kgDONW1wiA" 73 + data-category="giscus" 74 + data-category-id="DIC_kwDONW1wiM4Cr7lb" 75 + data-mapping="pathname" 76 + data-strict="1" 77 + data-reactions-enabled="0" 78 + data-emit-metadata="0" 79 + data-input-position="bottom" 80 + data-theme="https://devins.page/giscus-theme.css" 81 + data-lang="en" 82 + data-loading="lazy" 83 + crossorigin="anonymous" 84 + async 85 + data-astro-rerun></script> 95 86 <Footer /> 96 87 </body> 97 88 </html>