expand: make expander more visible #24

This commit is contained in:
Sören Weber 2021-07-16 23:07:15 +02:00
parent 5f7cba3d97
commit a9a081903a
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
2 changed files with 12 additions and 5 deletions

View file

@ -1,16 +1,14 @@
{{ $_hugo_config := `{ "version": 1 }` }} {{ $_hugo_config := `{ "version": 1 }` }}
<div class="expand"> <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';});});"> <a class="expand-label" 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> <i class="fas fa-chevron-right"></i>
<span>
{{$expandMessage := T "Expand-title"}} {{$expandMessage := T "Expand-title"}}
{{ if .IsNamedParams }} {{ if .IsNamedParams }}
{{.Get "default" | default $expandMessage}} {{.Get "default" | default $expandMessage}}
{{else}} {{else}}
{{.Get 0 | default $expandMessage}} {{.Get 0 | default $expandMessage}}
{{end}} {{end}}
</span> </a>
</div>
<div class="expand-content" style="display: none;"> <div class="expand-content" style="display: none;">
{{.Inner | safeHTML}} {{.Inner | safeHTML}}
</div> </div>

View file

@ -1133,3 +1133,12 @@ pre .copy-to-clipboard:hover {
option { option {
color: initial; color: initial;
} }
.expand-label {
cursor: pointer;
}
.expand-label i{
font-size: x-small;
width: 8px;
}