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:
authorSomrat <58769763+tfsomrat@users.noreply.github.com>2022-03-23 07:13:52 +0300
committerGitHub <noreply@github.com>2022-03-23 07:13:52 +0300
commitcce6f84a7ff0f552f72327e785cfe37430bc089c (patch)
tree6cd44e37f99fc7325a9102571d8c45ac75727dbe
parentc001173e8118523d6dfb7fb7585a99d8690905bc (diff)
parent72261f0bf2efa48f4f5752bfe861f64dbd91b582 (diff)
Merge pull request #34 from cedi/master
add expand shortcode
-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