Add sidebar navigation
This commit is contained in:
parent
38739f7b53
commit
6ef98c48a4
4 changed files with 65 additions and 5 deletions
56
config.toml
56
config.toml
|
@ -2,3 +2,59 @@ baseURL = 'http://example.org/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = '~redstrate'
|
title = '~redstrate'
|
||||||
theme = 'red'
|
theme = 'red'
|
||||||
|
|
||||||
|
[menu]
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'home'
|
||||||
|
name = 'Home'
|
||||||
|
url = '/'
|
||||||
|
weight = -1
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'blog'
|
||||||
|
name = 'Blog'
|
||||||
|
url = '/blog'
|
||||||
|
weight = 1
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'art'
|
||||||
|
name = 'Art'
|
||||||
|
url = '/art'
|
||||||
|
weight = 2
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'photos'
|
||||||
|
name = 'Photos'
|
||||||
|
url = '/photos'
|
||||||
|
weight = 3
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'music'
|
||||||
|
name = 'Music'
|
||||||
|
url = '/music'
|
||||||
|
weight = 4
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'projects'
|
||||||
|
name = 'Projects'
|
||||||
|
url = '/projects'
|
||||||
|
weight = 6
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'downloads'
|
||||||
|
name = 'Downloads'
|
||||||
|
url = '/downloads'
|
||||||
|
weight = 7
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'extra'
|
||||||
|
name = 'Extras'
|
||||||
|
url = '/extra'
|
||||||
|
weight = 8
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = 'about'
|
||||||
|
name = 'About'
|
||||||
|
url = '/about'
|
||||||
|
weight = 9
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
See my [gallery](/art)!
|
Welcome to my personal corner of the Internet!
|
||||||
|
|
||||||
See my [photos](/photos)!
|
|
||||||
|
|
||||||
See my [about page](/about)!
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
{{- partial "head.html" . -}}
|
{{- partial "head.html" . -}}
|
||||||
<body>
|
<body>
|
||||||
{{- partial "header.html" . -}}
|
{{- partial "header.html" . -}}
|
||||||
|
{{- partial "sidebar.html" . -}}
|
||||||
{{- block "main" . }}{{- end }}
|
{{- block "main" . }}{{- end }}
|
||||||
{{- partial "footer.html" . -}}
|
{{- partial "footer.html" . -}}
|
||||||
</body>
|
</body>
|
||||||
|
|
7
themes/red/layouts/partials/sidebar.html
Normal file
7
themes/red/layouts/partials/sidebar.html
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<nav>
|
||||||
|
{{ range .Site.Menus.main }}
|
||||||
|
<div>
|
||||||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</nav>
|
Loading…
Add table
Reference in a new issue