parent
7481185e14
commit
fc16fb4046
24 changed files with 389 additions and 391 deletions
@ -1,17 +0,0 @@ |
||||
{{ $id := delimit (shuffle (seq 1 9)) "" }} |
||||
|
||||
{{ if .Get "language" }} |
||||
<div class="collapsable-code"> |
||||
<input id="{{ .Get "id" | default $id }}" type="checkbox" {{ if ( eq ( .Get "isCollapsed" ) "true" ) -}} checked |
||||
{{- end }} /> |
||||
<label for="{{ .Get "id" | default $id }}"> |
||||
<span class="collapsable-code__language">{{ .Get "language" }}</span> |
||||
{{ if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end }} |
||||
<span class="collapsable-code__toggle" data-label-expand="{{ .Get "expand" | default "△" }}" |
||||
data-label-collapse="{{ .Get "collapse" | default "▽" }}"></span> |
||||
</label> |
||||
{{ .Inner | markdownify }} |
||||
</div> |
||||
{{ else }} |
||||
{{ errorf "If you want to use the \"collapsable code\" shortcode, you need to pass a mandatory \"language\" param. The issue occured in %q (%q)" .Page.File .Page.Permalink }} |
||||
{{ end }} |
@ -0,0 +1,17 @@ |
||||
{{ $id := delimit (shuffle (seq 1 9)) "" }} |
||||
|
||||
<div class="collapsible-block"> |
||||
<input id="{{ .Get "id" | default $id }}" type="checkbox" {{ if ( eq ( .Get "isCollapsed" ) "true" ) -}} checked |
||||
{{- end }} /> |
||||
<label for="{{ .Get "id" | default $id }}"> |
||||
{{- with .Get "badge" }} |
||||
<span class="collapsible-block__badge">{{ . }}</span> |
||||
{{- end }} |
||||
{{ if .Get "title" }}<span class="collapsible-block__title">{{ .Get "title" | markdownify }}</span>{{ end }} |
||||
<span class="collapsible-block__toggle" data-label-expand="{{ .Get "expand" | default "△" }}" |
||||
data-label-collapse="{{ .Get "collapse" | default "▽" }}"></span> |
||||
</label> |
||||
<div class="collapsible-block__content"> |
||||
{{ .Inner | markdownify }} |
||||
</div> |
||||
</div> |
Loading…
Reference in new issue