mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 17:57:28 -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>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
|
||||
{{ with resources.Get "js/back-to-top.js" | fingerprint "sha512" }}
|
||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||
<script defer src="{{ .Permalink }}" type="text/javascript" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{ end }}
|
||||
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
||||
|
Reference in New Issue
Block a user