Skip to content

Commit

Permalink
Wide mode 1 - TMP - POC
Browse files Browse the repository at this point in the history
  • Loading branch information
szpak committed Mar 5, 2020
1 parent 6c51fcb commit e09b63b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{{ define "main" }}

{{ if $.Param "enableSidebarSingle" }}
<main class="main inner" data-sidebar-position="{{ $.Param "sidebarPosition" }}">
<div class="list__main {{ if $.Param "enableSidebar" }}{{ if eq ($.Param "sidebarPosition") "left" }}mr{{ else }}lm{{ end }}{{ else }}lmr{{ end }}">
{{ else }}
<main class="single__main {{ if or ($.Param "enableToc") ($.Param "toc") }}{{ if $.Param "hideToc" }}main{{ else if eq ($.Param "tocPosition") "outer" }}main{{ else }}main-main{{ end }}{{ else }}main{{ end }}">
{{ end }}

{{ if $.Param "enableBreadcrumb" }}
{{ partial "body/breadcrumb" . }}
{{ end }}
Expand All @@ -19,6 +25,7 @@ <h2 class="single__title" data-ani="{{ $.Site.Params.enableUiAnimation | default
{{ partial "body/infos" . }}
{{ partial "body/tags" . }}
</div>

<article class="single__contents" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}" data-ani="{{ $.Site.Params.enableUiAnimation | default "true" }}">
{{ partial "body/toc" . }}
{{ .Content }}
Expand All @@ -37,9 +44,17 @@ <h2 class="single__title" data-ani="{{ $.Site.Params.enableUiAnimation | default
{{ partial "search/site-search" . }}
</div>
</div>

{{ if $.Param "enableSidebarSingle" }}
</div>
<aside class="list__sidebar {{ if eq ($.Param "sidebarPosition") "left" }}l{{ else }}r{{ end }}" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
{{ partial "sidebar/sidebar-list" . }}
</aside>
{{ end }}

</main>

{{ if and (or ($.Param "enableToc") ($.Param "toc")) (ne ($.Param "tocPosition") "outer") }}
{{ if and (or ($.Param "enableToc") ($.Param "toc")) (ne ($.Param "tocPosition") "outer") (not ($.Param "enableSidebarSingle")) }}
<aside class="single__side {{ if or ($.Param "enableToc") ($.Param "toc") }}main-side{{ end }}">
{{ partial "sidebar/sidebar-single" . }}
</aside>
Expand Down

0 comments on commit e09b63b

Please sign in to comment.