From b846debebc24a699b9feef9af10233ff1a876bbd Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 7 Jan 2021 20:23:18 +0100 Subject: Small design adjustments, added support for code blocks marked as 'plain' --- assets/css/_basics.scss | 2 +- assets/css/components/_page.scss | 17 ++++++++++++++++- assets/css/scopes/_code.scss | 14 ++++++++++++-- content/3jF85da/index.md | 5 +++++ content/_personal/index.md | 4 ---- content/blog/test2/index.md | 6 ++++++ filters/common_actions.lua | 2 ++ metadata/metadata.yaml | 4 ++-- 8 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 content/3jF85da/index.md delete mode 100644 content/_personal/index.md diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss index b18ca57..cbdfb9a 100644 --- a/assets/css/_basics.scss +++ b/assets/css/_basics.scss @@ -175,7 +175,7 @@ p { hr { height: 1px; - margin: ($line-height * 2em) 0; + margin: ($line-height * 1em) 0; border: 0; background-color: var(--obj); } diff --git a/assets/css/components/_page.scss b/assets/css/components/_page.scss index ce67f7e..87d5413 100644 --- a/assets/css/components/_page.scss +++ b/assets/css/components/_page.scss @@ -2,6 +2,14 @@ &__header { margin-bottom: $line-height * 1em; + &::after { + content: '--'; + display: block; + margin-bottom: $line-height * -1em; + color: var(--fg-hi); + line-height: 2 * $line-height; + } + &__title { margin-top: 0; } @@ -44,14 +52,21 @@ text-align: right; } + $h1-unscale-factor: px-to-em($font-size, $content--h1--font-size); + &--h1 { + margin-top: $line-height * $h1-unscale-factor; font-size: px-to-em($content--h1--font-size); &::before { content: '#'; - font-size: px-to-em($font-size, $content--h1--font-size); + font-size: $h1-unscale-factor; } } + + &--h1 + &--h1 { + margin-top: $line-height * $h1-unscale-factor; + } &--h2::before { content: '##'; diff --git a/assets/css/scopes/_code.scss b/assets/css/scopes/_code.scss index f6697aa..f024dbd 100644 --- a/assets/css/scopes/_code.scss +++ b/assets/css/scopes/_code.scss @@ -1,18 +1,28 @@ .s-code { + pre, + code { + color: var(--fg-lo); + } + pre { overflow-x: auto; - color: var(--fg-lo); font-size: 1em; line-height: $line-height; } + &--plain { + pre, + code { + color: var(--fg); + } + } + /* stylelint-disable selector-class-pattern */ .c { color: var(--fg-hi); } - .nt, .kt, .k, .kr, diff --git a/content/3jF85da/index.md b/content/3jF85da/index.md new file mode 100644 index 0000000..8f4484b --- /dev/null +++ b/content/3jF85da/index.md @@ -0,0 +1,5 @@ +--- +title: Personal Blog +layout: dated_list +create_feed: true +--- diff --git a/content/_personal/index.md b/content/_personal/index.md deleted file mode 100644 index 5e89459..0000000 --- a/content/_personal/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Personal Blog -layout: dated_list ---- diff --git a/content/blog/test2/index.md b/content/blog/test2/index.md index aee4641..aa23764 100644 --- a/content/blog/test2/index.md +++ b/content/blog/test2/index.md @@ -4,8 +4,14 @@ title: Test Page 2 category: per --- +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. + ``` - /----\ - | | - \----/ ``` + +## Subtitle + +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. diff --git a/filters/common_actions.lua b/filters/common_actions.lua index a358b99..abb15a1 100644 --- a/filters/common_actions.lua +++ b/filters/common_actions.lua @@ -1,6 +1,8 @@ function CodeBlock(el) if next(el.classes) == nil then el.classes = el.classes .. {'c-page__prefixed', 'c-page__prefixed--pre'} + elseif el.classes[1] == "plain" then + el = pandoc.Div({el}, {class = 'c-page__code s-code s-code--plain'}) else local formatted = pandoc.pipe('pygmentize', { '-l', el.classes[1], '-f', 'html', '-O', diff --git a/metadata/metadata.yaml b/metadata/metadata.yaml index ac8474d..150c172 100644 --- a/metadata/metadata.yaml +++ b/metadata/metadata.yaml @@ -14,9 +14,9 @@ menus: - id: blog label: Blog url: /blog/ - - id: _personal + - id: 3jF85da label: Personal - url: /_personal/ + url: /3jF85da/ hidden: true feeds: -- cgit v1.2.3-70-g09d2