From 22afec709a1f11ef010d3436eca401cd4d5fd62f Mon Sep 17 00:00:00 2001 From: Henk Verlinde Date: Thu, 4 Mar 2021 17:53:25 +0100 Subject: [PATCH 02/14] feat: update bootstrap to 5.0.0-beta2 --- assets/js/bootstrap.js | 2 + assets/scss/common/_global.scss | 15 +++++ assets/scss/common/_variables.scss | 26 +++++--- assets/scss/components/_code.scss | 2 +- assets/scss/components/_comments.scss | 2 +- assets/scss/components/_forms.scss | 2 +- config/_default/menus.toml | 10 ++-- config/_default/params.toml | 1 + layouts/partials/footer/footer.html | 2 +- layouts/partials/footer/script-footer.html | 10 ++++ layouts/partials/header/header.html | 6 +- layouts/partials/main/docs-navigation.html | 2 +- package-lock.json | 69 +++++++++------------- package.json | 2 +- 14 files changed, 86 insertions(+), 65 deletions(-) create mode 100644 assets/js/bootstrap.js diff --git a/assets/js/bootstrap.js b/assets/js/bootstrap.js new file mode 100644 index 0000000..8d6da8d --- /dev/null +++ b/assets/js/bootstrap.js @@ -0,0 +1,2 @@ +import 'bootstrap/dist/js/bootstrap.bundle.min.js' +// import 'bootstrap/dist/js/bootstrap.min.js' diff --git a/assets/scss/common/_global.scss b/assets/scss/common/_global.scss index c245473..5c03ebb 100644 --- a/assets/scss/common/_global.scss +++ b/assets/scss/common/_global.scss @@ -51,6 +51,16 @@ h6, font-size: calc(1.875rem + 1.5vw); } +a:hover, +a:focus { + text-decoration: underline; +} + +a.btn:hover, +a.btn:focus { + text-decoration: none; +} + .section { padding-top: 5rem; padding-bottom: 5rem; @@ -168,6 +178,11 @@ body { } } +.navbar a:hover, +.navbar a:focus { + text-decoration: none; +} + #TableOfContents ul { padding-left: 0; list-style: none; diff --git a/assets/scss/common/_variables.scss b/assets/scss/common/_variables.scss index b75e38f..c5e647c 100644 --- a/assets/scss/common/_variables.scss +++ b/assets/scss/common/_variables.scss @@ -15,7 +15,7 @@ $black: #000; $yellow: #ffe000; $black: #1d2d35; $beige: #fbf7f0; -$red: #e55235; +// $red: #e55235; $purple: #5d2f86; $brown: #aa9c84; @@ -32,7 +32,7 @@ $navbar-light-toggler-icon-bg: none; // // Quickly modify global styling by enabling or disabling optional features. -$enable-responsive-font-sizes: true; +// $enable-responsive-font-sizes: true; // Body // @@ -41,6 +41,13 @@ $enable-responsive-font-sizes: true; $body-bg: $white; $body-color: $black; +// Links +// +// Style anchor elements. + +$link-color: $primary; +$link-decoration: none; + // Grid containers // // Define the maximum width of `.container` for different screen sizes. @@ -49,7 +56,8 @@ $container-max-widths: ( sm: 540px, md: 720px, lg: 960px, - xl: 1240px + xl: 1240px, + xxl: 1320px ); @include _assert-ascending($container-max-widths, "$container-max-widths"); @@ -102,7 +110,7 @@ $spacer: 1rem; // Navbar $navbar-padding-y: $spacer / 2; -$navbar-padding-x: 0; +$navbar-padding-x: null; $navbar-nav-link-padding-x: 0.5rem; @@ -118,13 +126,13 @@ $card-border-color: $gray-200; // // Define alert colors, border radius, and padding. -$alert-padding-y: 1rem; -$alert-padding-x: 1.5rem; +$alert-padding-y: $spacer; +$alert-padding-x: $spacer * 1.5; $alert-margin-bottom: 0; $alert-border-radius: 0; $alert-link-font-weight: $headings-font-weight; $alert-border-width: 0; -$alert-bg-level: 0; -$alert-border-level: 0; -$alert-color-level: 0; +$alert-bg-scale: 0; +$alert-border-scale: 0; +$alert-color-scale: 0; diff --git a/assets/scss/components/_code.scss b/assets/scss/components/_code.scss index 130c610..ac6db8a 100644 --- a/assets/scss/components/_code.scss +++ b/assets/scss/components/_code.scss @@ -29,7 +29,7 @@ pre code { padding: 0; } -@include media-breakpoint-down(xs) { +@include media-breakpoint-down(sm) { pre { margin: 2rem -1.5rem; } diff --git a/assets/scss/components/_comments.scss b/assets/scss/components/_comments.scss index 1816f0f..18f610c 100644 --- a/assets/scss/components/_comments.scss +++ b/assets/scss/components/_comments.scss @@ -7,7 +7,7 @@ } .comment-form p { - @extend .form-group; + @extend .form-group !optional; } .comment-form input[type="text"], diff --git a/assets/scss/components/_forms.scss b/assets/scss/components/_forms.scss index d616737..9732838 100644 --- a/assets/scss/components/_forms.scss +++ b/assets/scss/components/_forms.scss @@ -1,6 +1,6 @@ /** Search form */ .search-form { - @extend .form-inline; + @extend .form-inline !optional; } .search-form label { diff --git a/config/_default/menus.toml b/config/_default/menus.toml index b9ae367..7ed4bca 100644 --- a/config/_default/menus.toml +++ b/config/_default/menus.toml @@ -20,11 +20,11 @@ url = "/blog/" weight = 20 -# [[social]] -# name = "Twitter" -# pre = "" -# url = "https://twitter.com/gethyas" -# weight = 10 +[[social]] + name = "Twitter" + pre = "" + url = "https://twitter.com/getdoks" + weight = 10 [[social]] name = "GitHub" diff --git a/config/_default/params.toml b/config/_default/params.toml index 40ebcdb..159447e 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -52,3 +52,4 @@ editPage = false instantPage = true flexSearch = true darkMode = true + bootStrapJs = false diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 22dbf16..f2b4aca 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -6,7 +6,7 @@
  • {{ .Site.Params.footer | safeHTML }}
  • -
    +