View jt-format-color-preset.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
<?php | |
// Converts piped "preset" colors from global styles to their var() equivalents. | |
// Borrowed from `wp_render_elements_support_styles()` | |
function jt_format_color_preset( $color ) { | |
if ( strpos( $color, 'var:preset|color|' ) !== false ) { | |
$index = strrpos( $color, '|' ) + 1; | |
$name = substr( $color, $index ); | |
$color = "var(--wp--preset--color--$name)"; |
View book-review-intro-card.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
<!-- wp:group {"align":"wide","style":{"color":{"background":"#384a5c"},"spacing":{"padding":{"top":"2rem","right":"2rem","bottom":"2rem","left":"2rem"}}},"textColor":"white"} --> | |
<div class="wp-block-group alignwide has-white-color has-text-color has-background" style="background-color:#384a5c;padding-top:2rem;padding-right:2rem;padding-bottom:2rem;padding-left:2rem"><!-- wp:media-text {"mediaId":6222,"mediaLink":"http://localhost/?attachment_id=6222","mediaType":"image","mediaWidth":40,"imageFill":false,"backgroundColor":"neutral-100"} --> | |
<div class="wp-block-media-text alignwide is-stacked-on-mobile has-neutral-100-background-color has-background" style="grid-template-columns:40% auto"><figure class="wp-block-media-text__media"><img src="http://localhost/wp-content/uploads/2021/06/ff-book-cover.jpg" alt="" class="wp-image-6222 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:group {"style":{"spacing":{"blockGap":{"top":"2rem","left":"2rem"}}}} --> | |
<div class="wp-block-group"><!-- wp: |
View book-card.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
<!-- wp:group {"align":"wide","style":{"color":{"background":"#384a5c"},"spacing":{"padding":{"top":"2rem","right":"2rem","bottom":"2rem","left":"2rem"}}},"textColor":"white"} --> | |
<div class="wp-block-group alignwide has-white-color has-text-color has-background" style="background-color:#384a5c;padding-top:2rem;padding-right:2rem;padding-bottom:2rem;padding-left:2rem"><!-- wp:media-text {"mediaId":6222,"mediaLink":"http://localhost/book-review/ff-book-cover/","mediaType":"image","mediaWidth":35} --> | |
<div class="wp-block-media-text alignwide is-stacked-on-mobile" style="grid-template-columns:35% auto"><figure class="wp-block-media-text__media"><img src="http://localhost/wp-content/uploads/2021/06/ff-book-cover.jpg" alt="" class="wp-image-6222 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:group {"style":{"spacing":{"blockGap":{"top":"2rem","left":"2rem"}}}} --> | |
<div class="wp-block-group"><!-- wp:heading --> | |
<h2>Lightning Bugs</h2> | |
<!-- /wp:heading --> | |
<!-- wp:paragraph --> | |
<p>A guy. A |
View wp-recipe-card-pattern.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
<!-- wp:group {"style":{"spacing":{"blockGap":"0px"},"border":{"style":"solid","width":"2px"}},"borderColor":"black"} --> | |
<div class="wp-block-group has-border-color has-black-border-color" style="border-style:solid;border-width:2px"><!-- wp:image {"align":"center","id":10590,"sizeSlug":"large","linkDestination":"none"} --> | |
<figure class="wp-block-image aligncenter size-large"><img src="http://localhost/wp-content/uploads/2022/03/image-2-1024x605.png" alt="" class="wp-image-10590"/></figure> | |
<!-- /wp:image --> | |
<!-- wp:group {"style":{"spacing":{"padding":{"top":"2rem","right":"2rem","bottom":"2rem","left":"2rem"}}}} --> | |
<div class="wp-block-group" style="padding-top:2rem;padding-right:2rem;padding-bottom:2rem;padding-left:2rem"><!-- wp:heading --> | |
<h2>Veggie Pizza</h2> | |
<!-- /wp:heading --> |
View wood-frame.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
<!-- wp:cover {"url":"http://localhost/wp-content/uploads/2021/12/Wood066_1K_Color.jpg","id":8923,"isRepeated":true,"dimRatio":30,"overlayColor":"foreground","minHeight":0,"isDark":false,"align":"wide","style":{"spacing":{"padding":{"top":"0.25rem","right":"0.25rem","bottom":"0.25rem","left":"0.25rem"}}}} --> | |
<div class="wp-block-cover alignwide is-light is-repeated" style="padding-top:0.25rem;padding-right:0.25rem;padding-bottom:0.25rem;padding-left:0.25rem;background-image:url(http://localhost/wp-content/uploads/2021/12/Wood066_1K_Color.jpg)"><span aria-hidden="true" class="has-foreground-background-color has-background-dim-30 wp-block-cover__gradient-background has-background-dim"></span><div class="wp-block-cover__inner-container"><!-- wp:group {"align":"wide","style":{"border":{"width":"2px","style":"solid"}},"borderColor":"foreground"} --> | |
<div class="wp-block-group alignwide has-border-color has-foreground-border-color" style="border-style:solid;border-width:2px"><!-- wp:cover {"url":"http://localhost/ |
View block-styles-loop.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
<?php | |
$block_styles = [ | |
'core/button' => [ | |
'fill-white' => __( 'Fill White', 'frost' ), | |
'outline-white' => __( 'Outline White', 'frost' ) | |
] | |
]; | |
foreach ( $block_styles as $block => $styles ) { |
View tiles-progress-percent-side.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
<?php | |
register_block_style( 'tiles/progress', [ | |
'name' => 'percent-side', | |
'label' => 'Percent Side', | |
'inline_style' => ' | |
.wp-block-tiles-progress.is-style-percent-side { | |
line-height: 1; | |
} | |
.wp-block-tiles-progress.is-style-percent-side .wp-block-tiles-progress__background, |
View cover-offset-styles.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
<?php | |
add_action( 'init', function() { | |
register_block_style( 'core/cover', [ | |
'name' => 'offset-left', | |
'label' => __( 'Offset Left' ), | |
'inline_style' => | |
'.wp-block-cover.is-style-offset-left > .wp-block-cover__inner-container { | |
background-color: inherit; |
View theme.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
{ | |
"settings": { | |
"defaults": { | |
"color": { | |
"palette": [ | |
{ | |
"slug": "transparent", | |
"color": "transparent", | |
"name" : "Transparent" | |
}, |
NewerOlder