Skip to content

Commit

Permalink
[#38] Styling the footer pattern/part
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-schmidt-viget committed Dec 13, 2023
1 parent 29c4a29 commit 1851244
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions themes/goodbids-nonprofit/inc/patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ function () {
function () {
$patterns = [
[
'name' => 'footer-nonprofit',
'file' => 'patterns/footer-nonprofit.php',
'title' => __( 'GoodBids Footer', 'goodbids-nonprofit' ),
'categories' => [ 'footer', 'goodbids-np' ],
'blockTypes' => [ 'core/template-part/footer' ],
'source' => 'theme',
'name' => 'footer-nonprofit',
'file' => 'patterns/footer-nonprofit.php',
'title' => __( 'GoodBids Footer', 'goodbids-nonprofit' ),
'categories' => [ 'footer', 'goodbids-np' ],
'blockTypes' => [ 'core/template-part/footer' ],
'source' => 'theme',
],
[
'name' => 'template-home-nonprofit',
Expand Down
2 changes: 1 addition & 1 deletion themes/goodbids-nonprofit/parts/footer.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!-- wp:pattern {"slug":"goodbids-nonprofit/footer-nonprofit"} /-->
<!-- wp:pattern {"slug":"goodbids-np/footer-nonprofit"} /-->
22 changes: 16 additions & 6 deletions themes/goodbids-nonprofit/patterns/footer-nonprofit.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|50"}}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group" style="padding-top:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--50)">

<!-- wp:site-logo /-->
<!-- wp:image {"width":"30px","aspectRatio":"1","scale":"contain"} -->
<figure class="wp-block-image is-resized">
<a href="/">
<img style="aspect-ratio:1;object-fit:contain;width:30px" src="<?php echo esc_url( get_stylesheet_directory_uri() ); ?>/assets/images/goodbids-icon.png" alt="<?php esc_attr_e( 'GoodBids', 'goodbids-nonprofit' ); ?>"/>
</a>
</figure>
<!-- /wp:image -->

<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","justifyContent":"center"},"fontSize":"small"} /-->
<!-- wp:group {"style":{"spacing":{"margin":{"top":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:var(--wp--preset--spacing--20)">
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","justifyContent":"center"},"fontSize":"small"} /-->
</div>
<!-- /wp:group -->

<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}}},"textColor":"secondary","fontSize":"small"} -->
<p class="has-text-align-center has-secondary-color has-text-color has-link-color has-small-font-size">
<!-- wp:paragraph {"align":"center","style":{"elements":{"link":{"color":{"text":"var:preset|color|contrast"}}},"spacing":{"margin":{"top":"var:preset|spacing|20","bottom":"0"}}},"textColor":"secondary","fontSize":"x-small"} -->
<p class="has-text-align-center has-secondary-color has-text-color has-link-color" style="margin-top:var(--wp--preset--spacing--20);margin-bottom:0;font-size:1rem">
<?php
/* Translators: WordPress link. */
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'twentytwentyfour' ) ) . '" rel="nofollow">WordPress</a>';
echo sprintf(
$wordpress_link = '<a href="' . esc_url( __( 'https://wordpress.org', 'twentytwentyfour' ) ) . '" rel="nofollow">' . esc_attr_e( 'WordPress', 'goodbids-nonprofit' ) . '</a>';
printf(
/* Translators: Designed with WordPress */
esc_html__( 'Designed with %1$s', 'twentytwentyfour' ),
$wordpress_link
Expand Down

0 comments on commit 1851244

Please sign in to comment.