From 6996f7ab6dbb97800756e5da8df4ef2c81c286a1 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sat, 1 Jun 2024 10:59:50 -0700 Subject: [PATCH] feat: banner blocks --- src/_includes/partials/posts/blocks.liquid | 6 ++++++ src/assets/styles/pages/post.css | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/_includes/partials/posts/blocks.liquid b/src/_includes/partials/posts/blocks.liquid index 9f08451a..9bc9e67a 100644 --- a/src/_includes/partials/posts/blocks.liquid +++ b/src/_includes/partials/posts/blocks.liquid @@ -1,5 +1,11 @@ {% for block in blocks %} {% if block.type == 'youtube_player' %} {% render "partials/widgets/youtube-player.liquid", url:block.url %} + {% elsif block.type == 'github_banner' %} + {% render "partials/banners/github.liquid", url:block.url %} + {% elsif block.type == 'npm_banner' %} + {% render "partials/banners/npm.liquid", url:block.url, command:block.command %} + {% elsif block.type == 'rss_banner' %} + {% render "partials/banners/rss.liquid", url:block.url, text:block.text %} {% endif %} {% endfor %} \ No newline at end of file diff --git a/src/assets/styles/pages/post.css b/src/assets/styles/pages/post.css index 8b5b9b4f..62f93ae4 100644 --- a/src/assets/styles/pages/post.css +++ b/src/assets/styles/pages/post.css @@ -16,6 +16,10 @@ hr.footnotes-sep { padding-bottom: var(--sizing-base); } +.footnotes + .banner { + margin-top: 0; +} + .footnote-item > p { display: inline; } \ No newline at end of file