Files
hugo/layouts/shortcodes/code.html
T
Bjørn Erik Pedersen 9301947b25 Squashed 'themes/gohugoioTheme/' content from commit 7dd8a302
git-subtree-dir: themes/gohugoioTheme
git-subtree-split: 7dd8a302409a20362e4c610798cc19661b336363
2017-08-10 14:29:32 +02:00

16 lines
741 B
HTML

<div class="code relative bg-primary-color moon-gray" id="{{.Get "file" | urlize}}">
{{- with .Get "file" -}}
<div class="filename san-serif f6 dib lh-solid pl2 pv2">{{.}}</div>
{{- end -}}
{{ if ne (.Get "copy") "false" }}
<button class="needs-js copy bg-accent-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2" title="Copy this code to your clipboard." data-clipboard-action="copy" aria-label="copy button">
</button>
{{/* Functionality located within filesaver.js The copy here is located in the css with .copy class so it can be replaced with JS on success */}}
{{end}}
<div class="code-copy-content nt3" {{with .Get "download"}}id="{{.}}"{{end}}>
{{- .Inner -}}
</div>
</div>