From e1ef957164c39d736fec8e5f15e7401a49218895 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 7 Sep 2020 21:08:30 +0200 Subject: [PATCH] remove left anchor option and adjust spacing --- exampleSite/config.yml | 2 -- exampleSite/content/posts/how-to-use.md | 6 ------ layouts/partials/content.html | 5 +---- src/sass/_base.scss | 5 +++-- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 655c593..de23886 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -78,7 +78,5 @@ params: geekblogToC: 3 geekblogAuthor: john-doe - geekblogAnchorLeft: true - geekblogLegalNotice: https://thegeeklab.de/legal-notice/#contact-information geekblogPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy diff --git a/exampleSite/content/posts/how-to-use.md b/exampleSite/content/posts/how-to-use.md index d368d97..b44c831 100644 --- a/exampleSite/content/posts/how-to-use.md +++ b/exampleSite/content/posts/how-to-use.md @@ -115,9 +115,6 @@ enableGitInfo = true # (Optional, default true) Add an anchor link to headlines. geekblogAnchor = true - # (Optional, default false) Move anchor link to the left side of headlines. - geekblogAnchorLeft = false - # (Optional, default true) Copy anchor url to clipboard on click. geekblogAnchorCopy = true @@ -227,9 +224,6 @@ params: # (Optional, default true) Add an anchor link to headlines. geekblogAnchor: true - # (Optional, default false) Move anchor link to the left side of headlines. - geekblogAnchorLeft: false - # (Optional, default true) Copy anchor url to clipboard on click. geekblogAnchorCopy: true diff --git a/layouts/partials/content.html b/layouts/partials/content.html index 1d6acdb..d33bc1f 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1,10 +1,7 @@ {{ $showAnchor := (and (default true .Page.Params.GeekblogAnchor) (default true .Site.Params.GeekblogAnchor)) }} -{{ $anchorLeft := (default false .Site.Params.GeekblogAnchorLeft) }} {{ $.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 b6eb0cb..c130a8a 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -85,7 +85,7 @@ img { width: 100%; max-width: $container-max-width; margin: 0 auto; - padding: $padding-16 $padding-16 * 1.5; + padding: $padding-16; } .icon { @@ -134,7 +134,8 @@ img { color: $gray-200; .container { - padding: $padding-8 $padding-16; + padding-top: $padding-8; + padding-bottom: $padding-8; } li {