diff --git a/CHANGELOG.md b/CHANGELOG.md index 473c47f..d440cd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ +- BREAKING + - remove `geekblogAnchorLeft`; + for a better spacing left-side anchors were removed - INTERNAL - upgrade CI pipeline to use Hugo v0.74.3 diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index eb6cc90..89d88f1 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -29,5 +29,3 @@ params: geekdocLegalNotice: https://thegeeklab.de/legal-notice/#contact-information geekdocPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy - - geekdocAnchorLeft: true diff --git a/exampleSite/content/usage/configuration.md b/exampleSite/content/usage/configuration.md index 40c2ff2..110da61 100644 --- a/exampleSite/content/usage/configuration.md +++ b/exampleSite/content/usage/configuration.md @@ -72,9 +72,6 @@ enableGitInfo = true # (Optional, default true) Add an anchor link to headlines. geekdocAnchor = true - # (Optional, default false) Move anchor link to the left side of headlines. - geekdocAnchorLeft = false - # (Optional, default true) Copy anchor url to clipboard on click. geekdocAnchorCopy = true ``` @@ -154,9 +151,6 @@ params: # (Optional, default true) Add an anchor link to headlines. geekdocAnchor: true - # (Optional, default false) Move anchor link to the left side of headlines. - geekdocAnchorLeft: false - # (Optional, default true) Copy anchor url to clipboard on click. geekdocAnchorCopy: true ``` diff --git a/layouts/partials/content.html b/layouts/partials/content.html index f7904b6..aa84210 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,10 +1,7 @@ {{ $showAnchor := (and (default true .Page.Params.GeekdocAnchor) (default true .Site.Params.GeekdocAnchor)) }} -{{ $anchorLeft := (default false .Site.Params.GeekdocAnchorLeft) }} {{ $.Scratch.Set "content" (.Content | replaceRE `` `` | safeHTML) }} -{{ if and $showAnchor $anchorLeft }} - {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${3}` `${4}`) | safeHTML) }} -{{ else if and $showAnchor (not $anchorLeft) }} +{{ if $showAnchor }} {{ $.Scratch.Set "content" ($.Scratch.Get "content" | replaceRE "(]*>)(.*?)()" (printf `
%s%s%s
` `${1}` `${3}` (absURL (printf "%s#%s" .Permalink `${2}`)) `${3}` `${2}` `${4}`) | safeHTML) }} {{ end }} diff --git a/src/sass/_base.scss b/src/sass/_base.scss index 41ddc56..3ceda54 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -77,6 +77,7 @@ img { width: 100%; max-width: $container-max-width; margin: 0 auto; + padding: $padding-16; } .icon { @@ -108,10 +109,6 @@ img { width: $font-size-16 * 2; height: $font-size-16 * 2; } - - .container { - padding: $padding-16; - } } .gdoc-brand { @@ -128,7 +125,7 @@ img { nav { width: $menu-width; - padding: $padding-16 * 1.5 $padding-16; + padding: $padding-16 $padding-32 $padding-16 0; > ul > li > * { font-weight: normal; @@ -199,7 +196,7 @@ img { .gdoc-page { min-width: $body-min-width; flex-grow: 1; - padding: $padding-16 * 1.5 $padding-16; + padding: $padding-16 0; &__header, &__footer { @@ -222,7 +219,7 @@ img { } &__footer { - margin-top: $padding-16 * 2; + margin-top: $padding-32; a:hover { text-decoration: none; @@ -330,10 +327,6 @@ img { color: $color-link-footer; } } - - .container { - padding: $padding-16; - } } .gdoc-search { @@ -361,7 +354,7 @@ img { &__input { width: 100%; padding: $padding-8; - padding-left: $padding-16 * 2; + padding-left: $padding-32; border: 1px solid $gray-200; border-radius: $border-radius; @@ -474,20 +467,12 @@ img { margin-left: -$menu-width; font-size: $font-size-base; - nav { - padding: $padding-16 * 1.5 $padding-16 * 2; - } - &__control { display: inline-block; } } .gdoc-header { - .container { - padding: $padding-16 $padding-16 * 2; - } - .icon { width: $font-size-16 * 1.5; height: $font-size-16 * 1.5; @@ -511,7 +496,7 @@ img { } &__message { - padding-left: $padding-16 * 2; + padding-left: $padding-32; } &__line { @@ -528,15 +513,7 @@ img { display: none; } - .gdoc-page { - padding: $padding-16 * 1.5 $padding-16 * 2; - } - .gdoc-footer { - .container { - padding: $padding-16 $padding-16 * 2; - } - &__item { width: 100%; } diff --git a/src/sass/_defaults.scss b/src/sass/_defaults.scss index 4dc836e..ddea01c 100644 --- a/src/sass/_defaults.scss +++ b/src/sass/_defaults.scss @@ -3,6 +3,7 @@ $padding-1: 1px !default; $padding-4: 0.25rem !default; $padding-8: 0.5rem !default; $padding-16: 1rem !default; +$padding-32: 2rem !default; $font-size-base: 16px !default; $font-size-12: 0.75rem !default; @@ -46,7 +47,7 @@ $second-color: rgba(47, 51, 62, 1) !default; $header-height: 3.5rem !default; $menu-width: 16rem !default; -$sm-breakpoint: $menu-width + $body-min-width !default; +$sm-breakpoint: $menu-width + $body-min-width + 3rem !default; // Panel colors $hint-colors: (