Add notice to Website Carbon badge container if JavaScript is disabled

This commit is contained in:
Helen Chong 2024-06-13 11:42:10 +08:00
parent ba7ae87edb
commit 8783fde6b0
1 changed files with 5 additions and 1 deletions

View File

@ -75,7 +75,11 @@ eleventyComputed:
<section class="content__section"> <section class="content__section">
<h2>Badges</h2> <h2>Badges</h2>
<div id="wcb" class="carbonbadge wcb-d"></div> <div id="wcb" class="carbonbadge wcb-d">
<noscript>
<p>Looks like you have JavaScript disabled. JavaScript is required to display the <a href="https://www.websitecarbon.com/badge/">Website Carbon badge</a>.</p>
</noscript>
</div>
<script src="https://unpkg.com/website-carbon-badges@1.1.3/b.min.js" defer></script> <script src="https://unpkg.com/website-carbon-badges@1.1.3/b.min.js" defer></script>
</section> </section>