added footer columns

This commit is contained in:
Gabriele Musco 2021-04-14 23:53:36 +02:00
parent 22a001ea42
commit 0d3aeb96fa
No known key found for this signature in database
GPG Key ID: 8539FD3454380B83
4 changed files with 52 additions and 0 deletions

View File

@ -83,6 +83,7 @@ summaryLength = 70 # number of words for article summaries
forceRedirect = false forceRedirect = false
infiniteScrolling = false # activates infinite scrolling instead of regular pagination infiniteScrolling = false # activates infinite scrolling instead of regular pagination
enableFooterColumns = false # activates footer columns, as described below
[menu] [menu]
# these links will be added to the main navigation menu, sorted by weight # these links will be added to the main navigation menu, sorted by weight
@ -134,6 +135,30 @@ For the `[[menu.icons]]` menu. They match identifier, name and url can be whatev
- phone - phone
- rss - rss
## Footer columns
You can add various columns of links in the footer using the `data/footer_columns.yml` file.
Following is an example configuration:
```yaml
- title: My other projects
links:
- title: HydraPaper
link: https://hydrapaper.gabmus.org
- title: Ada UI
link: https://gitlab.com/gabmus/ada-ui
- title: About me
links:
- title: My personal website
link: https://gabmus.org
- title: My GitLab
link: https://gitlab.com/gabmus
- title: My GNOME GitLab
link: https://gitlab.gnome.org/gabmus
```
## Inject custom content ## Inject custom content
Ficurinia supports injecting custom content into the theme. There are several files you can create in `layouts/partials/inject` that will be included inside the theme in different places. Ficurinia supports injecting custom content into the theme. There are several files you can create in `layouts/partials/inject` that will be included inside the theme in different places.

View File

@ -52,6 +52,20 @@ footer {
hr { hr {
margin-top: 50px; margin-top: 50px;
} }
.footerColumns {
font-size: .9rem;
display: flex;
flex-direction: row;
flex-wrap: wrap;
ul {
margin: 12px;
list-style-type: none;
padding: 0;
li > strong {
font-size: 1rem;
}
}
}
} }
#titleContainer { #titleContainer {

View File

@ -1,6 +1,7 @@
<footer> <footer>
<hr /> <hr />
{{- partial "inject/footer.html" . -}} {{- partial "inject/footer.html" . -}}
{{- partial "footer_columns.html" . -}}
<p><small> <p><small>
{{ now.Format "2006" }} &copy; {{ .Site.Copyright | markdownify }} {{ now.Format "2006" }} &copy; {{ .Site.Copyright | markdownify }}
</small></p> </small></p>

View File

@ -0,0 +1,12 @@
{{ if (and (.Site.Params.enableFooterColumns | default false) .Site.Data.footer_columns) }}
<div class="footerColumns">
{{ range .Site.Data.footer_columns }}
<ul class="notlist">
<li><strong>{{ .title }}</strong></li>
{{ range .links }}
<li><a target="_blank" href="{{ .link }}">{{ .title }}</a></li>
{{ end }}
</ul>
{{ end }}
</div>
{{ end }}