diff --git a/web/assets/scss/main.scss b/web/assets/scss/main.scss index 857c4dbfaf85e71a764ec629edf6d4b079cb89ae..df60e001343ac28ff566058536968860c20d8d58 100644 --- a/web/assets/scss/main.scss +++ b/web/assets/scss/main.scss @@ -135,6 +135,23 @@ cite::before { } } +ol.breadcrumb { + @apply py-2; +} + +ol.breadcrumb li { + display: inline; +} + +ol.breadcrumb li+li:before { + @apply px-1; + content: "/\00a0"; +} + +ol.breadcrumb li.active a { + color: theme('mycolors.text-accent'); +} + /* -- Table of contents -- */ #TableOfContents { @apply .text-sm; diff --git a/web/content/docs/_index.pandoc b/web/content/docs/_index.pandoc index 55b2439dd226efd36c98e5db53d52e0c520054ac..ef8d32e4aa633df71517ee51fb9e238b6c8c88fb 100644 --- a/web/content/docs/_index.pandoc +++ b/web/content/docs/_index.pandoc @@ -14,8 +14,8 @@ text = "You want to contribute to the OpenGeoSys project or implement a custom f icon = "fal fa-laptop-code" [[sections]] -name = "Selected Benchmarks" -url = "/docs/benchmarks" +name = "Benchmarks" +url = "/docs/benchmarks/elliptic/groundwater-flow-dirichlet/" text = "Basic benchmarks are explained and input files are provided to get you started in using OGS." icon = "fal fa-rabbit-fast" diff --git a/web/content/docs/benchmarks/_index.md b/web/content/docs/benchmarks/_index.md new file mode 100644 index 0000000000000000000000000000000000000000..d604396d40f0912dfe529c327a2f3e1740bd6b6f --- /dev/null +++ b/web/content/docs/benchmarks/_index.md @@ -0,0 +1,3 @@ ++++ +title = "Benchmarks" ++++ diff --git a/web/layouts/docs/single.html b/web/layouts/docs/single.html index dab7327884f584a6725856c15e675af27e4f5d06..0b0a666f3f2fb6e9d4493787eb07628675198637 100644 --- a/web/layouts/docs/single.html +++ b/web/layouts/docs/single.html @@ -3,14 +3,6 @@ <nav class="w-1/4"> {{ $segments := split .RelPermalink "/" }} {{ $subsection := index $segments 2 }} - <div class="text-xs"> - <a href="/docs/">Docs</a> / <span class="text-orange"> - {{ if eq $subsection "devguide"}}Developer Guide{{ end }} - {{ if eq $subsection "benchmarks"}}Benchmarks{{ end }} - {{ if eq $subsection "userguide"}}User Guide{{ end }} - {{ if eq $subsection "tools"}}Tools{{ end }} - </span> - </div> <ul class="text-sm"> {{ $currentPage := . }} {{ $currentMenu := index .Site.Menus $subsection }} diff --git a/web/layouts/partials/breadcrumb.html b/web/layouts/partials/breadcrumb.html new file mode 100644 index 0000000000000000000000000000000000000000..c1c885ec593cb41de8f849c2df37eda4eefcdf16 --- /dev/null +++ b/web/layouts/partials/breadcrumb.html @@ -0,0 +1,20 @@ +<ol class="breadcrumb"> + {{ template "breadcrumbnav" (dict "p1" . "p2" .) }} +</ol> + +{{ define "breadcrumbnav" }} +{{ if .p1.Parent }} + {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }} +{{ else if not .p1.IsHome }} + {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }} +{{ end }} +<li{{ if eq .p1 .p2 }} class="active"{{ end }}> + <a href="{{ .p1.Permalink }}"> + {{ if .p1.IsHome }} + <i class="fas fa-home"></i> + {{ else }} + {{ .p1.Title }} + {{ end }} + </a> +</li> +{{ end }} diff --git a/web/layouts/partials/header.html b/web/layouts/partials/header.html index ca5ccb83d6f5028d2dd4acef1554d92f0de4a4b6..08c06dd4d88adbb52251da2c03c3c8957e30f72b 100644 --- a/web/layouts/partials/header.html +++ b/web/layouts/partials/header.html @@ -60,5 +60,12 @@ </div> {{ end }} </div> + <div class="container"> + <div class="w-auto"> + <div class="text-xs"> + {{ partial "breadcrumb" . }} + </div> + </div> + </div> </header> <div class="py-2">