mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
fe7eb1d432
in shortcodes and shortcode output
19 lines
No EOL
969 B
HTML
19 lines
No EOL
969 B
HTML
{{- $_hugo_config := `{ "version": 1 }` }}
|
|
{{- $title := .Get 0 | default (T "Expand-title") }}
|
|
{{- $content := .Inner | safeHTML }}
|
|
{{- $expanded := eq (.Get 1) "true" }}
|
|
<div class="expand
|
|
{{- if $expanded }} expand-expanded{{ end -}}
|
|
">
|
|
{{/* things are getting complicated when search tries to open the expand box while jquery sets the display CSS on the element */}}
|
|
<a class="expand-label" onclick="$t=$(this); if($t.parent('.expand-expanded.expand-marked').length){ $t.next().css('display','none') }else if($t.parent('.expand-marked').length){ $t.next().css('display','block') }else{ $t.next('.expand-content').slideToggle(100); } $t.parent().toggleClass('expand-expanded');">
|
|
<i class="fas fa-chevron-down"></i>
|
|
<i class="fas fa-chevron-right"></i>
|
|
{{ $title }}
|
|
</a>
|
|
<div class="expand-content" style="display:
|
|
{{- if $expanded }} block{{ else }} none{{ end -}}
|
|
;">
|
|
{{ $content }}
|
|
</div>
|
|
</div> |