Skip to content

Commit

Permalink
[#38] Footer Template (#76)
Browse files Browse the repository at this point in the history
* [#38] setting up pattern for footer
* [#38] Styling the footer pattern/part
* [#38] updating the footer layout
* [#38] adding esc_html_c to text in footer
  • Loading branch information
nathan-schmidt-viget authored Dec 15, 2023
1 parent ccdc180 commit 18acecb
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions themes/goodbids-nonprofit/inc/patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ function () {
'init',
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' => 'template-home-nonprofit',
'file' => 'patterns/template-home-nonprofit.php',
Expand Down
1 change: 1 addition & 0 deletions themes/goodbids-nonprofit/parts/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:pattern {"slug":"goodbids-np/footer-nonprofit"} /-->
55 changes: 55 additions & 0 deletions themes/goodbids-nonprofit/patterns/footer-nonprofit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-background">
<!-- wp:group {"align":"wide","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide">

<!-- 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:image {"width":"30px","aspectRatio":"1","scale":"contain"} -->
<figure class="wp-block-image is-resized">
<a href="<?php echo esc_url( home_url() ); ?>">
<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:site-title /-->

<!-- wp:group {"layout":{"type":"constrained","contentSize":"350px"},"fontSize":"small"} -->
<div class="wp-block-group has-small-font-size">
<!-- wp:site-tagline {"align":"center","fontSize":"small"} /-->
</div>
<!-- /wp:group -->

<!-- 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 -->
</div>
<!-- /wp:group -->

<!-- wp:group {"templateLock":"all","lock":{"move":true,"remove":true},"align":"wide","style":{"spacing":{"margin":{"top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}}},"layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"},"fontSize":"small"} -->
<div class="wp-block-group alignwide has-small-font-size" style="margin-top:var(--wp--preset--spacing--40);margin-bottom:var(--wp--preset--spacing--40)">
<!-- wp:paragraph -->
<p><?php esc_html_e( 'GOODBIDS positive auctions', 'goodbids-nonprofit' ); ?></p>
<!-- /wp:paragraph -->

<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|20"}},"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<div class="wp-block-group">
<!-- wp:paragraph -->
<p><a href="#"><?php esc_html_e( 'Terms &amp; Conditions', 'goodbids-nonprofit' ); ?></a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="#"><?php esc_html_e( 'Privacy Policy', 'goodbids-nonprofit' ); ?></a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->

0 comments on commit 18acecb

Please sign in to comment.