mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-04 11:33:48 -04:00
19 lines
688 B
HTML
19 lines
688 B
HTML
{{$icon := index (split (.Get "file") ".") 1 }}
|
|
<div class="code" id="{{.Get "file" | urlize}}">
|
|
{{- with .Get "file" -}}
|
|
<div class="filename">{{.}}</div>
|
|
{{- end -}}
|
|
{{with .Get "download"}}
|
|
<button class="download-button" title="Download "{{.}}".">
|
|
<i class="icon-download"></i><span class="button-text">Download</span>
|
|
</button>
|
|
{{end}}
|
|
{{ if ne (.Get "copy") "false" }}
|
|
<button class="copy-button" title="Copy this code to your clipboard." data-clipboard-snippet>
|
|
<i class="icon-clipboard"></i><span class="button-text"> Copy</span>
|
|
</button>
|
|
{{end}}
|
|
<div class="code-copy-content" {{with .Get "download"}}id="{{.}}"{{end}}>
|
|
{{- .Inner -}}
|
|
</div>
|
|
</div> |