Created
July 2, 2020 15:22
-
-
Save Agurato/35819571d439b5294641638b2290ef67 to your computer and use it in GitHub Desktop.
Hugo shortcode for expendable content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span class="expand"> | |
<span 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') ? '{{.Get 2 | default `fas fa-chevron-down`}}' : 'fas fa-{{.Get 1 | default `fas fa-chevron-right`}}';});});"> | |
{{.Get 0}} | |
<i class="{{.Get 1 | default `fas fa-chevron-right`}}"></i> | |
</span> | |
<div class="expand-content" style="display: none; margin: 10px 0px 10px"> | |
{{.Inner | safeHTML}} | |
</div> | |
</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment