From f561409f1cf476e2cc1112538eb7b724748a2378 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 29 Apr 2021 20:31:16 +0200 Subject: Update --- assets/css/objects/_button.scss | 23 ----------------------- assets/css/scopes/_body.scss | 29 +++++++++++++++++++++++++---- assets/css/style.scss | 1 - filters/common_actions.lua | 16 +++++++--------- metadata/metadata.yaml | 21 ++++++++++++--------- templates/layouts/categorized_list.html | 15 +++++++++++---- templates/layouts/page.html | 8 ++++++++ 7 files changed, 63 insertions(+), 50 deletions(-) delete mode 100644 assets/css/objects/_button.scss diff --git a/assets/css/objects/_button.scss b/assets/css/objects/_button.scss deleted file mode 100644 index d97ca2d..0000000 --- a/assets/css/objects/_button.scss +++ /dev/null @@ -1,23 +0,0 @@ -@include namespace('button') { - @include store(( - --dims: ( - --pad-x: 1.4em, - --pad-y: .5em - ), - --colors: ( - --bg: prop(--colors --fg-lo, $global: true), - --fg: prop(--colors --bg, $global: true), - ) - )); - - @include object(namespace()) { - display: inline-block; - padding: prop(--dims --pad-y) prop(--dims --pad-x); - border-radius: 10em; - background-color: prop(--colors --bg); - color: prop(--colors --fg); - font-size: 1 / 16 * 14em; - font-weight: 500; - text-decoration: none; - } -} diff --git a/assets/css/scopes/_body.scss b/assets/css/scopes/_body.scss index faf1ef0..9598290 100644 --- a/assets/css/scopes/_body.scss +++ b/assets/css/scopes/_body.scss @@ -1,8 +1,14 @@ @include namespace('body') { @include store(( --colors: ( - --emph-fg: prop(--colors --accent --color, $global: true), - --emph-bg: prop(--colors --bg-hi, $global: true) + --emph: ( + --fg: prop(--colors --accent --color, $global: true), + --bg: prop(--colors --bg-hi, $global: true), + ), + --meta: ( + --fg: prop(--colors --fg-hi, $global: true), + --bg: prop(--colors --bg-hi, $global: true), + ) ) )); @@ -62,12 +68,27 @@ background-image: linear-gradient( to top, transparent .15em, - #{prop(--colors --emph-bg)} .15em, - #{prop(--colors --emph-bg)} .6em, + #{prop(--colors --emph --bg)} .15em, + #{prop(--colors --emph --bg)} .6em, transparent .6em ); } + @include element('meta') { + display: flex; + font-size: 1 / 16 * 14rem; + + + h1 { + margin-top: $line-height * 1rem; + } + } + + @include element('meta-item') { + padding: .3em .7em; + background-color: prop(--colors --meta --bg); + color: prop(--colors --meta --fg); + } + img { max-width: 100%; } diff --git a/assets/css/style.scss b/assets/css/style.scss index 958710c..aa83f85 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -16,7 +16,6 @@ @import 'layouts/project-grid'; @import 'objects/icon'; -@import 'objects/button'; @import 'components/outer-button'; @import 'components/header'; diff --git a/filters/common_actions.lua b/filters/common_actions.lua index 6070c7e..535a225 100644 --- a/filters/common_actions.lua +++ b/filters/common_actions.lua @@ -1,7 +1,5 @@ function CodeBlock(el) - if next(el.classes) == nil then - el.classes = el.classes .. {'c-page__pre'} - elseif el.classes[1] == "plain" then + if el.classes[1] == "plain" then el = pandoc.Div({el}, {class = 's-code'}) else local formatted = pandoc.pipe('pygmentize', { @@ -15,12 +13,12 @@ function CodeBlock(el) end function Header(el) - if el.level == 1 then - el.classes = el.classes .. {'c-page__h1'} - elseif el.level == 2 then - el.classes = el.classes .. {'c-page__h2'} - elseif el.level == 3 then - el.classes = el.classes .. {'c-page__h3'} + if el.level == 1 or el.level == 2 then + local newchildren = pandoc.List() + + newchildren:insert(pandoc.Span(el.content, {class = 's-body__title-inner'})) + + el.content = newchildren end return el end diff --git a/metadata/metadata.yaml b/metadata/metadata.yaml index 226401d..c8a841d 100644 --- a/metadata/metadata.yaml +++ b/metadata/metadata.yaml @@ -7,14 +7,15 @@ author: menus: main: - - id: projects - label: Projects - url: /#projects - - id: personal - label: Personal + - id: projects + label: Projects + url: /#projects + + - id: personal + label: Personal label_long: Personal Notebook - url: /personal/ - hidden: true + url: /personal/ + hidden: true feeds: - title: Notebook @@ -23,7 +24,9 @@ feeds: categories: personal: dre: - name: Dreams + name: Dream Journal + show_date: true + projects: emj: name: Emojis @@ -32,7 +35,7 @@ categories: rewrites: path: - from: ^/personal - to: /9thPK7O3xn + to: /9thPK7O3xn profiles: - platform: Bandcamp diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html index f2eda8b..75c636a 100644 --- a/templates/layouts/categorized_list.html +++ b/templates/layouts/categorized_list.html @@ -6,14 +6,21 @@ $body$ $for(pages.by_category)$

- $for(it.value/first)$ - $it.category.name$ - $endfor$ + + $for(it.value/first/first)$ + $it.category.name$ + $endfor$ +

diff --git a/templates/layouts/page.html b/templates/layouts/page.html index bccdeae..e985484 100644 --- a/templates/layouts/page.html +++ b/templates/layouts/page.html @@ -1,5 +1,13 @@
+ $if(category.show_date)$ +
+
+ $date.yyyy_mm_dd$ +
+
+ $endif$ +

$title$

$body$ -- cgit v1.2.3-54-g00ecf