-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Events: Use a showcase like approach for the events list/archive (#1124)
* Try using a php block that queries. * Example query filtering. * add block build script. * Add the patterns * Hook in another filter. * Rename template. * Some minor updates. * Add the month filter * Add in Past Events template * update menu links * pass filter values to map block * Add map block. Isn't yet connected to country list. * Update copy. * Harmonize spacing. * Make font size smaller for past events. * Update post title spacing. * Update search layout. * fix upcoming spacing. * Update the filters to show the item count on archives. * Fix the template widths. * Update event list UI. * Update the menu text based on designs. * combine build/watch scripts for convenience * use get_events for filtering and caching * add missing template part * update upcoming events slug * add country filter values * add all months * schedule crons to prime cache * apply coding standards --------- Co-authored-by: Ian Dunn <[email protected]>
- Loading branch information
1 parent
70eaf22
commit 673c20c
Showing
18 changed files
with
484 additions
and
15 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
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
7 changes: 7 additions & 0 deletions
7
public_html/wp-content/themes/wporg-events-2023/parts/event-filters.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- wp:group {"style":{"spacing":{"blockGap":"0"}},"className":"wporg-query-filters","layout":{"type":"flex","flexWrap":"nowrap"}} --> | ||
<div class="wp-block-group wporg-query-filters"> | ||
<!-- wp:wporg/query-filter {"key":"format_type","multiple":false} /--> | ||
<!-- wp:wporg/query-filter {"key":"event_type","multiple":false} /--> | ||
<!-- wp:wporg/query-filter {"key":"month","multiple":false} /--> | ||
<!-- wp:wporg/query-filter {"key":"country","multiple":false} /--> | ||
</div> <!-- /wp:group --> |
18 changes: 18 additions & 0 deletions
18
public_html/wp-content/themes/wporg-events-2023/patterns/events-list-filters.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,18 @@ | ||
<?php | ||
/** | ||
* Title: Events List Filters | ||
* Slug: wporg-events-2023/event-list-filters | ||
* Inserter: no | ||
*/ | ||
|
||
?> | ||
|
||
<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}},"layout":{"type":"flex","flexWrap":"wrap","justifyContent":"space-between"}} --> | ||
<div class="wp-block-group alignwide" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)"> | ||
<!-- wp:group {"layout":{"type":"flex","flexWrap":"wrap"}} --> | ||
<div class="wp-block-group"> | ||
<!-- wp:search {"showLabel":false,"placeholder":"Search events...","width":100,"widthUnit":"%","buttonText":"Search","buttonPosition":"button-inside","buttonUseIcon":true,"className":"is-style-secondary-search-control"} /--> | ||
</div> <!-- /wp:group --> | ||
|
||
<!-- wp:template-part {"slug":"event-filters"} /--> | ||
</div> <!-- /wp:group --> |
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
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
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
16 changes: 16 additions & 0 deletions
16
public_html/wp-content/themes/wporg-events-2023/patterns/page-upcoming-see-past-events.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,16 @@ | ||
<?php | ||
/** | ||
* Title: Upcoming: See Past Events link | ||
* Slug: wporg-events-2023/page-upcoming-see-past-events | ||
* Inserter: no | ||
*/ | ||
|
||
?> | ||
|
||
<!-- wp:paragraph {"fontSize":"small"} --> | ||
<p class="has-small-font-size"> | ||
<a href="<?php echo esc_url( home_url( '/past-events/' ) ); ?>"> | ||
See past events | ||
</a> | ||
</p> | ||
<!-- /wp:paragraph --> |
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
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 |
---|---|---|
|
@@ -8,3 +8,7 @@ | |
display: none; | ||
} | ||
} | ||
|
||
body .is-layout-flex.page-upcoming-title-past-wrapper { | ||
align-items: baseline; | ||
} |
35 changes: 35 additions & 0 deletions
35
public_html/wp-content/themes/wporg-events-2023/src/event-list/block.json
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,35 @@ | ||
{ | ||
"$schema": "https://schemas.wp.org/trunk/block.json", | ||
"apiVersion": 2, | ||
"name": "wporg/event-list", | ||
"version": "0.1.0", | ||
"title": "WordPress Events List", | ||
"category": "design", | ||
"icon": "list-view", | ||
"description": "List of WordPress Events", | ||
"textdomain": "wporg", | ||
"attributes": { | ||
"events": { | ||
"type": "string", | ||
"default": "all-upcoming" | ||
} | ||
}, | ||
"supports": { | ||
"align": true, | ||
"color": { | ||
"background": true, | ||
"text": true | ||
}, | ||
"spacing": { | ||
"margin": [ "top", "bottom" ], | ||
"padding": true, | ||
"blockGap": false | ||
}, | ||
"typography": { | ||
"fontSize": true, | ||
"lineHeight": true | ||
} | ||
}, | ||
"editorScript": "file:./index.js", | ||
"style": "file:./style-index.css" | ||
} |
Oops, something went wrong.