/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

helenchong.dev
| | www.roboleary.net

A copy button enabled quick copying of code to the clipboard. I will show how to use the Clipboard API, style the button, and provide user feedback.
1.2 parsecs

Travel
| |
| | aaronluna.dev

Hugo includes a built-in syntax-highlighter called Chroma. Chroma is extremely fast since it is written in pure Go (like Hugo) and supports every language I can think of. Chroma's speed is especially important since syntax highlighters are notorious for causing slow page loads. However, it lacks one vital feature - an easy way to copy a code block to the clipboard. I decided to document my implementation using only vanilla JS since every blog post I found for this issue relied on jquery to parse the DOM,...
1.9 parsecs

Travel
| |
| | digitaldrummerj.me

Web Developer, Tester and Professional Speaker; passionate about good code, automated testing, devops, and presenting.
1.5 parsecs

Travel
| |
| | its.mw

In a site with technical content, one often exhibits snippets of code. i.e. stuff like this:
6.8 parsecs

Travel
|