Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'docs/layouts/shortcodes/exfile.html')
-rw-r--r--docs/layouts/shortcodes/exfile.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/layouts/shortcodes/exfile.html b/docs/layouts/shortcodes/exfile.html
new file mode 100644
index 000000000..226782957
--- /dev/null
+++ b/docs/layouts/shortcodes/exfile.html
@@ -0,0 +1,12 @@
+{{ $file := .Get 0}}
+{{ $filepath := replace $file "static/" ""}}
+{{ $syntax := index (split $file ".") 1 }}
+{{ $syntaxoverride := eq (len .Params) 2 }}
+<div class="code-copy" id="{{$file | urlize}}">
+ <div class="code-copy-header examplesite"><div class="action-buttons"></div><span class="filename"><i class="icon-website"></i>{{$filepath}}</span><i class="icon-{{$syntax}} input"></i></div>
+ <button class="copy-button" title="Copy to clipboard" data-clipboard-snippet>
+ <div class="copy-text"><i class="icon-clipboard"></i> COPY</div>
+ </button>
+ <pre><code class="language-{{if $syntaxoverride}}{{.Get 1}}{{else}}{{$syntax}}{{end}}">{{- readFile $file -}}</code></pre>
+ <a role="button" target="_blank" href="{{$.Site.Params.ghdocsrepo}}{{$file}}" title="See {{$filepath}} source on GitHub" class="tooltip see-on-github" data-tooltip="See {{$filepath}} source on GitHub">Source<i class="icon-github"></i></a>
+</div>