Skip to content

Commit 5c6e97d

Browse files
authored
Merge pull request #23021 from kbhawkey/kb-codenew-style-changes
modify layout of codenew shortcode
2 parents 6a108a4 + 88856e6 commit 5c6e97d

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

layouts/shortcodes/codenew.html

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@
1818
{{ errorf "[%s] %q not found in %q" site.Language.Lang $fileDir.File $bundlePath }}
1919
{{ end }}
2020
{{ with $.Scratch.Get "content" }}
21-
<table class="includecode" id="{{ $file | anchorize }}">
22-
<thead>
23-
<tr>
24-
<th>
25-
{{ with $ghlink }}<a href="{{ . }}" download="{{ $file }}">{{ end }}
26-
<code>{{ $file }}</code>
27-
{{ if $ghlink }}</a>{{ end }}
28-
<img src="{{ "images/copycode.svg" | relURL }}" style="max-height:24px; cursor: pointer" onclick="copyCode('{{ $file | anchorize }}')" title="Copy {{ $file }} to clipboard">
29-
</th>
30-
</tr>
31-
</thead>
32-
<tbody>
33-
<tr>
34-
<td>{{ highlight . $codelang "" }} </td>
35-
</tr>
36-
</tbody>
37-
</table>
38-
{{ end }}
21+
<div class="highlight">
22+
<div class="includecode" style="text-align: right" id="{{- $file | anchorize -}}">
23+
{{- with $ghlink -}}<a href="{{ . }}" download="{{ $file }}">{{- end -}}
24+
<code>{{ $file }}</code>
25+
{{ 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">
26+
</div>
27+
{{ highlight . $codelang "" }}
28+
</div>
29+
{{- end -}}

0 commit comments

Comments
 (0)