Skip to content

Commit

Permalink
Feature/update docs navigation (#19)
Browse files Browse the repository at this point in the history
* Update geekdoc to v0.17.0

Signed-off-by: Matthew DeVenny <matt@boxboat.com>

* Add github button

Signed-off-by: Matthew DeVenny <matt@boxboat.com>
  • Loading branch information
matthewdevenny authored Aug 12, 2021
1 parent 8ebd1c9 commit ebdd702
Show file tree
Hide file tree
Showing 22 changed files with 87 additions and 12 deletions.
6 changes: 6 additions & 0 deletions docs/data/menu/extra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
header:
- name: GitHub
ref: https://github.com/boxboat/dockhand-secrets-operator
icon: gdoc_github
external: true
2 changes: 1 addition & 1 deletion docs/themes/hugo-geekdocs/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.16.6
v0.17.0
4 changes: 2 additions & 2 deletions docs/themes/hugo-geekdocs/data/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"js/mermaid-loader.min.js": "js/mermaid-loader-1bd1515cbf.min.js",
"js/mermaid.min.js": "js/mermaid-1fc9ef3e82.min.js",
"katex.min.css": "katex-38042a7abd.min.css",
"main.min.css": "main-5e7fc0c942.min.css",
"mobile.min.css": "mobile-0e5d2e7ecf.min.css",
"main.min.css": "main-0c0de99286.min.css",
"mobile.min.css": "mobile-c344439d04.min.css",
"print.min.css": "print-f79fc3e5d7.min.css"
}
1 change: 1 addition & 0 deletions docs/themes/hugo-geekdocs/layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{{ partial "svg-icon-symbols" . }}

<div class="wrapper">
<input type="checkbox" class="hidden" id="menu-header-control" />
{{ partial "site-header" (dict "Root" . "MenuEnabled" false) }}

<main class="gdoc-error flex-even">
Expand Down
1 change: 1 addition & 0 deletions docs/themes/hugo-geekdocs/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

<div class="wrapper {{ if default false .Site.Params.GeekdocDarkModeDim }}dark-mode-dim{{ end }}">
<input type="checkbox" class="hidden" id="menu-control" />
<input type="checkbox" class="hidden" id="menu-header-control" />
{{ $navEnabled := default true .Page.Params.GeekdocNav }}
{{ partial "site-header" (dict "Root" . "MenuEnabled" $navEnabled) }}

Expand Down
31 changes: 31 additions & 0 deletions docs/themes/hugo-geekdocs/layouts/partials/menu-extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{ $current := .current }}
{{ template "menu-extra" dict "sect" .source "current" $current "site" $current.Site "target" .target }}

<!-- template -->
{{ define "menu-extra" }}
{{ $current := .current }}
{{ $site := .site }}
{{ $target := .target }}
{{ $sect := .sect }}

{{ range sort (default (seq 0) $sect) "weight" }}
{{ if isset . "ref" }}
{{ $this := $site.GetPage .ref }}
{{ $isCurrent := eq $current $this }}
{{ $icon := default false .icon }}

{{ if not .icon }}
{{ errorf "Missing 'icon' attribute in data file for '%s' menu item '%s'" $target .name }}
{{ end }}

{{ if eq $target "header" }}
<a href="{{ if .external }}{{ .ref }}{{ else }}{{ relref $current .ref }}{{ end }}" class="gdoc-header__link">
<svg class="icon {{ .icon }}">
<title>{{ .name }}</title>
<use xlink:href="#{{ .icon }}"></use>
</svg>
</a>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
50 changes: 43 additions & 7 deletions docs/themes/hugo-geekdocs/layouts/partials/site-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
<div class="container flex align-center justify-between">
{{ if .MenuEnabled }}
<label for="menu-control" class="gdoc-nav__control">
<svg class="icon gdoc_menu"><use xlink:href="#gdoc_menu"></use></svg>
<svg class="icon gdoc_arrow_back"><use xlink:href="#gdoc_arrow_back"></use></svg>
<svg class="icon gdoc_menu">
<title>Open Nav Menu</title>
<use xlink:href="#gdoc_menu"></use>
</svg>
<svg class="icon gdoc_arrow_back">
<title>Close Nav Menu</title>
<use xlink:href="#gdoc_arrow_back"></use>
</svg>
</label>
{{ end }}
<a class="gdoc-header__link" href="{{ .Root.Site.BaseURL }}">
Expand All @@ -12,10 +18,40 @@
<span class="gdoc-brand__title">{{ .Root.Site.Title }}</span>
</span>
</a>
<span id="gdoc-dark-mode">
<svg class="icon gdoc_brightness_dark"><use xlink:href="#gdoc_brightness_dark"></use></svg>
<svg class="icon gdoc_brightness_light"><use xlink:href="#gdoc_brightness_light"></use></svg>
<svg class="icon gdoc_brightness_auto"><use xlink:href="#gdoc_brightness_auto"></use></svg>
</span>
<div class="gdoc-menu-header">
{{ if .Root.Site.Data.menu.extra.header }}
<span class="gdoc-menu-header__items">
{{ partial "menu-extra" (dict "current" .Root "source" .Root.Site.Data.menu.extra.header "target" "header") }}
{{ end }}
<span id="gdoc-dark-mode">
<svg class="icon gdoc_brightness_dark">
<title>Toggle Dark/Light/Auto mode</title>
<use xlink:href="#gdoc_brightness_dark"></use>
</svg>
<svg class="icon gdoc_brightness_light">
<title>Toggle Dark/Light/Auto mode</title>
<use xlink:href="#gdoc_brightness_light"></use>
</svg>
<svg class="icon gdoc_brightness_auto">
<title>Toggle Dark/Light/Auto mode</title>
<use xlink:href="#gdoc_brightness_auto"></use>
</svg>
</span>
{{ if .Root.Site.Data.menu.extra.header }}
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyborad_arrow_right">
<use xlink:href="#gdoc_keyborad_arrow_right"></use>
<title>Close Menu Bar</title>
</svg>
</label>
</span>
<label for="menu-header-control" class="gdoc-menu-header__control">
<svg class="icon gdoc_keyborad_arrow_left">
<use xlink:href="#gdoc_keyborad_arrow_left"></use>
<title>Open Menu Bar</title>
</svg>
</label>
{{ end }}
</div>
</div>
</header>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/mstile-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/mstile-150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/mstile-310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/mstile-310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/favicon/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/themes/hugo-geekdocs/static/fonts/GeekdocIcons.woff
Binary file not shown.
Binary file modified docs/themes/hugo-geekdocs/static/fonts/GeekdocIcons.woff2
Binary file not shown.

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/themes/hugo-geekdocs/static/mobile-0e5d2e7ecf.min.css

This file was deleted.

1 change: 1 addition & 0 deletions docs/themes/hugo-geekdocs/static/mobile-c344439d04.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ebdd702

Please sign in to comment.