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

github.com/funkydan2/hugo-kiera.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Saunders <10623666+funkydan2@users.noreply.github.com>2021-11-13 12:04:44 +0300
committerGitHub <noreply@github.com>2021-11-13 12:04:44 +0300
commit527d70dbebb75156b78554c15bb4f58384f6d63e (patch)
tree96bc5a19f771780dbab64e81aef3be52fd0fa377
parent33dbd40d2b548364940cf932785dbccfca5483d5 (diff)
parent1c0f9e5c35c2fc1acdee5e2deb066538b332cee8 (diff)
Merge pull request #67 from paulwellnerbou/footer-menu
Footer menu
-rw-r--r--README.md10
-rw-r--r--layouts/partials/footer.html18
-rw-r--r--static/css/styles-dark.css20
-rw-r--r--static/css/styles-light.css20
4 files changed, 62 insertions, 6 deletions
diff --git a/README.md b/README.md
index a7905cd..e34c34d 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ It was originally developed by [b. avianto](https://github.com/avianto/hugo-kier
- [git submodule method](#git-submodule-method)
- [independent directory method](#independent-directory-method)
- [Configuration](#configuration)
- - [Main Menu](#main-menu)
+ - [Menus](#menus)
- [Categories & Tags](#categories--tags)
- [Images](#images)
- [Code highlight](#code-highlight)
@@ -108,7 +108,7 @@ googleAnalytics = "" #Google Analytics ID
disableDarkModeCSS = false # disables css style for users using dark-mode
```
-### Main Menu
+### Menus
To add non-posts related page (eq. About page) to the main menu, adding these lines to the page [front matter](https://gohugo.io/content-management/front-matter/):
@@ -138,7 +138,6 @@ menu = "main"
weight = "10"
```
-
YAML:
```yml
@@ -147,6 +146,11 @@ menu : "main"
weight : "10"
```
+Following menus are available:
+
+* `main`, displayed in the navigation bar at the top of the page
+* `footer`, displayed on the lower right, in the footer
+
### Categories & Tags
Pages can include both, either, or neither *Categories* or *Tags*.
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 89c55af..9c6d996 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,8 +1,20 @@
</main>
<footer>
- <h6>{{ if .Site.Copyright }}{{ .Site.Copyright | markdownify }} | {{ end }}
- {{ T "rendered" }} <a href="https://gohugo.io" title="Hugo">Hugo</a> |
- <a href="{{.Site.BaseURL}}index.xml">{{ T "subscribe" }} </a></h6>
+ <ul>
+ <li>
+ <h6>{{ if .Site.Copyright }}{{ .Site.Copyright | markdownify }} | {{ end }}
+ {{ T "rendered" }} <a href="https://gohugo.io" title="Hugo">Hugo</a> |
+ <a href="{{.Site.BaseURL}}index.xml">{{ T "subscribe" }} </a></h6>
+ </li>
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.footer }}
+ <li>
+ <h6><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }}active{{end}}" href="{{ .URL | relURL }}">
+ <i class="fa-li fa {{ .Pre }} fa-lg"></i><span>{{ .Name }}</span>
+ </a></h6>
+ </li>
+ {{ end }}
+ </ul>
</footer>
</div>
<script src="{{ "js/scripts.js" | relURL }}"></script>
diff --git a/static/css/styles-dark.css b/static/css/styles-dark.css
index 829db62..5292b7b 100644
--- a/static/css/styles-dark.css
+++ b/static/css/styles-dark.css
@@ -203,6 +203,26 @@ time {
font-size: 0.8em;
}
+#container footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ display: flex;
+ justify-content: flex-end;
+}
+
+#container footer ul li:first-child {
+ margin-right: auto;
+}
+
+#container footer ul li:not(:first-child) {
+ margin-left: 1em;
+}
+
+#container footer ul li a.active {
+ border-bottom: 0.2em solid #ffffff;
+}
+
#container textarea, input {
-webkit-box-align: center;
-ms-flex-align: center;
diff --git a/static/css/styles-light.css b/static/css/styles-light.css
index bc9350e..ea98a9d 100644
--- a/static/css/styles-light.css
+++ b/static/css/styles-light.css
@@ -202,6 +202,26 @@ time {
font-size: 0.8em;
}
+#container footer ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ display: flex;
+ justify-content: flex-end;
+}
+
+#container footer ul li:first-child {
+ margin-right: auto;
+}
+
+#container footer ul li:not(:first-child) {
+ margin-left: 1em;
+}
+
+#container footer ul li a.active {
+ border-bottom: 0.2em solid #666666;
+}
+
#container textarea, input {
-webkit-box-align: center;
-ms-flex-align: center;