Tags and homepage working.

Posts tagged "proclamation" will be listed on the front page.
This commit is contained in:
Joe Ardent 2023-01-08 15:55:40 -08:00
parent 0e902754ef
commit 8a6bb0bbed
10 changed files with 36 additions and 16 deletions

View File

@ -3,6 +3,7 @@ title = "From the Desk of the Head of R&D and Chief Sundries Officer"
sort_by = "date" sort_by = "date"
generate_feed = true generate_feed = true
toc = true toc = true
template = "home.html"
[extra] [extra]
toc = true toc = true
+++ +++

View File

@ -3,7 +3,7 @@ title = "A Very Digital Artifact"
slug = "a-very-digital-artifact" slug = "a-very-digital-artifact"
date = "2022-11-11" date = "2022-11-11"
[taxonomies] [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) ![a CNC-carved exaggerated relief of California made of plywood](PXL_20220723_214758454.jpg)

View File

@ -1,6 +1,6 @@
.cards { .cards {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
grid-template-rows: auto; grid-template-rows: auto;
gap: 24px; gap: 24px;
padding: 12px 0; padding: 12px 0;

View File

@ -73,38 +73,32 @@ h3,
h4, h4,
h5, h5,
h6 { h6 {
font-size: 1.2rem; /* font-size: 1.2rem; */
margin-top: 2em; margin-top: 2em;
} }
h1::before { h1::before {
color: var(--primary-color); color: var(--primary-color);
content: "# ";
} }
h2::before { h2::before {
color: var(--primary-color); color: var(--primary-color);
content: "## ";
} }
h3::before { h3::before {
color: var(--primary-color); color: var(--primary-color);
content: "### ";
} }
h4::before { h4::before {
color: var(--primary-color); color: var(--primary-color);
content: "#### ";
} }
h5::before { h5::before {
color: var(--primary-color); color: var(--primary-color);
content: "##### ";
} }
h6::before { h6::before {
color: var(--primary-color); color: var(--primary-color);
content: "###### ";
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {

View File

@ -1,5 +1,6 @@
.tags li::before { .tags li::before {
content: "🏷 "; content: "🏷 ";
font-size: 0.5rem;
} }
.tags a { .tags a {

16
templates/home.html Normal file
View File

@ -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 %}

6
templates/page.html Normal file
View File

@ -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 %}

View File

@ -7,7 +7,7 @@
<ul> <ul>
{% for tag in terms %} {% for tag in terms %}
<h2> <h2>
<a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag.name) | safe }}">#{{ tag.name }}</a> <sup>{{ tag.pages | length }}</sup> <a class="post-tag" href="{{ get_taxonomy_url(kind='tags', name=tag.name) | safe }}">{{ tag.name }}</a> <sup>{{ tag.pages | length }}</sup>
</h2> </h2>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -2,7 +2,9 @@
{% block main_content %} {% block main_content %}
{{ post_macros::list_posts(pages = term.pages) }} <h2>Posts tagged {{ term.name }}</h2>
{{ post_macros::cards_posts(pages = term.pages) }}
{% endblock main_content %} {% endblock main_content %}

@ -1 +1 @@
Subproject commit 989bdd129b8bcb474a0336967e7c399433a23f64 Subproject commit eb02b7d3c18a397fe5baa394b50fe2c199208dbe