-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2024 Theme: Add card grid to Lessons archive
See #2417
- Loading branch information
1 parent
359d20b
commit 77ec0eb
Showing
3 changed files
with
100 additions
and
28 deletions.
There are no files selected for viewing
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
72 changes: 72 additions & 0 deletions
72
wp-content/themes/pub/wporg-learn-2024/patterns/archive-lessons-content.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,72 @@ | ||
<?php | ||
/** | ||
* Title: Lessons Archive Content | ||
* Slug: wporg-learn-2024/archive-lessons-content | ||
* Inserter: no | ||
*/ | ||
|
||
?> | ||
|
||
<!-- wp:group {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|50"}}},"layout":{"type":"constrained","justifyContent":"left","contentSize":"730px"}} --> | ||
<div class="wp-block-group" style="margin-bottom:var(--wp--preset--spacing--50)"> | ||
|
||
<!-- wp:paragraph --> | ||
<p>Introduction TBC.</p> | ||
<!-- /wp:paragraph --> | ||
|
||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- wp:query {"queryId":1,"query":{"perPage":12,"pages":0,"offset":0,"postType":"lesson","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true,"parents":[]}} --> | ||
<div class="wp-block-query"> | ||
|
||
<!-- wp:post-template {"style":{"spacing":{"blockGap":"var:preset|spacing|50"}},"layout":{"type":"grid","columnCount":null,"minimumColumnWidth":"330px"}} --> | ||
|
||
<!-- wp:group {"style":{"border":{"width":"1px","color":"var:preset|color|light-grey-1","radius":"2px"},"spacing":{"blockGap":"0"},"dimensions":{"minHeight":"100%"}},"backgroundColor":"white","layout":{"type":"flex","orientation":"vertical"}} --> | ||
<div class="wp-block-group has-border-color has-white-background-color has-background" style="border-color:var(--wp--preset--color--light-grey-1);border-width:1px;border-radius:2px;min-height:100%"> | ||
|
||
<!-- wp:post-featured-image {"style":{"spacing":{"margin":{"bottom":"0"}}}} /--> | ||
|
||
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|20","bottom":"var:preset|spacing|20","left":"20px","right":"20px"}}},"layout":{"type":"constrained"}} --> | ||
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--20);padding-right:20px;padding-bottom:var(--wp--preset--spacing--20);padding-left:20px"> | ||
|
||
<!-- wp:post-title {"level":3,"isLink":true,"style":{"typography":{"fontStyle":"normal","fontWeight":"600"},"spacing":{"margin":{"bottom":"0"}},"elements":{"link":{"color":{"text":"var:preset|color|blueberry-1"}}}},"fontSize":"normal","fontFamily":"inter"} /--> | ||
|
||
<!-- wp:post-excerpt {"showMoreOnNewLine":false,"excerptLength":16,"style":{"spacing":{"margin":{"top":"var:preset|spacing|10"}},"typography":{"lineHeight":1.6}}} /--> | ||
|
||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group"> | ||
|
||
<!-- wp:wporg-learn/learning-duration {"style":{"elements":{"link":{"color":{"text":"var:preset|color|charcoal-4"}}}},"textColor":"charcoal-4","fontSize":"small"} /--> | ||
|
||
<!-- wp:post-terms {"term":"level","separator":" ","className":"is-style-tag","fontSize":"extra-small"} /--></div> | ||
<!-- /wp:group --> | ||
|
||
</div> | ||
<!-- /wp:group --> | ||
|
||
</div> | ||
<!-- /wp:group --> | ||
|
||
<!-- /wp:post-template --> | ||
|
||
<!-- wp:query-no-results --> | ||
|
||
<!-- wp:paragraph {"placeholder":"Add text or blocks that will display when a query returns no results."} --> | ||
<p><?php esc_html_e( 'No Lessons found.', 'wporg-learn' ); ?></p> | ||
<!-- /wp:paragraph --> | ||
|
||
<!-- /wp:query-no-results --> | ||
|
||
<!-- wp:query-pagination {"layout":{"type":"flex","justifyContent":"center"}} --> | ||
|
||
<!-- wp:query-pagination-previous {"label":"Previous"} /--> | ||
|
||
<!-- wp:query-pagination-numbers /--> | ||
|
||
<!-- wp:query-pagination-next {"label":"Next"} /--> | ||
|
||
<!-- /wp:query-pagination --> | ||
|
||
</div> | ||
<!-- /wp:query --> |
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