From a6050678570f3e84a8830738076caf8626dd8e81 Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Fri, 3 May 2024 09:43:19 -0400 Subject: [PATCH 1/6] pattern consistency; post moves to pattern picker --- wp-content/plugins/core/src/Core.php | 1 - .../core/src/Post_Types/Post/Config.php | 24 ------------------- .../src/Post_Types/Post/Post_Subscriber.php | 19 --------------- .../core/patterns/card-post-search-result.php | 1 - wp-content/themes/core/patterns/card-post.php | 1 - wp-content/themes/core/patterns/example.php | 13 ---------- wp-content/themes/core/patterns/post.php | 3 ++- 7 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 wp-content/plugins/core/src/Post_Types/Post/Config.php delete mode 100644 wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php delete mode 100644 wp-content/themes/core/patterns/example.php diff --git a/wp-content/plugins/core/src/Core.php b/wp-content/plugins/core/src/Core.php index 833ca084..86a2e0a9 100644 --- a/wp-content/plugins/core/src/Core.php +++ b/wp-content/plugins/core/src/Core.php @@ -33,7 +33,6 @@ class Core { // Post Types Post_Types\Page\Page_Subscriber::class, - Post_Types\Post\Post_Subscriber::class, ]; private static self $instance; diff --git a/wp-content/plugins/core/src/Post_Types/Post/Config.php b/wp-content/plugins/core/src/Post_Types/Post/Config.php deleted file mode 100644 index af440de8..00000000 --- a/wp-content/plugins/core/src/Post_Types/Post/Config.php +++ /dev/null @@ -1,24 +0,0 @@ -template = [ - [ - 'core/pattern', - [ - 'slug' => 'patterns/post', - ], - ], - ]; - } - -} diff --git a/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php b/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php deleted file mode 100644 index 610708a2..00000000 --- a/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php +++ /dev/null @@ -1,19 +0,0 @@ -block_templates(); - } - - public function block_templates(): void { - add_action( 'init', function (): void { - $this->container->get( Config::class )->register_block_template(); - } ); - } - -} diff --git a/wp-content/themes/core/patterns/card-post-search-result.php b/wp-content/themes/core/patterns/card-post-search-result.php index 83186a74..480d6e32 100644 --- a/wp-content/themes/core/patterns/card-post-search-result.php +++ b/wp-content/themes/core/patterns/card-post-search-result.php @@ -6,7 +6,6 @@ * Categories: cards * Description: Post card with featured image, post type, post title, excerpt, and URL * Keywords: search, post, card - * Inserter: yes * Block Types: core/query */ ?> diff --git a/wp-content/themes/core/patterns/card-post.php b/wp-content/themes/core/patterns/card-post.php index 8db28fdd..bd5eae56 100644 --- a/wp-content/themes/core/patterns/card-post.php +++ b/wp-content/themes/core/patterns/card-post.php @@ -6,7 +6,6 @@ * Categories: cards * Description: Post card with featured image, primary category, and post title * Keywords: post, card - * Inserter: yes * Block Types: core/query */ ?> diff --git a/wp-content/themes/core/patterns/example.php b/wp-content/themes/core/patterns/example.php deleted file mode 100644 index 860ba1e9..00000000 --- a/wp-content/themes/core/patterns/example.php +++ /dev/null @@ -1,13 +0,0 @@ - - -

Example paragraph

- diff --git a/wp-content/themes/core/patterns/post.php b/wp-content/themes/core/patterns/post.php index 89a158ae..6b58a68f 100644 --- a/wp-content/themes/core/patterns/post.php +++ b/wp-content/themes/core/patterns/post.php @@ -6,7 +6,8 @@ * Categories: templates * Description: A simple pattern for a single post page - added automatically to new posts * Keywords: post, placeholder - * Inserter: no + * Block Types: core/post-content + * Post Types: post, wp_template */ ?> From 7902fa83412a8296cc705541bc3ae3c20840d30d Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Fri, 3 May 2024 09:53:53 -0400 Subject: [PATCH 2/6] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bde7a748..b212698f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Each changelog entry gets prefixed with the category of the item (Added, Changed, Depreciated, Removed, Fixed, Security). +## [2024.05] +- Updated: Pattern definition consistency for usage of `Inserter:` +- Removed: Automatic injection of `Post` pattern from the `post` post type and moves to using the pattern selector on creation of new post + ## [2024.04] - Changed: Remove Gravity Forms as a composer dependency and the respective mtribe.site composer utility. Gravity Forms should be added directly to a project repo when required. - Chore: Composer updates including plugins: advanced-custom-fields-pro:6.2.9, duracelltomi-google-tag-manager:1.20.2, limit-login-attempts-reloaded:2.26.8, safe-svg:2.2.4, seo-by-rank-math:1.0.216, user-switching:1.7.3 From 9a4ccb3a056c70f877325b969dd86b1ae807ab96 Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Thu, 9 May 2024 09:55:10 -0400 Subject: [PATCH 3/6] add post to default pattern loaded --- CHANGELOG.md | 2 +- wp-content/plugins/core/src/Core.php | 1 + .../core/src/Post_Types/Post/Config.php | 24 +++++++++++++++++++ .../src/Post_Types/Post/Post_Subscriber.php | 19 +++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 wp-content/plugins/core/src/Post_Types/Post/Config.php create mode 100644 wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php diff --git a/CHANGELOG.md b/CHANGELOG.md index b212698f..be31fa09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format ## [2024.05] - Updated: Pattern definition consistency for usage of `Inserter:` -- Removed: Automatic injection of `Post` pattern from the `post` post type and moves to using the pattern selector on creation of new post +- Updated: Post pattern now shows up in the pattern selector when adding a new post. ## [2024.04] - Changed: Remove Gravity Forms as a composer dependency and the respective mtribe.site composer utility. Gravity Forms should be added directly to a project repo when required. diff --git a/wp-content/plugins/core/src/Core.php b/wp-content/plugins/core/src/Core.php index 86a2e0a9..833ca084 100644 --- a/wp-content/plugins/core/src/Core.php +++ b/wp-content/plugins/core/src/Core.php @@ -33,6 +33,7 @@ class Core { // Post Types Post_Types\Page\Page_Subscriber::class, + Post_Types\Post\Post_Subscriber::class, ]; private static self $instance; diff --git a/wp-content/plugins/core/src/Post_Types/Post/Config.php b/wp-content/plugins/core/src/Post_Types/Post/Config.php new file mode 100644 index 00000000..af440de8 --- /dev/null +++ b/wp-content/plugins/core/src/Post_Types/Post/Config.php @@ -0,0 +1,24 @@ +template = [ + [ + 'core/pattern', + [ + 'slug' => 'patterns/post', + ], + ], + ]; + } + +} diff --git a/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php b/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php new file mode 100644 index 00000000..610708a2 --- /dev/null +++ b/wp-content/plugins/core/src/Post_Types/Post/Post_Subscriber.php @@ -0,0 +1,19 @@ +block_templates(); + } + + public function block_templates(): void { + add_action( 'init', function (): void { + $this->container->get( Config::class )->register_block_template(); + } ); + } + +} From 7212e6bd18ca106d12ac20de1c49df4c6e987b3d Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Thu, 9 May 2024 10:09:19 -0400 Subject: [PATCH 4/6] updated post template; updated search template --- .../core/assets/pcss/cards/_utilities.pcss | 46 +------------------ .../core/patterns/card-post-search-result.php | 2 +- wp-content/themes/core/patterns/post.php | 14 +++--- wp-content/themes/core/templates/search.html | 2 +- 4 files changed, 11 insertions(+), 53 deletions(-) diff --git a/wp-content/themes/core/assets/pcss/cards/_utilities.pcss b/wp-content/themes/core/assets/pcss/cards/_utilities.pcss index d5e1c549..bad33c5c 100644 --- a/wp-content/themes/core/assets/pcss/cards/_utilities.pcss +++ b/wp-content/themes/core/assets/pcss/cards/_utilities.pcss @@ -14,7 +14,8 @@ display: block; padding: 0; - :where(.wp-block-post-content) & { + :where(.wp-block-post-content) &, + :where(.p-card-search-result) & { position: absolute; background: transparent; color: transparent; @@ -40,46 +41,3 @@ margin-top: 1rem !important; } } - -/* ------------------------------------------------------------------------- - * - * Hidden Link Cover - * - * Applicable for blocks needing to be fully clickable. This is intended for - * use with WP's Post Title block set as a link within post card patterns. - * - * ------------------------------------------------------------------------- */ - -.a-hidden-link-cover { - display: inline; - margin: 0 !important; - padding: 0; - - > a { - display: block; - margin: 0; - padding: 0; - background: transparent !important; - color: transparent !important; - position: absolute !important; - top: 0; - left: 0; - height: 100%; - width: 100%; - z-index: 1; - font-size: 0; - - &::selection { - color: transparent; - } - - /* this needs to be specific to override global focus visible styles */ - :where(.wp-block-post-content) :not(.wp-element-button) & { - - &:focus-visible { - - @mixin focus-visible; - } - } - } -} diff --git a/wp-content/themes/core/patterns/card-post-search-result.php b/wp-content/themes/core/patterns/card-post-search-result.php index 480d6e32..19de4357 100644 --- a/wp-content/themes/core/patterns/card-post-search-result.php +++ b/wp-content/themes/core/patterns/card-post-search-result.php @@ -22,7 +22,7 @@ - + diff --git a/wp-content/themes/core/patterns/post.php b/wp-content/themes/core/patterns/post.php index 6b58a68f..699f83c7 100644 --- a/wp-content/themes/core/patterns/post.php +++ b/wp-content/themes/core/patterns/post.php @@ -10,8 +10,8 @@ * Post Types: post, wp_template */ ?> - -
+ +
@@ -20,7 +20,7 @@
- +

Aenean ut aliquet quam, sit amet ullamcorper dolor. Aliquam nec ultricies sem. Nunc malesuada elementum libero non accumsan. Nam at venenatis odio. Aenean euismod rhoncus nulla id varius. Ut ultrices velit vel dui gravida ullamcorper. Proin lobortis leo et venenatis consectetur. Aliquam iaculis ipsum id tristique euismod. Donec tempor a purus ut tempus.

@@ -38,11 +38,11 @@

Phasellus fermentum non nunc fringilla mollis. Quisque tincidunt, mauris in eleifend euismod, turpis augue sodales felis, quis lacinia ex leo non nisi. Proin luctus mauris rhoncus libero suscipit ornare. Nullam turpis magna, aliquam ut dictum at, commodo eu nulla. Cras aliquet volutpat tincidunt. Sed pharetra iaculis quam, id vestibulum nisi efficitur id. Maecenas ut risus a arcu volutpat placerat sed at ante. Nulla sed ultrices odio. Ut cursus imperdiet tortor, vitae sodales turpis placerat at. Proin fringilla ligula eget leo dignissim finibus. Vestibulum id quam varius, suscipit est sit amet, maximus erat.

- + - -
-

Related Posts

+ +
+

Related Posts

diff --git a/wp-content/themes/core/templates/search.html b/wp-content/themes/core/templates/search.html index 20967066..b0515cab 100644 --- a/wp-content/themes/core/templates/search.html +++ b/wp-content/themes/core/templates/search.html @@ -23,7 +23,7 @@

-

+
From ba9cee5eb25dcc285d778aae168b3d096afb656e Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Thu, 9 May 2024 10:38:11 -0400 Subject: [PATCH 5/6] add post split header pattern; fix columns block spacing --- CHANGELOG.md | 5 ++ .../core/blocks/core/columns/style.pcss | 2 +- .../core/patterns/post-split-header.php | 67 +++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 wp-content/themes/core/patterns/post-split-header.php diff --git a/CHANGELOG.md b/CHANGELOG.md index be31fa09..7415115a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format ## [2024.05] - Updated: Pattern definition consistency for usage of `Inserter:` - Updated: Post pattern now shows up in the pattern selector when adding a new post. +- Updated: Post pattern should now have a layout more consistent with designs we've been seeing +- Updated: Search Result Post Card should now use the Read More block instead of the Post Title block for it's link wrapper +- Updated: Search template has been updated to reflect this card change +- Removed: Utility that helped the Post Title block act as a link wrapper for cards. It's not being used anywhere within core Moose anymore, so it's not needed. +- Added: Post Split Header pattern to act as an example of an alternate post pattern. This pattern can be deleted if not necessary. ## [2024.04] - Changed: Remove Gravity Forms as a composer dependency and the respective mtribe.site composer utility. Gravity Forms should be added directly to a project repo when required. diff --git a/wp-content/themes/core/blocks/core/columns/style.pcss b/wp-content/themes/core/blocks/core/columns/style.pcss index f627ded6..28565336 100644 --- a/wp-content/themes/core/blocks/core/columns/style.pcss +++ b/wp-content/themes/core/blocks/core/columns/style.pcss @@ -3,5 +3,5 @@ */ .wp-block-columns { - gap: var(--spacing-40) var(--wp--custom--spacing--grid-gutter); + gap: var(--spacer-40) var(--wp--custom--spacing--grid-gutter); } diff --git a/wp-content/themes/core/patterns/post-split-header.php b/wp-content/themes/core/patterns/post-split-header.php new file mode 100644 index 00000000..b07eb59b --- /dev/null +++ b/wp-content/themes/core/patterns/post-split-header.php @@ -0,0 +1,67 @@ + + +
+
+
+ + + + + +
+ + + +
+
+
+ + + +

Aenean ut aliquet quam, sit amet ullamcorper dolor. Aliquam nec ultricies sem. Nunc malesuada elementum libero non accumsan. Nam at venenatis odio. Aenean euismod rhoncus nulla id varius. Ut ultrices velit vel dui gravida ullamcorper. Proin lobortis leo et venenatis consectetur. Aliquam iaculis ipsum id tristique euismod. Donec tempor a purus ut tempus.

+ + + +

Integer quis lorem pulvinar nulla eleifend pretium sed quis elit. Nullam vehicula id eros vitae blandit. Fusce eu vestibulum erat. Pellentesque molestie in arcu a fermentum. Maecenas tempus vestibulum enim at fermentum. Mauris eget eleifend neque, ac varius lacus. Aliquam quis urna aliquam orci iaculis faucibus. Curabitur at justo vehicula, cursus justo quis, iaculis nisl. Sed facilisis aliquam velit vel tempus. Duis varius nibh sed quam pulvinar imperdiet. Cras turpis nulla, fermentum eget aliquet ac, rutrum id libero.

+ + + +

Vestibulum posuere, ipsum vel ullamcorper consectetur, ipsum sem commodo enim, ut condimentum velit neque in ipsum. Nam pulvinar tristique justo nec tempus. In metus ipsum, porta in posuere id, congue eu felis. Fusce eu mi tristique, sagittis purus et, dictum nibh. Nulla sit amet sapien et tortor sollicitudin iaculis quis eget mauris. Ut at risus felis. Morbi ac massa quis tellus iaculis interdum et vitae nisi. Integer scelerisque condimentum imperdiet. Mauris faucibus venenatis condimentum. In eleifend hendrerit rhoncus. Quisque varius hendrerit eros sed rhoncus.

+ + + +

Phasellus fermentum non nunc fringilla mollis. Quisque tincidunt, mauris in eleifend euismod, turpis augue sodales felis, quis lacinia ex leo non nisi. Proin luctus mauris rhoncus libero suscipit ornare. Nullam turpis magna, aliquam ut dictum at, commodo eu nulla. Cras aliquet volutpat tincidunt. Sed pharetra iaculis quam, id vestibulum nisi efficitur id. Maecenas ut risus a arcu volutpat placerat sed at ante. Nulla sed ultrices odio. Ut cursus imperdiet tortor, vitae sodales turpis placerat at. Proin fringilla ligula eget leo dignissim finibus. Vestibulum id quam varius, suscipit est sit amet, maximus erat.

+ + + + + +
+

Related Posts

+ + + +
+ +
+ + + + + +
+ +
+
+ From 293fe3b8a4fc2f56d1adc7424f4fbf0072d74221 Mon Sep 17 00:00:00 2001 From: Geoff Dusome Date: Wed, 19 Jun 2024 15:25:05 -0400 Subject: [PATCH 6/6] remove post split header pattern --- .../core/patterns/post-split-header.php | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 wp-content/themes/core/patterns/post-split-header.php diff --git a/wp-content/themes/core/patterns/post-split-header.php b/wp-content/themes/core/patterns/post-split-header.php deleted file mode 100644 index b07eb59b..00000000 --- a/wp-content/themes/core/patterns/post-split-header.php +++ /dev/null @@ -1,67 +0,0 @@ - - -
-
-
- - - - - -
- - - -
-
-
- - - -

Aenean ut aliquet quam, sit amet ullamcorper dolor. Aliquam nec ultricies sem. Nunc malesuada elementum libero non accumsan. Nam at venenatis odio. Aenean euismod rhoncus nulla id varius. Ut ultrices velit vel dui gravida ullamcorper. Proin lobortis leo et venenatis consectetur. Aliquam iaculis ipsum id tristique euismod. Donec tempor a purus ut tempus.

- - - -

Integer quis lorem pulvinar nulla eleifend pretium sed quis elit. Nullam vehicula id eros vitae blandit. Fusce eu vestibulum erat. Pellentesque molestie in arcu a fermentum. Maecenas tempus vestibulum enim at fermentum. Mauris eget eleifend neque, ac varius lacus. Aliquam quis urna aliquam orci iaculis faucibus. Curabitur at justo vehicula, cursus justo quis, iaculis nisl. Sed facilisis aliquam velit vel tempus. Duis varius nibh sed quam pulvinar imperdiet. Cras turpis nulla, fermentum eget aliquet ac, rutrum id libero.

- - - -

Vestibulum posuere, ipsum vel ullamcorper consectetur, ipsum sem commodo enim, ut condimentum velit neque in ipsum. Nam pulvinar tristique justo nec tempus. In metus ipsum, porta in posuere id, congue eu felis. Fusce eu mi tristique, sagittis purus et, dictum nibh. Nulla sit amet sapien et tortor sollicitudin iaculis quis eget mauris. Ut at risus felis. Morbi ac massa quis tellus iaculis interdum et vitae nisi. Integer scelerisque condimentum imperdiet. Mauris faucibus venenatis condimentum. In eleifend hendrerit rhoncus. Quisque varius hendrerit eros sed rhoncus.

- - - -

Phasellus fermentum non nunc fringilla mollis. Quisque tincidunt, mauris in eleifend euismod, turpis augue sodales felis, quis lacinia ex leo non nisi. Proin luctus mauris rhoncus libero suscipit ornare. Nullam turpis magna, aliquam ut dictum at, commodo eu nulla. Cras aliquet volutpat tincidunt. Sed pharetra iaculis quam, id vestibulum nisi efficitur id. Maecenas ut risus a arcu volutpat placerat sed at ante. Nulla sed ultrices odio. Ut cursus imperdiet tortor, vitae sodales turpis placerat at. Proin fringilla ligula eget leo dignissim finibus. Vestibulum id quam varius, suscipit est sit amet, maximus erat.

- - - - - -
-

Related Posts

- - - -
- -
- - - - - -
- -
-
-