-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Post List: Move to pattern so that strings can be translated
See #121
- Loading branch information
Showing
2 changed files
with
39 additions
and
30 deletions.
There are no files selected for viewing
31 changes: 1 addition & 30 deletions
31
source/wp-content/themes/wporg-parent-2021/parts/post-list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1 @@ | ||
<!-- wp:query {"tagName":"main"} --> | ||
<main class="wp-block-query"> | ||
<!-- wp:post-template --> | ||
<!-- wp:group {"tagName":"header","className":"entry-header"} --> | ||
<header class="wp-block-group entry-header"> | ||
<!-- wp:post-title {"level":2,"isLink":true,"fontSize":"heading-3"} /--> | ||
|
||
<!-- wp:group {"className":"entry-meta"} --> | ||
<div class="wp-block-group entry-meta"> | ||
<!-- wp:post-date /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</header> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:group {"tagName":"section","style":{"spacing":{"bottom":{"top":"var:preset|spacing|60"}}}} --> | ||
<section class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--60)"> | ||
<!-- wp:post-excerpt {"moreText":"Read Post","showMoreOnNewLine":true,"layout":{"inherit":true}} /--> | ||
</section> | ||
<!-- /wp:group --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination --> | ||
<!-- wp:query-pagination-previous {"label":"Newer Posts"} /--> | ||
<!-- wp:query-pagination-numbers /--> | ||
<!-- wp:query-pagination-next {"label":"Older Posts"} /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
</main> | ||
<!-- /wp:query --> | ||
<!-- wp:pattern {"slug":"wporg-parent-2021/post-list"} /--> |
38 changes: 38 additions & 0 deletions
38
source/wp-content/themes/wporg-parent-2021/patterns/post-list.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Title: Post List | ||
* Slug: wporg-parent-2021/post-list | ||
* Categories: wporg | ||
*/ | ||
|
||
?> | ||
<!-- wp:query {"tagName":"main"} --> | ||
<main class="wp-block-query"> | ||
<!-- wp:post-template --> | ||
<!-- wp:group {"tagName":"header","className":"entry-header"} --> | ||
<header class="wp-block-group entry-header"> | ||
<!-- wp:post-title {"level":2,"isLink":true,"fontSize":"heading-3"} /--> | ||
|
||
<!-- wp:group {"className":"entry-meta"} --> | ||
<div class="wp-block-group entry-meta"> | ||
<!-- wp:post-date /--> | ||
</div> | ||
<!-- /wp:group --> | ||
</header> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:group {"tagName":"section","style":{"spacing":{"bottom":{"top":"var:preset|spacing|60"}}}} --> | ||
<section class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--60)"> | ||
<!-- wp:post-excerpt {"moreText":"<?php esc_html_e( 'Read Post', 'wporg' ); ?>","showMoreOnNewLine":true,"layout":{"inherit":true}} /--> | ||
</section> | ||
<!-- /wp:group --> | ||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-pagination --> | ||
<!-- wp:query-pagination-previous {"label":"<?php esc_html_e( 'Newer Posts', 'wporg' ); ?>"} /--> | ||
<!-- wp:query-pagination-numbers /--> | ||
<!-- wp:query-pagination-next {"label":"<?php esc_html_e( 'Older Posts', 'wporg' ); ?>"} /--> | ||
<!-- /wp:query-pagination --> | ||
|
||
</main> | ||
<!-- /wp:query --> |