diff options
Diffstat (limited to 'layouts/partials/main/component/toggle-sidebar.html')
-rw-r--r-- | layouts/partials/main/component/toggle-sidebar.html | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/layouts/partials/main/component/toggle-sidebar.html b/layouts/partials/main/component/toggle-sidebar.html index 93c7078..c06656f 100644 --- a/layouts/partials/main/component/toggle-sidebar.html +++ b/layouts/partials/main/component/toggle-sidebar.html @@ -1,13 +1,26 @@ {{ if $.Param "enableTocSwitch" }}
- <label class="switch">
- <input id="toggle-sidebar" aria-label="Toggle Sidebar Visibility" type="checkbox" checked />
- <span class="slider">
- <span class="slider__icon">
- {{ partial "svgs/arrow-forward.svg" (dict "width" 20 "height" 20) }}
+ <label class="switch switch__rel">
+ {{ if ($.Param "wideViewAsDefault") }}
+ <input id="toggle-sidebar" aria-label="Toggle Sidebar Visibility" type="checkbox" />
+ <span class="slider">
+ <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}{{ else }}hide{{ end }}">
+ {{ partial "svgs/arrow-forward.svg" (dict "width" 20 "height" 20) }}
+ </span>
+ <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}hide{{ end }}">
+ {{ partial "svgs/arrow-back.svg" (dict "width" 20 "height" 20) }}
+ </span>
</span>
- <span class="slider__icon hide">
- {{ partial "svgs/arrow-back.svg" (dict "width" 20 "height" 20) }}
+ {{ else }}
+ <input id="toggle-sidebar" aria-label="Toggle Sidebar Visibility" type="checkbox" checked />
+ <span class="slider">
+ <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}{{ else }}hide{{ end }}">
+ {{ partial "svgs/arrow-back.svg" (dict "width" 20 "height" 20) }}
+ </span>
+ <span class="slider__icon {{ if (ne ($.Param "languagedir") "rtl") }}hide{{ end }}">
+ {{ partial "svgs/arrow-forward.svg" (dict "width" 20 "height" 20) }}
+ </span>
</span>
- </span>
+ {{ end }}
+
</label>
{{ end }}
\ No newline at end of file |