From 24d2d40b6142faea097999d2ee078be8c08368f5 Mon Sep 17 00:00:00 2001 From: Steve Richert Date: Tue, 12 Dec 2023 19:13:57 +0000 Subject: [PATCH 1/2] Show all tags for a post rather than the "primary" tag only These changes slightly restyle the post metadata to make better use of Flexbox's gap feature, simplifying metadata spacing at different viewport widths. --- assets/css/screen.css | 20 ++++++++++++++------ post.hbs | 8 ++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/assets/css/screen.css b/assets/css/screen.css index 325ceff..396a6cf 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -595,12 +595,15 @@ hr { top: 48px; display: flex; flex-direction: column; + flex-wrap: wrap; + gap: 16px; + padding-right: 16px; } .gh-article-meta .gh-author-image { width: 72px; height: 72px; - margin-bottom: 16px; + margin-bottom: 0; } .gh-article-meta .gh-author-name { @@ -620,10 +623,15 @@ hr { color: var(--color-secondary-text); } +.gh-article-tags { + display: flex; + flex-wrap: wrap; + gap: 10px; +} + .gh-article-tag { width: fit-content; padding: 2px 12px; - margin-top: 20px; font-size: 1.5rem; font-weight: 700; color: var(--tag-color, var(--color-darker-gray)) !important; @@ -745,21 +753,21 @@ hr { .gh-article-meta-inner { flex-direction: row; align-items: center; + gap: 12px; + padding-right: 0; } .gh-article-meta .gh-author-image { width: 64px; height: 64px; - margin-right: 12px; - margin-bottom: 0; } .gh-article-meta-wrapper { flex-grow: 1; } - .gh-article-tag { - margin-top: 0; + .gh-article-tags { + gap: 6px; } } diff --git a/post.hbs b/post.hbs index d18f780..b81e1d0 100644 --- a/post.hbs +++ b/post.hbs @@ -38,8 +38,12 @@ {{/primary_author}} - {{#if primary_tag}} - {{primary_tag.name}} + {{#if tags}} +
+ {{#foreach}} + + {{/foreach}} +
{{/if}} From b2dc95ef76f6b98c27bb94b56306d325791c43cd Mon Sep 17 00:00:00 2001 From: Steve Richert Date: Tue, 12 Dec 2023 15:26:03 -0500 Subject: [PATCH 2/2] Don't forget to iterate over something! --- post.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.hbs b/post.hbs index b81e1d0..7384e43 100644 --- a/post.hbs +++ b/post.hbs @@ -40,7 +40,7 @@ {{#if tags}}