Add copy to clipboard to code blocks

This commit is contained in:
bbaovanc committed 2023-01-20 17:14:18 -06:00
1 parent a26ea62b60
commit 47d6d02186
7 files changed
+58 -11

No files matched your search

@@ -1,5 +1,13 @@
<div class="code-block">
<div class="code-type">{{ .Type }}</div>
<div class="code-header">
<span class="code-type">{{ .Type }}</span>
<a class="code-copy-button">
{{ i18n "copy_to_clipboard" }}
</a>
</div>
{{/* a div.highlight is already created by highlight function */}}
{{ highlight .Inner .Type }}
{{/* for copy to clipboard */}}
<pre class="code-raw" style="display: none;">{{ .Inner }}</pre>
</div>