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

github.com/themefisher/academia-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/shortcodes/expand.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/layouts/shortcodes/expand.html b/layouts/shortcodes/expand.html
new file mode 100644
index 0000000..0e7ddb1
--- /dev/null
+++ b/layouts/shortcodes/expand.html
@@ -0,0 +1,17 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+<div class="expand">
+ <div class="expand-label" style="cursor: pointer;" onclick="$h = $(this);$h.next('div').slideToggle(100,function () {$h.children('i').attr('class',function () {return $h.next('div').is(':visible') ? 'fas fa-chevron-down' : 'fas fa-chevron-right';});});">
+ <i style="font-size:x-small;" class="fas fa-chevron-right"></i>
+ <span>
+ {{$expandMessage := T "Expand-title"}}
+ {{ if .IsNamedParams }}
+ {{.Get "default" | default $expandMessage}}
+ {{else}}
+ {{.Get 0 | default $expandMessage}}
+ {{end}}
+ </span>
+ </div>
+ <div class="expand-content" style="display: none;">
+ {{.Inner | safeHTML}}
+ </div>
+</div> \ No newline at end of file