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

github.com/lucperkins/hugo-fresh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan M <StefMa@users.noreply.github.com>2019-10-04 12:40:19 +0300
committerGitHub <noreply@github.com>2019-10-04 12:40:19 +0300
commite8076b98cff31305287f03ea6c889aca08cf6196 (patch)
tree1a5c4d26d91e5b14eff5cda8bcf5d9026f62dd97
parent865adba4ba4ff628146819723715b4cb90afc9f7 (diff)
parent57bdb3e24de2c24834c9fd3da646a644ff2226b6 (diff)
Merge pull request #79 from nathanbiller/fixSinglePages#70
Fix single pages#70
-rw-r--r--README.md3
-rw-r--r--layouts/_default/baseof.html29
-rw-r--r--layouts/_default/single.html4
-rw-r--r--layouts/index.html35
4 files changed, 42 insertions, 29 deletions
diff --git a/README.md b/README.md
index 3593d25..09676b6 100644
--- a/README.md
+++ b/README.md
@@ -290,6 +290,8 @@ Single pages displays a single unit of information and are more or less independ
You can create single pages in the `content` directory (even sub-dirs are possible).
+If you'd like to have the footer displayed on your single page include "include_footer: true" in your front matter.
+
<details>
<summary>Code</summary>
@@ -298,6 +300,7 @@ You can create single pages in the `content` directory (even sub-dirs are possib
title: AGB
sidebar: true # or false to display the sidebar
sidebarlogo: fresh-white-alt # From (static/images/logo/)
+include_footer: true
---
```
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index f7762a6..241055d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,33 +12,6 @@
</div>
{{ block "main" . }}
-
- {{ if .Site.Params.hero }}
- {{ partial "hero.html" . }}
- {{ end }}
-
- {{ if .Site.Params.section1 }}
- {{ partial "section1.html" . }}
- {{ end }}
-
- {{ if .Site.Params.section2 }}
- {{ partial "section2.html" . }}
- {{ end }}
-
- {{ if .Site.Params.section3 }}
- {{ partial "section3.html" . }}
- {{ end }}
-
- {{ if .Site.Params.section4 }}
- {{ partial "section4.html" . }}
- {{ end }}
-
- {{ if .Site.Params.section5 }}
- {{ partial "section5.html" . }}
- {{ end }}
-
- {{ if .Site.Params.footer }}
- {{ partial "footer.html" . }}
{{ end }}
<!-- Back To Top Button -->
@@ -47,8 +20,6 @@
{{ if .Site.Params.sidebar }}
{{ partial "sidebar.html" . }}
{{ end }}
-
- {{ end }}
{{ partial "javascript.html" . }}
</body>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 7ac3c1f..0c91775 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -15,6 +15,10 @@
{{ partial "single/single.html" . }}
+ {{ if .Params.include_footer }}
+ {{ partial "footer.html" . }}
+ {{ end }}
+
<!-- Back To Top Button -->
<div id="backtotop"><a href="#"></a></div>
diff --git a/layouts/index.html b/layouts/index.html
index f319bf9..1d00000 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,2 +1,37 @@
{{ define "main" }}
+ {{ if .Site.Params.hero }}
+ {{ partial "hero.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.section1 }}
+ {{ partial "section1.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.section2 }}
+ {{ partial "section2.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.section3 }}
+ {{ partial "section3.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.section4 }}
+ {{ partial "section4.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.section5 }}
+ {{ partial "section5.html" . }}
+ {{ end }}
+
+ {{ if .Site.Params.footer }}
+ {{ partial "footer.html" . }}
+ {{ end }}
+
+ <!-- Back To Top Button -->
+ <div id="backtotop"><a href="#"></a></div>
+
+ {{ if .Site.Params.sidebar }}
+ {{ partial "sidebar.html" . }}
+ {{ end }}
+
{{ end }} \ No newline at end of file