feat: add full width as an option

This commit is contained in:
Henk Verlinde 2022-01-28 08:48:57 +01:00
parent 10b791fc7b
commit e011603dfc
5 changed files with 7 additions and 6 deletions

View File

@ -86,6 +86,7 @@ lastMod = false
kaTex = false
multilingualMode = false
docsVersioning = false
fullWidth = true
[menu]
[menu.section]

View File

@ -14,7 +14,7 @@
{{ end -}}
<body class="{{ .Scratch.Get "class" }}">
{{ partial "header/header.html" . }}
<div class="wrap container-xxl" role="document">
<div class="wrap container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}" role="document">
<div class="content">
{{ block "main" . }}{{ end }}
</div>

View File

@ -11,7 +11,7 @@
</nav>
{{ end -}}
{{ if .Params.toc -}}
<main class="docs-content col-lg-11 col-xl-9">
<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 -}}

View File

@ -1,5 +1,5 @@
<footer class="footer text-muted">
<div class="container-xxl">
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
<div class="row">
<div class="col-lg-8 order-last order-lg-first">
<ul class="list-inline">

View File

@ -9,7 +9,7 @@
<div class="header-bar"></div>
<header class="navbar navbar-expand-md navbar-light doks-navbar">
<nav class="container-xxl flex-wrap flex-md-nowrap" aria-label="Main navigation">
<nav class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} flex-wrap flex-md-nowrap" aria-label="Main navigation">
<a class="navbar-brand p-0 me-auto" href="{{ "/" | relLangURL }}" aria-label="{{ .Site.Params.Title }}">
{{ .Site.Params.Title }}
</a>
@ -95,7 +95,7 @@
{{ if eq .Section "docs" -}}
<nav class="doks-subnavbar py-2 sticky-lg-top{{ if eq .Site.Params.options.flexSearch false }} d-lg-none{{ end }}" aria-label="Secondary navigation">
<div class="container-xxl d-flex align-items-md-center">
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }} d-flex align-items-md-center">
{{ if .Site.Params.options.flexSearch -}}
<form class="doks-search position-relative flex-grow-1 me-auto">
@ -128,7 +128,7 @@
</div>
</nav>
<div class="container-xxl">
<div class="container-{{ if .Site.Params.options.fullWidth }}fluid{{ else }}xxl{{ end }}">
<aside class="doks-sidebar">
<nav id="doks-docs-nav" class="collapse d-lg-none" aria-label="Tertiary navigation">
{{ partial "sidebar/docs-menu.html" . }}