diff options
author | Guillermo Guerrero Ibarra <wolf.fox1985@gmail.com> | 2021-08-11 20:04:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-11 20:04:46 +0300 |
commit | 655220c492316c9db790c3f66fddaa47fe50ff13 (patch) | |
tree | b55d7f72c4e07a196b51f0e25160e18e9c7e7101 | |
parent | c80a0e76599f76f4efa4687b73de9dfbb3f5ed6c (diff) |
Ability to enable or disable recent posts. (#309)
Co-authored-by: Guillermo Guerrero Ibarra <guillermo.guerrero@deliveroo.co.uk>
-rw-r--r-- | README.md | 39 | ||||
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rw-r--r-- | layouts/partials/footer.html | 4 |
3 files changed, 44 insertions, 2 deletions
@@ -35,6 +35,7 @@ This Hugo theme was ported from [Bootstrapious](http://bootstrapious.com/p/unive * [See more](#see-more) * [Clients](#clients) * [Recent posts](#recent-posts) + * [Footer](#footer) * [Meta tags](#meta-tags) * [Usage](#usage) * [Contributing](#contributing) @@ -521,6 +522,44 @@ You can enable it in the configuration file. hide_summary = false ``` +#### Footer + +In the footer there are three blocks customizables: "About us", "Recent posts" and contact. Each block can be set via parameters. + +##### About us + +A text can be defined, in case there is no text defined the entire block will be hidden: + +```toml +[params] + about_us = "<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>" +``` + +##### Recent posts + +Recent posts block can be enabled or disabled (hidden). + +```toml +[params.footer.recent_posts] + enable = true +``` + +##### Contact + +A text can be defined, in case there is no text defined the entire block will be hidden: + +```toml +[params] + address = """<p class="text-uppercase"><strong>Universal Ltd.</strong> + <br>13/25 New Avenue + <br>Newtown upon River + <br>45Y 73J + <br>England + <br> + <strong>Great Britain</strong> + </p> + """ +``` ### Meta tags diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 1692d27..fa3fffc 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -525,6 +525,9 @@ paginate = 10 subtitle = "Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo." hide_summary = false +[params.footer.recent_posts] + enable = true + [taxonomies] category = "categories" tag = "tags" diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index b1ffb80..eeddb52 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -15,7 +15,7 @@ <div class="col-md-4 col-sm-6"> - {{ if isset .Site.Params "recent_posts" }} {{ if .Site.Params.recent_posts.enable }} + {{ if isset .Site.Params "recent_posts" }}{{ if (default true .Site.Params.footer.recent_posts.enable) }} <h4>{{ i18n "recentPosts" }}</h4> <div class="blog-entries"> @@ -38,7 +38,7 @@ </div> <hr class="hidden-md hidden-lg"> - {{ end }} {{ end }} + {{ end }}{{ end }} </div> <!-- /.col-md-4 --> |