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/app.scss b/assets/scss/app.scss index 91b9db8..2d74faf 100644 --- a/assets/scss/app.scss +++ b/assets/scss/app.scss @@ -19,6 +19,7 @@ @import "components/forms"; @import "components/images"; @import "components/search"; +@import "components/tables"; @import "layouts/footer"; @import "layouts/header"; @import "layouts/pages"; diff --git a/assets/scss/common/_dark.scss b/assets/scss/common/_dark.scss index 4c54fff..d6a2092 100644 --- a/assets/scss/common/_dark.scss +++ b/assets/scss/common/_dark.scss @@ -291,3 +291,7 @@ body.dark .alert-primary { body.dark .figure-caption { color: $body-color-dark; } + +body.dark table { + @extend .table-dark; +} 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..4bb8fc4 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; @@ -24,6 +24,25 @@ $pink-500: #d32e9d; $primary: $purple; +// Options +// +// Quickly modify global styling by enabling or disabling optional features. + +$enable-caret: true; +$enable-rounded: true; +$enable-shadows: false; +$enable-gradients: false; +$enable-transitions: true; +$enable-reduced-motion: true; +$enable-smooth-scroll: true; +$enable-grid-classes: true; +$enable-button-pointers: true; +$enable-rfs: true; +$enable-validation-icons: true; +$enable-negative-margins: true; +$enable-deprecation-messages: true; +$enable-important-utilities: true; + /** Bootstrap navbar fix (https://git.io/fADqW) */ $navbar-dark-toggler-icon-bg: none; $navbar-light-toggler-icon-bg: none; @@ -32,7 +51,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 +60,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 +75,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 +129,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 +145,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..edbf3a6 100644 --- a/assets/scss/components/_code.scss +++ b/assets/scss/components/_code.scss @@ -10,7 +10,7 @@ samp { pre { background: $beige; color: $black; - line-height: $line-height-lg; + line-height: $line-height-base; margin: 2rem 0; overflow: auto; padding: 1.25rem 1.5rem; @@ -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/assets/scss/components/_tables.scss b/assets/scss/components/_tables.scss new file mode 100644 index 0000000..b1f8c2e --- /dev/null +++ b/assets/scss/components/_tables.scss @@ -0,0 +1,5 @@ +table { + @extend .table; + + margin: 3rem 0; +} diff --git a/assets/scss/layouts/_header.scss b/assets/scss/layouts/_header.scss index 66edbcc..d9e7abd 100644 --- a/assets/scss/layouts/_header.scss +++ b/assets/scss/layouts/_header.scss @@ -20,6 +20,10 @@ color: $body-color; } +.navbar-light .navbar-nav .active .nav-link { + color: $primary; +} + @include media-breakpoint-up(md) { .navbar-brand { font-size: $font-size-xl; diff --git a/assets/scss/layouts/_pages.scss b/assets/scss/layouts/_pages.scss index eaa75de..8938dbc 100644 --- a/assets/scss/layouts/_pages.scss +++ b/assets/scss/layouts/_pages.scss @@ -38,3 +38,8 @@ p.meta { margin-top: 0.5rem; font-size: $font-size-base; } + +.breadcrumb { + margin-top: 2.25rem; + font-size: $font-size-base; +} diff --git a/config/_default/config.toml b/config/_default/config.toml index 2c5f94a..dbdd83b 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -45,6 +45,12 @@ rel = "sitemap" [markup.goldmark] [markup.goldmark.extensions] linkify = false + [markup.goldmark.parser] + autoHeadingID = true + autoHeadingIDType = "github" + [markup.goldmark.parser.attribute] + block = true + title = true [markup.goldmark.renderer] unsafe = true [markup.highlight] 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..3fa4b6d 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -52,3 +52,5 @@ editPage = false instantPage = true flexSearch = true darkMode = true + bootStrapJs = false + breadCrumb = false diff --git a/config/postcss.config.js b/config/postcss.config.js index c875eca..fae0993 100644 --- a/config/postcss.config.js +++ b/config/postcss.config.js @@ -8,10 +8,16 @@ module.exports = { purgecss({ content: [ './layouts/**/*.html', - './content/**/*.md', + './content/**/*.md', ], safelist: [ 'lazyloaded', + 'table', + 'thead', + 'tbody', + 'tr', + 'th', + 'td', ...whitelister([ './assets/scss/components/_code.scss', './assets/scss/components/_search.scss', diff --git a/layouts/docs/single.html b/layouts/docs/single.html index f326d50..54e581b 100644 --- a/layouts/docs/single.html +++ b/layouts/docs/single.html @@ -3,7 +3,7 @@
+
{{ if ne .Params.toc false -}}