File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed
layouts/partials/shortcodes Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 66{{- if eq (printf "%T" $expanded) "string" }}
77 {{- $expanded = (eq $expanded "true") }}
88{{- end }}
9- {{- $direction := T "Reading-direction" | default "ltr" }}
109{{- with $context }}
1110{{- $id := partial "make-random-md5.hugo" }}
1211< div class ="expand ">
1312 < input type ="checkbox " id ="expand-{{ $id }} " aria-controls ="expandcontent-{{ $id }} " {{ if $expanded }} checked{{ end }} >
1413 < label class ="expand-label " for ="expand-{{ $id }} " >
1514 < i class ="fas fa-chevron-down "> </ i >
16- < i class ="fas fa-chevron-left expand-rtl direction-{{ $direction }} "> </ i >
17- < i class ="fas fa-chevron-right expand-ltr direction-{{ $direction }} "> </ i >
15+ < i class ="fas fa-chevron-left expand-rtl "> </ i >
16+ < i class ="fas fa-chevron-right expand-ltr "> </ i >
1817 {{ $title }}
1918 </ label >
2019 < div id ="expandcontent-{{ $id }} " class ="expand-content ">
Original file line number Diff line number Diff line change 11{{- $context := .context }}
22{{- $tabs := .tabs | default slice }}
33{{- $groupid := .groupid | default "default" }}
4- {{- $direction := T "Reading-direction" | default "ltr" }}
54{{- with $context }}
65< div class ="tab-panel " data-tab-group ="{{ $groupid }} ">
76 < div class ="tab-nav ">
87 {{- range $idx, $tab := $tabs }}
98 < button
109 data-tab-item ="{{ .name }} "
11- class ="tab-nav-button direction- {{ $direction }} {{ cond (eq $idx 0) "active " ""}}"
10+ class ="tab-nav-button{{ cond (eq $idx 0) " active " ""}}"
1211 onclick="switchTab('{{ $groupid }}','{{ .name }}') "
1312 >
1413 < span > {{ .name }}</ span > </ button >
1817 {{- range $idx, $tab := $tabs }}
1918 < div
2019 data-tab-item ="{{ .name }} "
21- class ="tab-content-text {{ cond (eq $idx 0) "active " ""}}"
20+ class ="tab-content-text{{ cond (eq $idx 0) " active " ""}}"
2221 >
2322{{ .content | safeHTML }}
2423 </ div >
Original file line number Diff line number Diff line change 4444 # body .tab-nav-button {
4545 margin-left : 4px ;
4646 }
47- # body .tab-nav-button . direction-rtl {
47+ html [ dir = "rtl" ] # body .tab-nav-button {
4848 float : left;
4949 }
5050 # body .tab-nav-button : first-child {
Original file line number Diff line number Diff line change 2020 padding : 6px 12px ;
2121 position : relative;
2222}
23- # body .tab-nav-button . direction-rtl {
23+ html [ dir = "rtl" ] # body .tab-nav-button {
2424 float : right;
2525}
2626
Original file line number Diff line number Diff line change @@ -1118,8 +1118,8 @@ option {
11181118}
11191119
11201120/* turn off unsuitable expander for this reading direction */
1121- .expand > .expand-label > .expand-rtl . direction-ltr ,
1122- .expand > .expand-label > .expand-ltr . direction-rtl {
1121+ html [ dir = "ltr" ] .expand > .expand-label > .expand-rtl ,
1122+ html [ dir = "rtl" ] .expand > .expand-label > .expand-ltr {
11231123 display : none;
11241124}
11251125
You can’t perform that action at this time.
0 commit comments