mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 09:47:29 -05:00
Add copy to clipboard to code blocks
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user