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

github.com/caressofsteel/hugo-story.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormspnr <mspnr@mail.ru>2021-02-01 00:36:56 +0300
committermspnr <mspnr@mail.ru>2021-02-01 00:36:56 +0300
commitf609df648ff95cf8a6069fbaaa668b1dcb0bda12 (patch)
tree5946b7e889da4241d4ce2778636bca5689480fbe
parent459291f0f28be483e671a2de98bb645be95ac84f (diff)
moving main wrapper out of index.html
-rw-r--r--layouts/_default/baseof.html24
-rw-r--r--layouts/index.html48
2 files changed, 37 insertions, 35 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..06de0f0
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<!--
+ Hugo Story by CaressOfSteel
+ A (modular, highly tweakable) responsive one-page theme for Hugo.
+ Ported from Story by HTML5UP.
+ This Hugo theme is licensed under the Creative Commons Attribution 3.0 License.
+-->
+<html>
+
+ {{ partial "template/head" . }}
+
+ <body class="is-preload">
+
+ <!-- Wrapper -->
+ <div id="wrapper" class="divided">
+ {{- block "main" . }}{{- end }}
+ <!-- Wrapper -->
+ </div>
+
+ {{ template "_internal/google_analytics.html" . }}
+ {{ partial "template/scripts" . }}
+
+ </body>
+</html> \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index fd1edbf..da8f08c 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,35 +1,13 @@
-<!DOCTYPE HTML>
-<!--
- Hugo Story by CaressOfSteel
- A (modular, highly tweakable) responsive one-page theme for Hugo.
- Ported from Story by HTML5UP.
- This Hugo theme is licensed under the Creative Commons Attribution 3.0 License.
--->
-<html>
-
- {{ partial "template/head" . }}
-
- <body class="is-preload">
-
- <!-- Wrapper -->
- <div id="wrapper" class="divided">
-
- <!-- Main -->
- {{ partial "banner" site.Data.banner }}
- {{ partial "spotlight" site.Data.spotlight1 }}
- {{ partial "spotlight" site.Data.spotlight2 }}
- {{ partial "spotlight" site.Data.spotlight3 }}
- {{ partial "gallery" site.Data.gallery }}
- {{ partial "items" site.Data.items }}
- {{ partial "elements" . }}
- {{ partial "elements_reference" . }}
- {{ partial "template/footer" . }}
-
- <!-- Wrapper -->
- </div>
-
- {{ template "_internal/google_analytics.html" . }}
- {{ partial "template/scripts" . }}
-
- </body>
-</html> \ No newline at end of file
+{{ define "main" }}
+
+ {{ partial "banner" site.Data.banner }}
+ {{ partial "spotlight" site.Data.spotlight1 }}
+ {{ partial "spotlight" site.Data.spotlight2 }}
+ {{ partial "spotlight" site.Data.spotlight3 }}
+ {{ partial "gallery" site.Data.gallery }}
+ {{ partial "items" site.Data.items }}
+ {{ partial "elements" . }}
+ {{ partial "elements_reference" . }}
+ {{ partial "template/footer" . }}
+
+{{ end }} \ No newline at end of file