Skip to content

Commit d132583

Browse files
author
Lutong Chen
committed
update footer
1 parent 70cf428 commit d132583

File tree

6 files changed

+82
-12
lines changed

6 files changed

+82
-12
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,23 @@ Alse you can add your own custom menus in `config.toml` like this:
5555
weight = 7
5656
```
5757

58-
None you add add your contacts like this:
58+
A Menu in the footer is also available:
59+
60+
```
61+
[[menu.footer]]
62+
identifier = "home"
63+
name = "home"
64+
url = "/"
65+
weight = 1
66+
67+
[[menu.footer]]
68+
identifier = "about"
69+
name = "About"
70+
url = "/about/"
71+
weight = 2
72+
```
73+
74+
Now you can add your contacts like this:
5975

6076
```
6177
# Social icons to be shown on the right-hand side of the navigation bar

archetypes/zone.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: "{{ replace .TranslationBaseName "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: false
5+
---

exampleSite/config.toml

+13-2
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,25 @@ footnoteReturnLinkContents = "^"
1414
"""
1515
copyright = "Copyright © 2008–2019, Steve Francia and the Hugo Authors; all rights reserved."
1616

17-
[menu]
1817

19-
[[menu.main]]
18+
[[menu.main]]
2019
identifier = "about"
2120
name = "About"
2221
url = "/about/"
2322
weight = 10
2423

24+
[[menu.footer]]
25+
identifier = "home"
26+
name = "home"
27+
url = "/"
28+
weight = 1
29+
30+
[[menu.footer]]
31+
identifier = "about"
32+
name = "About"
33+
url = "/about/"
34+
weight = 2
35+
2536
[taxonomies]
2637
category = "categories"
2738
tag = "tags"

layouts/partials/footer.html

+21-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
1-
<div class="layui-container ">
2-
<footer>
3-
<p class="copyright">{{ .Site.Params.copyright | default "&copy; All rights reserved. Powered by [Hugo](https://gohugo.io) and [Erblog](https://github.com/ertuil/erblog)." | markdownify }}</p>
4-
</footer>
5-
</div>
1+
<footer>
2+
{{ if .Site.Menus.footer }}
3+
4+
<div class="layui-container">
5+
<div class="layui-row">
6+
<div class="layui-col-md4 layui-col-sm6 layui-col-xs6">
7+
<h3> Related Sites </h3>
8+
</div>
9+
</div>
10+
<div class="layui-row">
11+
{{ range sort .Site.Menus.footer }}
12+
<div class="layui-col-md4 layui-col-sm6 layui-col-xs12">
13+
<a href="{{ .URL }}"><p class="footer-url">{{ .Name }}</p></a>
14+
</div>
15+
{{end}}
16+
</div>
17+
</div>
18+
{{end}}
19+
20+
<p class="copyright">{{ .Site.Params.copyright | default "&copy; All rights reserved. Powered by [Hugo](https://gohugo.io) and [Erblog](https://github.com/ertuil/erblog)." | markdownify }}</p>
21+
</footer>

layouts/zone/list.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ <h3 class="layui-timeline-title">Prev</h3>
4141
<i class="layui-icon layui-timeline-axis">&#xe63f;</i>
4242
<div class="layui-timeline-content layui-text">
4343
<h3 class="layui-timeline-title">{{.Date.Format "2006-01-02"}}</h3>
44-
<div class="layui-card-body">
44+
<div class="layui-card-body markdown-body">
4545
{{ .Content }}
4646
</div>
4747
</div>

static/self/css/default.css

+25-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ body {
22
background-color: #f6f8fa!important;
33
font-family: monospace, Helvetica, Tahoma, Arial;;
44
}
5+
56
/* index */
67
.about {
78
margin-top: 40px;
@@ -205,10 +206,31 @@ body {
205206

206207
/* Footer */
207208
footer {
209+
/* background-color: #393D49; */
210+
background-color: #2F4056;
211+
padding: 20px 0 20px;
212+
208213
text-align: center;
209-
margin-top: 20px;
210214
border-bottom: var(--border-width) solid var(--accent);
211215
font-family: 'TT Commons',Arial,Helvetica,sans-serif;
212216
font-size: 1.0625rem;
213-
color: #697A89;
214-
}
217+
color: #ffffff;
218+
}
219+
220+
.copyright {
221+
border-bottom: var(--border-width) solid var(--accent);
222+
font-family: 'TT Commons',Arial,Helvetica,sans-serif;
223+
font-size: 1.0625rem;
224+
color: #ffffff;
225+
margin-top: 10px;
226+
}
227+
228+
.footer-url {
229+
color: #c2c2c2;
230+
}
231+
232+
233+
.footer-url:hover {
234+
color: #f2f2f2;
235+
text-decoration: underline;
236+
}

0 commit comments

Comments
 (0)