Skip to content

Commit

Permalink
My pledges: Style my pledge list and header on small screens
Browse files Browse the repository at this point in the history
Fixes #292
  • Loading branch information
ryelle committed Sep 9, 2024
1 parent 45875f7 commit dd10a5e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions themes/wporg-5ftf-2024/patterns/my-pledges.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

?>
<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"},"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group alignwide" style="margin-bottom:var(--wp--preset--spacing--40)">
<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"},"blockGap":"var:preset|spacing|40"}},"layout":{"type":"flex","flexWrap":"nowrap"},"className":"my-pledges-header"} -->
<div class="wp-block-group alignwide my-pledges-header" style="margin-bottom:var(--wp--preset--spacing--40)">
<!-- wp:group {"style":{"border":{"radius":"50%"}},"backgroundColor":"light-grey-2","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-light-grey-2-background-color has-background" style="border-radius:50%">
<!-- wp:post-featured-image {"aspectRatio":"1","width":"110px","scale":"contain","style":{"border":{"radius":"50%"}}} /-->
Expand Down
2 changes: 1 addition & 1 deletion themes/wporg-5ftf-2024/src/my-pledge-list/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<?php
if ( $success_message ) {
render_notice( 'success', $success_message );
echo '<div style="margin-top:var(--wp--preset--spacing--20);height:0" aria-hidden="true" class="wp-block-spacer"></div>';
echo '<div style="margin-top:var(--wp--preset--spacing--40);height:0" aria-hidden="true" class="wp-block-spacer"></div>';
}
?>

Expand Down
8 changes: 8 additions & 0 deletions themes/wporg-5ftf-2024/src/my-pledge-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
margin-top: var(--wp--preset--spacing--20);
}

> h2 {
margin-top: 80px !important;

@media (max-width: 600px) {
margin-top: 40px !important;
}
}

.my-pledges__pledge-actions {
form {
display: flex;
Expand Down
13 changes: 13 additions & 0 deletions themes/wporg-5ftf-2024/src/style/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,16 @@ body.is-page-in-menu .wp-block-wporg-local-navigation-bar .wp-block-post-title {
}
}
}

/* Style the my pledges header */
.my-pledges-header {

@media (max-width: 600px) {
flex-direction: column;
margin-block-end: 40px !important;

> .wp-block-group {
align-items: center;
}
}
}

0 comments on commit dd10a5e

Please sign in to comment.