Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/minor fixes #193

Merged
merged 3 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 6 additions & 28 deletions theme/inc/Block_Patterns/Block_Patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,41 +64,19 @@ public function register_block_pattern_categories() {
* @return void
*/
public function register_block_patterns() {
/*
Reminder: Remove Image IDs!
BOILERPLATE:
register_block_pattern(
'lhpbpt/my-pattern-name',
array(
'title' => _x( 'Pattern Name', 'pattern title', 'lhpbpt' ),
'description' => __( 'Pattern Description', 'lhpbpt' ),
// phpcs:disable
'content' => '
<!-- wp:paragraph -->
<p>Hanlo, I bims, 1 weld, lol :></p>
<!-- /wp:paragraph -->
',
// phpcs:enable
'categories' => array( 'lhpbpt' ),
'keywords' => array(
_x( 'Keyword name', 'block pattern keywords', 'lhpbpt' ),
_x( 'Keyword name', 'block pattern keywords', 'lhpbpt' ),
),
)
);
*/
register_block_pattern(
'lhpbpt/example-pattern',
array(
'title' => _x( 'Example Pattern', 'pattern title', 'lhpbpt' ),
'description' => __( 'A simple example pattern. If you can read this at prod call an admin.', 'lhpbpt' ),
'title' => _x( 'Example Pattern', 'pattern title', 'lhpbpt' ),
'description' => __( 'A simple example pattern. If you can read this at prod call an admin.', 'lhpbpt' ),
// phpcs:disable
'content' => $this->get_block_pattern_string( get_stylesheet_directory() . '/inc/Block_Patterns/bp-example.php' ),
'content' => $this->get_block_pattern_string( get_stylesheet_directory() . '/inc/Block_Patterns/bp-example.php' ),
// phpcs:enable
'categories' => array( 'lhpbpt-pattern' ),
'keywords' => array(
'categories' => array( 'lhpbpt-pattern' ),
'keywords' => array(
_x( 'Example', 'block pattern keywords', 'lhpbpt' ),
),
'viewportWidth' => 1440,
)
);
}
Expand Down
17 changes: 10 additions & 7 deletions theme/inc/Block_Patterns/bp-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
*/

?>
<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide">
<!-- wp:paragraph -->
<p>A simple example pattern. If you can read this at prod call an admin.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>A simple example pattern. If you can read this at prod call an admin.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":,"sizeSlug":"large","linkDestination":"none", "align":"wide"} -->
<figure class="wp-block-image alignwide"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/img/block-patterns/placeholder_000.png" alt="" class=""/></figure>
<!-- /wp:image -->
<!-- wp:image {"id":,"sizeSlug":"large","linkDestination":"none", "align":"wide"} -->
<figure class="wp-block-image alignwide"><img src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/img/block-patterns/placeholder_000.png" alt="" class=""/></figure>
<!-- /wp:image -->
</div>
<!-- /wp:group -->
3 changes: 1 addition & 2 deletions theme/src/css/src-base/_inner-container.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# Inner Container
--------------------------------------------------------------*/

:root .entry-content,
:root .inner-container,
:root .wp-site-blocks,
:root .is-root-container,
[class*="wp-block"] > [class*="__inner-container"],
[class*="wp-block"] > [class*="__content"] {

Expand Down
2 changes: 1 addition & 1 deletion theme/src/css/vars/_breakpoints.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@media (--md-query) {

:root {
--last-bp: var(--md-md);
--last-bp: var(--bp-md);
}
}

Expand Down
2 changes: 1 addition & 1 deletion theme/template-parts/loop/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<div class="entry-header inner-container">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="entry-content wp-site-blocks">
<div class="is-root-container">
<?php the_content(); ?>
</div>
</article>