From 73d06e9dda73ec25363e54082731ae9f38f22af9 Mon Sep 17 00:00:00 2001 From: tellyworth Date: Thu, 18 Nov 2021 17:38:00 +1100 Subject: [PATCH 1/6] Rough starting templates This is a starting point for the month-in-wordpress templates. There's no CSS changes yet, just the markup. Some notes: * The wp:query block has some limitations and oddities. I've set columns to 4 because otherwise it was only showing 2. Could be an off-by-one bug or just some quirky layout stuff. * I used perPage:10000. 0/-1 don't work like WP_Query. I'd prefer to set the limit to something like 60 (5 years per page), but it seems that the pagination block doesn't pay attention to the query block's page parameters and that would mean putting a magic number in two places. Probably there's a sensible way to handle that, but for now I've just removed the pagination altogether. --- .../content-category-month-in-wordpress.html | 11 +++++++++++ .../category-month-in-wordpress.html | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html create mode 100644 source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html diff --git a/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html b/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html new file mode 100644 index 00000000..d7e0e2c4 --- /dev/null +++ b/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html @@ -0,0 +1,11 @@ + +
+

+ + + + +
+ diff --git a/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html b/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html new file mode 100644 index 00000000..80d7fce0 --- /dev/null +++ b/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html @@ -0,0 +1,16 @@ + + + + + +
+ + + + +
+ + + + + From ad25ed4d90fec4c2b30c967f36b01bdb9eb92b49 Mon Sep 17 00:00:00 2001 From: tellyworth Date: Mon, 29 Nov 2021 18:51:10 +1100 Subject: [PATCH 2/6] Limit the query to the right category This uses the `category` pseudo-attribute from #88. --- .../block-templates/category-month-in-wordpress.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html b/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html index 80d7fce0..4ff7a6f6 100644 --- a/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html +++ b/source/wp-content/themes/wporg-news-2021/block-templates/category-month-in-wordpress.html @@ -2,7 +2,7 @@ - +
From 83d3f96ae73b24eec3bf200335c3d35db5c771ab Mon Sep 17 00:00:00 2001 From: tellyworth Date: Thu, 9 Dec 2021 18:28:45 +1100 Subject: [PATCH 3/6] Make headings links --- .../content-category-month-in-wordpress.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html b/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html index d7e0e2c4..fb089c6f 100644 --- a/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html +++ b/source/wp-content/themes/wporg-news-2021/block-template-parts/content-category-month-in-wordpress.html @@ -1,6 +1,6 @@
-

+