fix copy clipboard

This commit is contained in:
Karen Bradshaw
2020-09-17 20:42:05 -04:00
parent 3f8a10f9a8
commit 245f989b2a
+9 -6
View File
@@ -19,11 +19,14 @@
{{ end }}
{{ with $.Scratch.Get "content" }}
<div class="highlight">
<div class="includecode" style="text-align: right" id="{{- $file | anchorize -}}">
{{- with $ghlink -}}<a href="{{ . }}" download="{{ $file }}">{{- end -}}
<code>{{ $file }}</code>
{{ if $ghlink }}</a>{{ end }}<img src="{{ "images/copycode.svg" | relURL }}" style="max-height:24px; cursor: pointer" onclick="copyCode('{{ $file | anchorize }}')" title="Copy {{ $file }} to clipboard">
<div class="copy-code-icon" style="text-align:right">
{{ with $ghlink }}<a href="{{ . }}" download="{{ $file }}">{{ end }}<code>{{ $file }}</code>
{{ if $ghlink }}</a>{{ end }}
<img src="{{ "images/copycode.svg" | relURL }}" style="max-height:24px; cursor: pointer" onclick="copyCode('{{ $file | anchorize }}')" title="Copy {{ $file }} to clipboard">
</img>
</div>
<div class="includecode" id="{{ $file | anchorize }}">
{{ highlight . $codelang "" }}
</div>
{{ highlight . $codelang "" }}
</div>
{{- end -}}
{{ end }}