Skip to content

Commit

Permalink
themes: refine heading and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
changkun committed Jan 21, 2021
1 parent d6a2d0a commit 8f8749f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all:
hugo
s:
hugo server
hugo server -D
27 changes: 16 additions & 11 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,24 @@ theme = "research"

[menu]
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts/"
weight = 1
identifier = "posts"
name = "Posts"
url = "/posts/"
weight = 1
[[menu.main]]
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 2
identifier = "tags"
name = "Tags"
url = "/tags/"
weight = 2
[[menu.footer]]
name = "GitHub"
url = "https://github.com/golang-design/research"
weight = 1
name = "GitHub"
url = "https://github.com/golang-design/research"
weight = 2
[[menu.footer]]
name = "Contact"
url = "https://golang.design/s/email"
weight = 1

[markup]
[markup.highlight]
anchorLineNos = false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} <a href="#{{ .Anchor | safeURL }}"></a></h{{ .Level }}>
5 changes: 3 additions & 2 deletions themes/research/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<footer>
------------------------------------------------------
<p>&copy; {{ now.Year }}
<a class="footer-link" href="https://golang.design"><b>The golang.design Initiative</b></a>.
<a class="footer-link" href="https://golang.design"><b>The golang.design Initiative</b></a>
{{- range .Site.Menus.footer }}
<a class="footer-link" href="{{ .URL }}"><b>{{ .Name }}</b></a>.
| <a class="footer-link" href="{{ .URL }}"><b>{{ .Name }}</b></a>
{{- end }}
</p>
</footer>
4 changes: 2 additions & 2 deletions themes/research/layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<div style="float: right;">{{ .Site.Params.subtitle }}</div><br>
<p>
<nav>
<a href="{{ .Site.BaseURL }}"><b>Home</b></a>.
<a href="{{ .Site.BaseURL }}"><b>Home</b></a>
{{ with .Site.Menus.main }}
{{ range . }}
<a href="{{ .URL }}"><b>{{ .Name }}</b></a>.
| <a href="{{ .URL }}"><b>{{ .Name }}</b></a>
{{ end }}
</nav>
</p>
Expand Down
5 changes: 4 additions & 1 deletion themes/research/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ p > code {
pre {
color: #ffffff;
background: #000000;
padding: 24px;
padding: 12px;
overflow-x: auto;
}
code {
font: 14px/1.5 monospace;
}
article {
padding: 24px 0;
}
Expand Down

0 comments on commit 8f8749f

Please sign in to comment.