Skip to content

Commit

Permalink
Adding Accordions pattern
Browse files Browse the repository at this point in the history
Takes advantage of new native Details block.
  • Loading branch information
beachdbishop committed Aug 11, 2023
1 parent b761122 commit e004af1
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tailwind/custom/file-header.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://underscoretw.com/
Author: Daniel Bishop
Author URI: https://beachfleischman.com
Description: Custom WP theme for BeachFleischman PLLC
Version: 2.0.20
Version: 2.0.21
Tested up to: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Expand Down
50 changes: 50 additions & 0 deletions theme/patterns/accordions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* Title: Accordions
* Slug: loadlifter/accordions
* Categories: text
* Description: Multiple Details blocks in a Group w/ appropriate CSS classes set.
* Keywords: details, summary, accordion
* Block Types: core/group, core/details, core/list
*
* @package loadlifter
* @since 2.0.21
*/
?>
<!-- wp:group {"className":"accordions is-style-blue","layout":{"type":"constrained","justifyContent":"left"}} -->
<div class="wp-block-group accordions is-style-blue"><!-- wp:details {"summary":"Services we offer"} -->
<details class="wp-block-details"><summary>Services we offer</summary><!-- wp:group {"className":"details-inner","layout":{"type":"default"}} -->
<div class="wp-block-group details-inner"><!-- wp:list -->
<ul><!-- wp:list-item -->
<li>This</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>That</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>The other service</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div>
<!-- /wp:group --></details>
<!-- /wp:details -->

<!-- wp:details {"summary":"Another one"} -->
<details class="wp-block-details"><summary>Another one</summary><!-- wp:group {"className":"details-inner","layout":{"type":"default"}} -->
<div class="wp-block-group details-inner"><!-- wp:list -->
<ul><!-- wp:list-item -->
<li>This</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>That</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li>The other service</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list --></div>
<!-- /wp:group --></details>
<!-- /wp:details --></div>
<!-- /wp:group -->

0 comments on commit e004af1

Please sign in to comment.