Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ijsucceed/onepress.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/baseof.html')
-rw-r--r--layouts/_default/baseof.html64
1 files changed, 38 insertions, 26 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7cf9586..cbffa94 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,26 +1,38 @@
-<!DOCTYPE html>
-<html lang="{{ .Site.LanguageCode | default "en" }}">
- <head>
- {{ partial "head.html" . }}
- </head>
-<body>
- <header class="header">
- {{ partial "brand.html" . }}
- </header>
- <nav class="main-nav">
- {{ partial "nav.html" . }}
- </nav>
- <div id="site-wrapper">
- <main>
- {{ block "main" . }} {{ end }}
- </main>
- <aside class="desktop-only">
- {{ block "widgets" . }}{{ end }}
- {{ partial "footer.html" . }}
- </aside>
- {{ partial "footer.html" . }}
- </div>
-
- {{ partial "js.html" . }}
-</body>
-</html>
+<!DOCTYPE html>
+<html lang="{{ .Site.LanguageCode | default "en" }}">
+ <head>
+ {{ partial "head.html" . }}
+ </head>
+<body>
+ <header class="header">
+ {{ partial "brand.html" . }}
+ </header>
+ <nav class="main-nav">
+ {{ partial "nav.html" . }}
+ </nav>
+
+ <!-- show sidebar if widgets param is set to true -->
+ {{ if .Site.Params.widgets }}
+ <div id="site-wrapper">
+ <main>
+ {{ block "main" . }} {{ end }}
+ </main>
+ <!-- show widget on larger screen -->
+ <aside class="desktop-only">
+ {{ block "widgets" . }}{{ end }}
+ {{ partial "footer.html" . }}
+ </aside>
+ {{ partial "footer.html" . }}
+ </div>
+ {{ else }}
+ <!-- no sidebar, content centered to screen -->
+ <div id="site-wrapper-centered">
+ <main class="center">
+ {{ block "main" . }} {{ end }}
+ </main>
+ {{ partial "footer.html" . }}
+ </div>
+ {{ end }}
+ {{ partial "js.html" . }}
+</body>
+</html>