Update collapsable code shortcode with isCollapsed prop

This commit is contained in:
panr
2020-06-13 09:51:22 +02:00
parent cf59a36030
commit 9cbc71f5c3
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
{{ if .Get "language" }}
<div class="collapsable-code">
<input id="{{ .Get "id" | default $id }}" type="checkbox" />
<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 }}