diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2023-02-25 13:15:44 +0100 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2023-02-25 13:15:44 +0100 |
| commit | 900bb5e845c3ad44defbd427cae3d44a4a43321f (patch) | |
| tree | df3d96a93771884add571e82336c29fc3d9c7a1c /code/frontpage/layouts/docs | |
| download | greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.tar.xz greatoffice-900bb5e845c3ad44defbd427cae3d44a4a43321f.zip | |
feat: Initial commit
Diffstat (limited to 'code/frontpage/layouts/docs')
| -rw-r--r-- | code/frontpage/layouts/docs/list.html | 22 | ||||
| -rw-r--r-- | code/frontpage/layouts/docs/single.html | 53 |
2 files changed, 75 insertions, 0 deletions
diff --git a/code/frontpage/layouts/docs/list.html b/code/frontpage/layouts/docs/list.html new file mode 100644 index 0000000..4775e0c --- /dev/null +++ b/code/frontpage/layouts/docs/list.html @@ -0,0 +1,22 @@ +{{ define "main" }} +<div class="row justify-content-center"> + <div class="col-md-12 col-lg-10 col-xl-8"> + <article> + <h1 class="text-center">{{ if eq .CurrentSection .FirstSection }}{{ .Section | humanize }}{{ else }}{{ .Title }}{{ end }}</h1> + <div class="text-center">{{ .Content }}</div> + <div class="card-list"> + {{ $currentSection := .CurrentSection }} + {{ range where .Site.RegularPages.ByTitle "Section" .Section }} + {{ if in (.RelPermalink | string) $currentSection.RelPermalink }} + <div class="card my-3"> + <div class="card-body"> + <a class="stretched-link" href="{{ .RelPermalink }}">{{ .Params.title | title }} →</a> + </div> + </div> + {{ end }} + {{ end }} + </div> + </article> + </div> +</div> +{{ end }}
\ No newline at end of file diff --git a/code/frontpage/layouts/docs/single.html b/code/frontpage/layouts/docs/single.html new file mode 100644 index 0000000..3f88e71 --- /dev/null +++ b/code/frontpage/layouts/docs/single.html @@ -0,0 +1,53 @@ +{{ define "main" }} + <div class="row flex-xl-nowrap"> + <div class="col-lg-5 col-xl-4 docs-sidebar{{ if ne .Site.Params.options.navbarSticky true }} docs-sidebar-top{{ end }} d-none d-lg-block"> + <nav {{ if eq .Site.Params.menu.section.collapsibleSidebar false }}id="sidebar-default" {{ end }}class="docs-links" aria-label="Main navigation"> + {{ partial "sidebar/docs-menu.html" . }} + </nav> + </div> + {{ if ne .Params.toc false -}} + <nav class="docs-toc{{ if ne .Site.Params.options.navbarSticky true }} docs-toc-top{{ end }} d-none d-xl-block col-xl-3" aria-label="Secondary navigation"> + {{ partial "sidebar/docs-toc.html" . }} + </nav> + {{ end -}} + {{ if .Params.toc -}} + <main class="docs-content col-lg-11 col-xl{{ if eq .Site.Params.options.fullWidth false }}-9{{ end }}"> + {{ else -}} + <main class="docs-content col-lg-11 col-xl-9 mx-xl-auto"> + {{ end -}} + {{ if .Site.Params.options.breadCrumb -}} + <!-- https://discourse.gohugo.io/t/breadcrumb-navigation-for-highly-nested-content/27359/6 --> + <nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + {{ partial "main/breadcrumb" . -}} + <li class="breadcrumb-item active" aria-current="page">{{ .Title }}</li> + </ol> + </nav> + {{ end }} + <h1>{{ .Title }}</h1> + <p class="lead">{{ .Params.lead | safeHTML }}</p> + {{ if ne .Params.toc false -}} + <nav class="d-xl-none" aria-label="Quaternary navigation"> + {{ partial "sidebar/docs-toc.html" . }} + </nav> + {{ end -}} + {{ .Content }} + <div class="page-footer-meta d-flex flex-column flex-md-row justify-content-between"> + {{ if .Site.Params.lastMod -}} + {{ partial "main/last-modified.html" . }} + {{ end -}} + {{ if .Site.Params.editPage -}} + {{ partial "main/edit-page.html" . }} + {{ end -}} + </div> + {{ partial "main/docs-navigation.html" . }} + <!-- + {{ if not .Site.Params.options.collapsibleSidebar -}} + {{ partial "main/docs-navigation.html" . }} + {{ else -}} + <div class="my-n3"></div> + {{ end -}} + --> + </main> + </div> +{{ end }} |
