Merge pull request #636 from h-enk/full-width

Adds full width as an option
This commit is contained in:
Henk Verlinde 2022-01-28 09:19:24 +01:00 committed by GitHub
commit 4b3e21abb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 9 additions and 6 deletions

View File

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

View File

@ -20,6 +20,8 @@ module.exports = {
'td', 'td',
'h5', 'h5',
'alert-link', 'alert-link',
'container-xxl',
'container-fluid',
...whitelister([ ...whitelister([
'./assets/scss/components/_alerts.scss', './assets/scss/components/_alerts.scss',
'./assets/scss/components/_buttons.scss', './assets/scss/components/_buttons.scss',

View File

@ -14,7 +14,7 @@
{{ end -}} {{ end -}}
<body class="{{ .Scratch.Get "class" }}"> <body class="{{ .Scratch.Get "class" }}">
{{ partial "header/header.html" . }} {{ 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"> <div class="content">
{{ block "main" . }}{{ end }} {{ block "main" . }}{{ end }}
</div> </div>

View File

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

View File

@ -1,5 +1,5 @@
<footer class="footer text-muted"> <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="row">
<div class="col-lg-8 order-last order-lg-first"> <div class="col-lg-8 order-last order-lg-first">
<ul class="list-inline"> <ul class="list-inline">

View File

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