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

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruPagge <git@upagge.ru>2021-05-13 22:48:12 +0300
committeruPagge <git@upagge.ru>2021-05-13 22:48:12 +0300
commitf905c5f9036f0ceecce14eacb9179ee14fe370a5 (patch)
treed61b505176512de2ada6fc578e9077a0f1e3936a /layouts/shortcodes
parentb2ba7e5245ddc815294e2ca38e8b3ca00721f8e6 (diff)
prism
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/prism.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/layouts/shortcodes/prism.html b/layouts/shortcodes/prism.html
new file mode 100644
index 0000000..b4881da
--- /dev/null
+++ b/layouts/shortcodes/prism.html
@@ -0,0 +1,9 @@
+{{ $lang := cond $.IsNamedParams ($.Get "lang") "text" }}
+{{ $dataLine := cond $.IsNamedParams ($.Get "line-num") "" }}
+{{ $cmdOut := cond $.IsNamedParams ($.Get "cmd-out") "" }}
+{{ $cmdUser := cond $.IsNamedParams ($.Get "cmd-user") "user" }}
+{{ $cmdHost := cond $.IsNamedParams ($.Get "cmd-host") "localhost" }}
+
+<pre class="language-{{ if ($.Get `diff`) }}diff-{{ end }}{{ $lang }} {{ if ($.Get `line`) }}line-numbers{{ end }} {{ if ($.Get `diff-color`) }}diff-highlight{{ end }}{{ if ($.Get `cmd`) }}command-line{{ end }}" {{ with $dataLine }}data-line="{{ . }}"{{ end }} {{ if ($.Get `cmd`) }}data-user="{{ $cmdUser }}" data-host="{{ $cmdHost }}" data-output="{{ $cmdOut }}"{{ end }}>
+<code>{{ .Inner }}</code>
+</pre> \ No newline at end of file