Merge pull request #23021 from kbhawkey/kb-codenew-style-changes
modify layout of codenew shortcode
This commit is contained in:
@@ -18,21 +18,12 @@
|
|||||||
{{ errorf "[%s] %q not found in %q" site.Language.Lang $fileDir.File $bundlePath }}
|
{{ errorf "[%s] %q not found in %q" site.Language.Lang $fileDir.File $bundlePath }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with $.Scratch.Get "content" }}
|
{{ with $.Scratch.Get "content" }}
|
||||||
<table class="includecode" id="{{ $file | anchorize }}">
|
<div class="highlight">
|
||||||
<thead>
|
<div class="includecode" style="text-align: right" id="{{- $file | anchorize -}}">
|
||||||
<tr>
|
{{- with $ghlink -}}<a href="{{ . }}" download="{{ $file }}">{{- end -}}
|
||||||
<th>
|
<code>{{ $file }}</code>
|
||||||
{{ with $ghlink }}<a href="{{ . }}" download="{{ $file }}">{{ end }}
|
{{ 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">
|
||||||
<code>{{ $file }}</code>
|
</div>
|
||||||
{{ if $ghlink }}</a>{{ end }}
|
{{ highlight . $codelang "" }}
|
||||||
<img src="{{ "images/copycode.svg" | relURL }}" style="max-height:24px; cursor: pointer" onclick="copyCode('{{ $file | anchorize }}')" title="Copy {{ $file }} to clipboard">
|
</div>
|
||||||
</th>
|
{{- end -}}
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>{{ highlight . $codelang "" }} </td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{{ end }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user