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

github.com/vantagedesign/ace-documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/collapse.html')
-rw-r--r--layouts/shortcodes/collapse.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/shortcodes/collapse.html b/layouts/shortcodes/collapse.html
new file mode 100644
index 0000000..3770e17
--- /dev/null
+++ b/layouts/shortcodes/collapse.html
@@ -0,0 +1,11 @@
+{{ .Scratch.Set "identifier" (first 10 (md5 .Inner)) }}
+
+<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#{{printf "collapse_%s" (.Scratch.Get "identifier") }}" aria-expanded="false">
+ {{ print (.Get "title") }}
+</button>
+
+<div class="collapse" id="{{printf "collapse_%s" (.Scratch.Get "identifier") }}">
+ <div class="card card-body">
+ {{ .Inner }}
+ </div>
+</div> \ No newline at end of file