From 6e7c01e04f398f3a3fe745e0357e84b8af8e9b0f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 24 Nov 2021 09:10:26 +0100 Subject: [PATCH] cleanup formatting and docs (#247) --- exampleSite/content/usage/configuration.md | 9 +++-- exampleSite/static/custom.css.example | 8 +++++ layouts/partials/site-footer.html | 2 +- src/sass/_base.scss | 42 +++++++++++++++++----- src/sass/_color_mode.scss | 4 +++ src/sass/_defaults.scss | 1 + src/sass/_markdown.scss | 32 +++-------------- src/sass/_mobile.scss | 6 ---- src/sass/_utils.scss | 8 +++++ 9 files changed, 66 insertions(+), 46 deletions(-) diff --git a/exampleSite/content/usage/configuration.md b/exampleSite/content/usage/configuration.md index 95b6c23..d74778a 100644 --- a/exampleSite/content/usage/configuration.md +++ b/exampleSite/content/usage/configuration.md @@ -46,8 +46,13 @@ enableRobotsTXT = true geekdocLogo = "logo.png" # (Optional, default false) Render menu from data file im 'data/menu/main.yaml'. + # See also https://geekdocs.de/usage/menus/#bundle-menu. geekdocMenuBundle = true + # (Optional, default false) Collapse all menu entries, can not be overwritten + # per page if enabled. Can be enabled per page via `geekdocCollapseSection`. + geekdocCollapseAllSections = true + # (Optional, default true) Show page navigation links at the bottom of each # docs page (bundle menu only). geekdocNextPrev = false @@ -154,11 +159,11 @@ params: geekdocLogo: logo.png # (Optional, default false) Render menu from data file im 'data/menu/main.yaml'. - # See also https://geekdocs.de/usage/menus/#bundle-menu + # See also https://geekdocs.de/usage/menus/#bundle-menu. geekdocMenuBundle: true # (Optional, default false) Collapse all menu entries, can not be overwritten - # per page if enabled. Can be enabled per page via `geekdocCollapseSection` + # per page if enabled. Can be enabled per page via `geekdocCollapseSection`. geekdocCollapseAllSections: true # (Optional, default true) Show page navigation links at the bottom of each diff --git a/exampleSite/static/custom.css.example b/exampleSite/static/custom.css.example index d395703..341a121 100644 --- a/exampleSite/static/custom.css.example +++ b/exampleSite/static/custom.css.example @@ -13,6 +13,8 @@ --body-background: #ffffff; --body-font-color: #343a40; + --mark-color: #ffab00; + --button-background: #62cb97; --button-border-color: #4ec58a; @@ -45,6 +47,8 @@ --body-background: #ffffff; --body-font-color: #343a40; + --mark-color: #ffab00; + --button-background: #62cb97; --button-border-color: #4ec58a; @@ -79,6 +83,8 @@ --body-background: #343a40; --body-font-color: #ced3d8; + --mark-color: #ffab00; + --button-background: #62cb97; --button-border-color: #4ec58a; @@ -111,6 +117,8 @@ --body-background: #343a40; --body-font-color: #ced3d8; + --mark-color: #ffab00; + --button-background: #62cb97; --button-border-color: #4ec58a; diff --git a/layouts/partials/site-footer.html b/layouts/partials/site-footer.html index 8242014..2358546 100644 --- a/layouts/partials/site-footer.html +++ b/layouts/partials/site-footer.html @@ -18,7 +18,7 @@ {{ if (default true .Site.Params.GeekdocBackToTop) }}
- + Back to top diff --git a/src/sass/_base.scss b/src/sass/_base.scss index e44dab1..c12dd8b 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -358,14 +358,6 @@ img { border-radius: $border-radius; } - &__footer { - margin-top: $padding-32; - - a:hover { - text-decoration: none; - } - } - &__nav { &:hover { background-image: linear-gradient(var(--link-color), var(--link-color)); @@ -408,6 +400,38 @@ img { color: transparent; } } + + &__figure { + padding: $padding-4; + margin: $padding-16 0; + background-color: var(--accent-color); + display: table; + border-top-left-radius: $border-radius; + border-top-right-radius: $border-radius; + + figcaption { + display: table-caption; + caption-side: bottom; + background-color: var(--accent-color); + padding: 0 $padding-4 $padding-4; + text-align: center; + border-bottom-left-radius: $border-radius; + border-bottom-right-radius: $border-radius; + } + + img { + max-width: 100%; + height: auto; + } + } + + &__footer { + margin-top: $padding-32; + + a:hover { + text-decoration: none; + } + } } .gdoc-post { @@ -545,7 +569,7 @@ img { line-height: 2em; &--row { - margin-right: 1em; + margin-right: $padding-16; } } diff --git a/src/sass/_color_mode.scss b/src/sass/_color_mode.scss index b4c6772..fa0e72d 100644 --- a/src/sass/_color_mode.scss +++ b/src/sass/_color_mode.scss @@ -7,6 +7,8 @@ --body-background: #{$body-background}; --body-font-color: #{$body-font-color}; + --mark-color: #{$mark-color}; + --button-background: #{lighten($main-color, 2)}; --button-border-color: #{$main-color}; @@ -54,6 +56,8 @@ --body-background: #{$body-background-dark}; --body-font-color: #{lighten($body-background-dark, 60)}; + --mark-color: #{$mark-color}; + --button-background: #{lighten($main-color, 2)}; --button-border-color: #{$main-color}; diff --git a/src/sass/_defaults.scss b/src/sass/_defaults.scss index 09d069a..0e2c2a7 100644 --- a/src/sass/_defaults.scss +++ b/src/sass/_defaults.scss @@ -54,6 +54,7 @@ $container-max-width: 80rem !default; $main-color: rgba(65, 134, 201, 1) !default; $second-color: rgba(47, 51, 62, 1) !default; +$mark-color: rgba(255, 171, 0, 1) !default; $body-background-dark: mix( invert($body-background, 75%), diff --git a/src/sass/_markdown.scss b/src/sass/_markdown.scss index 6bcd089..f794840 100644 --- a/src/sass/_markdown.scss +++ b/src/sass/_markdown.scss @@ -76,30 +76,6 @@ border-radius: $border-radius; } - &__figure { - padding: $padding-4; - margin: $padding-16 0; - background-color: var(--accent-color); - display: table; - border-top-left-radius: $border-radius; - border-top-right-radius: $border-radius; - - figcaption { - display: table-caption; - caption-side: bottom; - background-color: var(--accent-color); - padding: 0 $padding-4 $padding-4; - text-align: center; - border-bottom-left-radius: $border-radius; - border-bottom-right-radius: $border-radius; - } - - img { - max-width: 100%; - height: auto; - } - } - blockquote { margin: $padding-16 0; padding: $padding-8 $padding-16 $padding-8 ($padding-16 - $padding-4); //to keep total left space 16dp @@ -115,10 +91,6 @@ } } - .table-wrap { - overflow: auto; - } - table:not(.lntable) { display: table; border-spacing: 0; @@ -187,6 +159,10 @@ width: 100%; } + mark { + background-color: var(--mark-color); + } + &__align { &--left { h1, diff --git a/src/sass/_mobile.scss b/src/sass/_mobile.scss index 811676f..60ab22b 100644 --- a/src/sass/_mobile.scss +++ b/src/sass/_mobile.scss @@ -64,12 +64,6 @@ flex-direction: column; } - .gdoc-footer { - &__item--row { - width: 100%; - } - } - #menu-control:checked ~ main { .gdoc-nav nav, .gdoc-page { diff --git a/src/sass/_utils.scss b/src/sass/_utils.scss index c65bb56..38f2fe2 100644 --- a/src/sass/_utils.scss +++ b/src/sass/_utils.scss @@ -57,6 +57,10 @@ text-align: center; } +.text-right { + text-align: right; +} + .no-wrap { white-space: nowrap; } @@ -72,6 +76,10 @@ overflow: hidden; } +.table-wrap { + overflow: auto; +} + .badge-placeholder { display: inline-block; min-width: 4rem;