diff --git a/source/wp-content/themes/wporg-showcase-2022/functions.php b/source/wp-content/themes/wporg-showcase-2022/functions.php index b2e25778..12fc9a78 100644 --- a/source/wp-content/themes/wporg-showcase-2022/functions.php +++ b/source/wp-content/themes/wporg-showcase-2022/functions.php @@ -16,6 +16,7 @@ add_action( 'wp', __NAMESPACE__ . '\jetpackme_remove_rp', 20 ); add_filter( 'excerpt_length', __NAMESPACE__ . '\modify_excerpt_length', 999 ); add_filter( 'excerpt_more', __NAMESPACE__ . '\modify_excerpt_more' ); +add_filter( 'query_loop_block_query_vars', __NAMESPACE__ . '\modify_query_loop_block_query_vars', 10, 2 ); /** * Enqueue scripts and styles. @@ -154,3 +155,20 @@ function modify_excerpt_length() { function modify_excerpt_more() { return '...'; } + +/** + * Modify query vars for mast head query. + * + * See: https://github.com/WordPress/gutenberg/issues/41184 + * + * @return string + */ +function modify_query_loop_block_query_vars( $query, $block ) { + if ( isset( $block->context['query']['sticky'] ) && 'only' === $block->context['query']['sticky'] ) { + $sticky = get_option( 'sticky_posts' ); + $query['ignore_sticky_posts'] = 1; + $query['post__in'] = $sticky; + } + + return $query; +} diff --git a/source/wp-content/themes/wporg-showcase-2022/images/showcase.svg b/source/wp-content/themes/wporg-showcase-2022/images/showcase.svg new file mode 100644 index 00000000..26e87041 --- /dev/null +++ b/source/wp-content/themes/wporg-showcase-2022/images/showcase.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/source/wp-content/themes/wporg-showcase-2022/patterns/front-page.php b/source/wp-content/themes/wporg-showcase-2022/patterns/front-page.php index 3afc8e86..3d6fe41f 100644 --- a/source/wp-content/themes/wporg-showcase-2022/patterns/front-page.php +++ b/source/wp-content/themes/wporg-showcase-2022/patterns/front-page.php @@ -7,8 +7,44 @@ ?> - -
+ +
+ +
+
+
+

+ + + +
+
+
+
+
+ + + +
+
+
+
+

+ + +
+
+
+ + +
+
+ +
+ + + +

diff --git a/source/wp-content/themes/wporg-showcase-2022/src/style/style.scss b/source/wp-content/themes/wporg-showcase-2022/src/style/style.scss index 231217a1..94ae1a1d 100644 --- a/source/wp-content/themes/wporg-showcase-2022/src/style/style.scss +++ b/source/wp-content/themes/wporg-showcase-2022/src/style/style.scss @@ -148,3 +148,22 @@ button[type="submit"] { margin-right: var(--wp--preset--spacing--60) !important; } } + +.wporg-hero-details { + padding-top: var(--wp--preset--spacing--10); + + > * { + text-align: right; + } +} + +@media (min-width: 782px) { + .wporg-hero-details { + padding-top: 0; + margin-top: -64px !important; + + > * { + text-align: left; + } + } +} diff --git a/source/wp-content/themes/wporg-showcase-2022/templates/front-page.html b/source/wp-content/themes/wporg-showcase-2022/templates/front-page.html index d96e744e..a95aee50 100644 --- a/source/wp-content/themes/wporg-showcase-2022/templates/front-page.html +++ b/source/wp-content/themes/wporg-showcase-2022/templates/front-page.html @@ -1,13 +1,7 @@ - + - -
-

Masthead

-
- - - -
+ +