From 8a6bb0bbed85d1e7f582a55e7885fe0ffa313231 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Sun, 8 Jan 2023 15:55:40 -0800 Subject: [PATCH] Tags and homepage working. Posts tagged "proclamation" will be listed on the front page. --- content/_index.md | 1 + .../sundries/a-very-digital-artifact/index.md | 2 +- sass/parts/_cards.scss | 4 ++-- sass/parts/_header.scss | 10 ++-------- sass/parts/_tags.scss | 5 +++-- templates/home.html | 16 ++++++++++++++++ templates/page.html | 6 ++++++ templates/tags/list.html | 2 +- templates/taxonomy_single.html | 4 +++- themes/apollo | 2 +- 10 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 templates/home.html create mode 100644 templates/page.html diff --git a/content/_index.md b/content/_index.md index 30f06c2..3ab305e 100644 --- a/content/_index.md +++ b/content/_index.md @@ -3,6 +3,7 @@ title = "From the Desk of the Head of R&D and Chief Sundries Officer" sort_by = "date" generate_feed = true toc = true +template = "home.html" [extra] toc = true +++ diff --git a/content/sundries/a-very-digital-artifact/index.md b/content/sundries/a-very-digital-artifact/index.md index b16ed8b..1d11164 100644 --- a/content/sundries/a-very-digital-artifact/index.md +++ b/content/sundries/a-very-digital-artifact/index.md @@ -3,7 +3,7 @@ title = "A Very Digital Artifact" slug = "a-very-digital-artifact" date = "2022-11-11" [taxonomies] -tags = ["3dprinting", "CAD", "GIS", "CNC", "art", "sundries"] +tags = ["3dprinting", "CAD", "GIS", "CNC", "art", "sundries", "proclamation"] +++ ![a CNC-carved exaggerated relief of California made of plywood](PXL_20220723_214758454.jpg) diff --git a/sass/parts/_cards.scss b/sass/parts/_cards.scss index a23fd91..9ecdada 100644 --- a/sass/parts/_cards.scss +++ b/sass/parts/_cards.scss @@ -1,6 +1,6 @@ .cards { display: grid; - grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(500px, 1fr)); grid-template-rows: auto; gap: 24px; padding: 12px 0; @@ -41,4 +41,4 @@ .cards { gap: 18px; } -} \ No newline at end of file +} diff --git a/sass/parts/_header.scss b/sass/parts/_header.scss index 31fc388..90c0fda 100644 --- a/sass/parts/_header.scss +++ b/sass/parts/_header.scss @@ -73,42 +73,36 @@ h3, h4, h5, h6 { - font-size: 1.2rem; + /* font-size: 1.2rem; */ margin-top: 2em; } h1::before { color: var(--primary-color); - content: "# "; } h2::before { color: var(--primary-color); - content: "## "; } h3::before { color: var(--primary-color); - content: "### "; } h4::before { color: var(--primary-color); - content: "#### "; } h5::before { color: var(--primary-color); - content: "##### "; } h6::before { color: var(--primary-color); - content: "###### "; } @media (prefers-color-scheme: dark) { .social>img { filter: invert(1); } -} \ No newline at end of file +} diff --git a/sass/parts/_tags.scss b/sass/parts/_tags.scss index 461530c..cefb3e9 100644 --- a/sass/parts/_tags.scss +++ b/sass/parts/_tags.scss @@ -1,5 +1,6 @@ .tags li::before { - content: "🏷 "; + content: "🏷 "; + font-size: 0.5rem; } .tags a { @@ -9,4 +10,4 @@ .tags a:hover { color: var(--hover_color); background-color: var(--primary-color); -} \ No newline at end of file +} diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..761d5ac --- /dev/null +++ b/templates/home.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block main_content %} + {% if section.extra.section_path -%} + {% set section = get_section(path=section.extra.section_path) %} + {% endif -%} + +{{ post_macros::page_header(title=section.title) }} + +{%- set tags = get_taxonomy(kind="tags") -%} +{%- set term = get_taxonomy_term(kind="tags", term="proclamation") -%} + +{{ post_macros::list_posts(pages = term.pages) }} + +{% endblock main_content %} + diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..fc9ac2b --- /dev/null +++ b/templates/page.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block main_content %} +{{ post_macros::content(page=page) }} +{{ post_macros::tags(page=page, short=true) }} +{% endblock main_content %} diff --git a/templates/tags/list.html b/templates/tags/list.html index a289a89..28b1bd7 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -7,7 +7,7 @@ diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index bf224a0..053b141 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -2,7 +2,9 @@ {% block main_content %} -{{ post_macros::list_posts(pages = term.pages) }} +

Posts tagged {{ term.name }}

+ +{{ post_macros::cards_posts(pages = term.pages) }} {% endblock main_content %} diff --git a/themes/apollo b/themes/apollo index 989bdd1..eb02b7d 160000 --- a/themes/apollo +++ b/themes/apollo @@ -1 +1 @@ -Subproject commit 989bdd129b8bcb474a0336967e7c399433a23f64 +Subproject commit eb02b7d3c18a397fe5baa394b50fe2c199208dbe