diff options
| -rw-r--r-- | README.md | 10 | ||||
| -rw-r--r-- | layouts/_default/baseof.html | 23 | ||||
| -rw-r--r-- | layouts/partials/head.html | 1 | ||||
| -rw-r--r-- | layouts/partials/script.html | 0 | ||||
| -rw-r--r-- | layouts/partials/sidebar.html | 2 |
5 files changed, 29 insertions, 7 deletions
@@ -22,18 +22,16 @@ theme = 'ed' color_scheme = '' # Github project url. Used in sidebar github_url = 'https://github.com/user/project' + # Used in header + tagline = 'a Hugo theme for minimal editions' [menu] [[menu.nav]] - name = "Home" - url = "/" - weight = 1 - [[menu.nav]] name = "Posts" url = "/posts/" - weight = 2 + weight = 1 [[menu.nav]] name = "Tags" url = "/tags/" - weight = 3 + weight = 2 ``` diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 13630ce..c12c001 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,5 +9,28 @@ {{- partial "sidebar.html" . -}} {{- end -}} + <!-- + Wrap is the content to shift when toggling the sidebar. + We wrap the content to avoid any CSS collisions with our + real content. + --> + <div class="wrap"> + <header class="masthead"> + <div class="container"> + <h3 class="masthead-title"> + <a href="{{ .Site.Home.RelPermalink }}" title="Home">{{ .Site.Title }}</a> + <br><small>{{ .Site.Params.tagline }}</small> + </h3> + </div> + </header> + + <main class="container content" id="main"> + {{- block "main" . }}{{- end }} + </main> + </div> + + <label for="sidebar-checkbox" class="sidebar-toggle"></label> + + {{- partial "script.html" . -}} </body> </html> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1518319..4168a3d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -20,6 +20,7 @@ <title>{{ $title }}</title> <meta name="description" content="{{ $description }}"> + {{ hugo.Generator }} <!-- Dublin Core metadata for Zotero --> <meta property="dc:title" content="{{ $title }}"> diff --git a/layouts/partials/script.html b/layouts/partials/script.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/partials/script.html diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index c4a3220..5b5c016 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -8,7 +8,7 @@ </div> <nav class="sidebar-nav"> - <a class="sidebar-nav-item{{- if .IsHome }} active{{ end -}}" href="{{ .Site.BaseURL }}">Home</a> + <a class="sidebar-nav-item{{- if .IsHome }} active{{ end -}}" href="{{ .Site.Home.RelPermalink }}">Home</a> {{- $current := . }} {{- /* TODO: Render items dynamically */}} |
