File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 11{{ $file := .Get 0 }}
22{{ $params := .Get 1 }}
3+ {{ $codeBlockId := printf "id-%x" (now.UnixNano) }}
34{{ with resources.GetRemote $file }}
45 {{ with .Err }}
56 {{ errorf "%s" . }}
67 {{ else }}
78 {{ $lang := path.Ext $file | strings.TrimPrefix "." }}
8- {{ highlight .Content $lang $params }}
9+ < div id ="code-block-v1 " data-mf ="false ">
10+ {{ highlight .Content $lang $params }}
11+ </ div >
12+
13+ < div class ="code-block " data-mf ="true " style ="display: none; ">
14+ {{- if and (ne $lang "") (ne $lang "none") -}}
15+ < span class ="code-type chroma "> {{ $lang }}</ span >
16+ {{- end -}}
17+ < div class ="code-container chroma ">
18+ < button onclick ="copyToClipBoard(this, {{ $codeBlockId }}) " class ="code-copy-button multi-line " type ="button "> Copy</ button >
19+ < div class ="highlight-v2 " id ="{{ $codeBlockId }} ">
20+ {{ highlight .Content $lang $params }}
21+ </ div >
22+ </ div >
23+ </ div >
924 {{ end }}
1025{{ else }}
1126 {{ errorf "Unable to load github content from %s from %q" $file .Position}}
You can’t perform that action at this time.
0 commit comments