diff --git a/blank-canvas-blocks/assets/images/pattern-art.jpg b/blank-canvas-blocks/assets/images/pattern-art.jpg new file mode 100644 index 0000000000..2c83a48f4c Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-art.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-camera.jpg b/blank-canvas-blocks/assets/images/pattern-camera.jpg new file mode 100644 index 0000000000..64de75f916 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-camera.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-drink.jpg b/blank-canvas-blocks/assets/images/pattern-drink.jpg new file mode 100644 index 0000000000..5a6a302e9c Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-drink.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-hat.jpg b/blank-canvas-blocks/assets/images/pattern-hat.jpg new file mode 100644 index 0000000000..cf43569c88 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-hat.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-gradient.jpg b/blank-canvas-blocks/assets/images/pattern-links-gradient.jpg new file mode 100644 index 0000000000..d7c2f82267 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-gradient.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-hamburger.png b/blank-canvas-blocks/assets/images/pattern-links-hamburger.png new file mode 100644 index 0000000000..d02ac23af6 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-hamburger.png differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-logo.png b/blank-canvas-blocks/assets/images/pattern-links-logo.png new file mode 100644 index 0000000000..3d0c579dc7 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-logo.png differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-pencils.jpg b/blank-canvas-blocks/assets/images/pattern-links-pencils.jpg new file mode 100644 index 0000000000..ed8b858ef6 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-pencils.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-singer.png b/blank-canvas-blocks/assets/images/pattern-links-singer.png new file mode 100644 index 0000000000..cf08b58490 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-singer.png differ diff --git a/blank-canvas-blocks/assets/images/pattern-links-sunglasses.jpg b/blank-canvas-blocks/assets/images/pattern-links-sunglasses.jpg new file mode 100644 index 0000000000..760a6d4d0f Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-links-sunglasses.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-portrait.jpg b/blank-canvas-blocks/assets/images/pattern-portrait.jpg new file mode 100644 index 0000000000..d64789a578 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-portrait.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-tattoo.jpg b/blank-canvas-blocks/assets/images/pattern-tattoo.jpg new file mode 100644 index 0000000000..e2f0642bbb Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-tattoo.jpg differ diff --git a/blank-canvas-blocks/assets/images/pattern-woman.jpg b/blank-canvas-blocks/assets/images/pattern-woman.jpg new file mode 100644 index 0000000000..6cc82d0607 Binary files /dev/null and b/blank-canvas-blocks/assets/images/pattern-woman.jpg differ diff --git a/blank-canvas-blocks/assets/ponyfill.css b/blank-canvas-blocks/assets/ponyfill.css index ff310f5f40..df7f12fdea 100644 --- a/blank-canvas-blocks/assets/ponyfill.css +++ b/blank-canvas-blocks/assets/ponyfill.css @@ -98,6 +98,20 @@ img { .wp-block-post-content > .alignfull { margin-left: calc(-1 * var(--wp--custom--margin--horizontal)); margin-right: calc(-1 * var(--wp--custom--margin--horizontal)); + width: unset; +} + +@media (min-width: 480px) { + .wp-block[data-align="left"], + .wp-block[data-align="right"], + .wp-site-blocks .alignleft, + .wp-site-blocks .alignright { + max-width: var(--wp--custom--alignment--aligned-max-width); + } +} + +.wp-block-group { + overflow: auto; } ::selection { @@ -108,6 +122,11 @@ img { background-color: var(--wp--custom--color--selection); } +p, h1, h2, h3, h4, h5, h6 { + margin-top: var(--wp--custom--margin--vertical); + margin-bottom: var(--wp--custom--margin--vertical); +} + *[class*="-background-color"]:not(.has-text-color) { color: var(--wp--custom--color--background); } @@ -229,6 +248,10 @@ input[type=checkbox] + label { fill: var(--wp--custom--button--color--hover-text); } +.wp-block-buttons .wp-block-button:last-child { + margin-bottom: 0; +} + .wp-block-gallery .blocks-gallery-image figcaption, .wp-block-gallery .blocks-gallery-item figcaption { font-size: var(--wp--custom--gallery--caption--font-size); @@ -452,6 +475,10 @@ p.has-drop-cap:not(:focus):first-letter { fill: var(--wp--custom--button--color--hover-text); } +.wp-block-buttons .wp-block-button:last-child { + margin-bottom: 0; +} + .wp-block-search.wp-block-search__button-inside .wp-block-search__inside-wrapper { padding: var(--wp--custom--form--padding); border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color); @@ -507,6 +534,15 @@ p.has-drop-cap:not(:focus):first-letter { line-height: 0; } +.wp-block-separator { + margin: var(--wp--custom--separator--margin); + opacity: var(--wp--custom--separator--opacity); +} + +.wp-block-separator:not(.is-style-wide) { + width: var(--wp--custom--separator--width); +} + /** * Button */ @@ -534,6 +570,10 @@ p.has-drop-cap:not(:focus):first-letter { fill: var(--wp--custom--button--color--hover-text); } +.wp-block-buttons .wp-block-button:last-child { + margin-bottom: 0; +} + .wp-block-file .wp-block-file__button { font-weight: var(--wp--custom--button--typography--font-weight); font-family: var(--wp--custom--button--typography--font-family); @@ -562,12 +602,14 @@ p.has-drop-cap:not(:focus):first-letter { fill: var(--wp--custom--button--color--hover-text); } -.wp-block-separator:not(.is-style-dots) { - border-bottom: var(--wp--custom--separator--thickness) solid var(--wp--custom--separator--color); +.wp-block-table figcaption { + font-size: var(--wp--custom--table--figcaption--typography--font-size); + text-align: center; } -.wp-block-separator:not(.is-style-dots):not(.is-style-wide) { - max-width: var(--wp--custom--separator--width); +.wp-block-table td, .wp-block-table th { + border: 1px solid; + padding: calc(0.5*var(--wp--custom--margin--vertical)) calc(0.5*var(--wp--custom--margin--horizontal)); } .wp-block-video figcaption { @@ -575,14 +617,8 @@ p.has-drop-cap:not(:focus):first-letter { text-align: var(--wp--custom--video--caption--text-align); } -.wp-block-table figcaption { - font-size: var(--wp--custom--table--figcaption--typography--font-size); - text-align: center; -} - -.wp-block-table td, .wp-block-table th { - border: 1px solid; - padding: calc(0.5*var(--wp--custom--margin--vertical)) calc(0.5*var(--wp--custom--margin--horizontal)); +.wp-block-columns { + margin-bottom: unset; } /*# sourceMappingURL=ponyfill.css.map */ \ No newline at end of file diff --git a/blank-canvas-blocks/experimental-theme.json b/blank-canvas-blocks/experimental-theme.json index a05b897d9d..9d5abac90c 100644 --- a/blank-canvas-blocks/experimental-theme.json +++ b/blank-canvas-blocks/experimental-theme.json @@ -98,14 +98,17 @@ "selection": "var(--wp--preset--color--almost-white)" }, "margin": { - "horizontal": "20px", - "vertical": "20px" + "horizontal": "30px", + "vertical": "30px" + }, + "alignment": { + "alignedMaxWidth": "50%" }, "button": { "typography": { "fontWeight": "normal", "fontFamily": "var(--wp--preset--font-family--base)", - "fontSize": "var(--wp--preset--font-size--small)", + "fontSize": "var(--wp--preset--font-size--normal)", "lineHeight": 2 }, "border": { @@ -114,8 +117,8 @@ "color": { "text": "var(--wp--custom--color--background)", "background": "var(--wp--custom--color--secondary)", - "hoverText": "var(--wp--custom--color--secondary)", - "hoverBackground": "var(--wp--custom--color--primary)" + "hoverText": "var(--wp--custom--color--background)", + "hoverBackground": "#006ba1" } }, "form": { @@ -170,8 +173,8 @@ } }, "separator": { - "color": "#ccc", - "thickness": "2px", + "margin": "var(--wp--custom--margin--vertical) auto", + "opacity": 1, "width": "150px" }, "video": { @@ -407,6 +410,16 @@ "bottom": "var(--wp--custom--margin--horizontal)" } } + }, + "core/separator": { + "color": { + "text": "var(--wp--custom--color--foreground)" + }, + "border": { + "color": "currentColor", + "style": "solid", + "width": "0 0 1px 0" + } } } } diff --git a/blank-canvas-blocks/functions.php b/blank-canvas-blocks/functions.php index 8de0ee7e50..a3d52fda7f 100644 --- a/blank-canvas-blocks/functions.php +++ b/blank-canvas-blocks/functions.php @@ -73,3 +73,8 @@ function blank_canvas_blocks_fonts_url() { return esc_url_raw( $fonts_url ); } + +/** + * Block Patterns. + */ +require get_template_directory() . '/inc/block-patterns.php'; diff --git a/blank-canvas-blocks/inc/block-patterns.php b/blank-canvas-blocks/inc/block-patterns.php new file mode 100644 index 0000000000..401b10fa31 --- /dev/null +++ b/blank-canvas-blocks/inc/block-patterns.php @@ -0,0 +1,507 @@ + __( 'Blank Canvas', 'blank-canvas-blocks' ) ) + ); + + register_block_pattern_category( + 'link-in-bio', + array( 'label' => __( 'Link in Bio', 'blank-canvas-blocks' ) ) + ); + } + + /** + * Register Block Patterns. + */ + if ( function_exists( 'register_block_pattern' ) ) { + + register_block_pattern( + 'blank-canvas-blocks/about-me', + array( + 'title' => __( 'About Me', 'blank-canvas-blocks' ), + 'categories' => array( 'blank-canvas-blocks' ), + 'content' => ' +
+ + +' . esc_html__( 'Specializing in fine line tattoos with a single needle. With over 10 years of experience, I can make your tattoo dreams come true.', 'blank-canvas-blocks' ) . '
+ + + + + + + + + +' . esc_html__( 'My latest and greatest tips, resources, and reads.', 'blank-canvas-blocks' ) . '
' . esc_html__( 'So much goodness all in one place!', 'blank-canvas-blocks' ) . '
' . esc_html__( 'Pier 38', 'blank-canvas-blocks' ) . '
' . esc_html__( 'San Francisco, CA', 'blank-canvas-blocks' ) . '
' . esc_html__( '8pm–12am', 'blank-canvas-blocks' ) . '
' . esc_html__( 'April 16th', 'blank-canvas-blocks' ) . '
' . esc_html__( 'Join us for a celebratory party featuring creative cocktails and mocktails, seasonal chef-crafted snacks and appetizers, and a range of desserts and pastries from local bakeries.', 'blank-canvas-blocks' ) . '
+ + + + + + +' . esc_html__( 'Hello! I am a photographer and designer living near Portland, Maine. When I am not posting to Instagram, you can find me shooting weddings and portraits.', 'blank-canvas-blocks' ) . '
+ + + + +' . esc_html__( 'Rhinestone Earrings, ASOS', 'blank-canvas-blocks' ) . '
+' . esc_html__( 'Pink Long Sleeve Tea Dress, Topshop', 'blank-canvas-blocks' ) . '
+' . esc_html__( 'Chunky Platform Lace-Up Boots, H&M', 'blank-canvas-blocks' ) . '
+' . esc_html__( 'Oversized Alpaca Crew, Everlane', 'blank-canvas-blocks' ) . '
+' . esc_html__( 'Published work and ephemera.', 'blank-canvas-blocks' ) . '
+ + + +' . esc_html__( '“The Lost Tricycle” Book', 'blank-canvas-blocks' ) . '
+ + + +' . esc_html__( '"Why we must own our history"', 'blank-canvas-blocks' ) . '' . wp_kses_post( ' in The Atlantic', 'blank-canvas-blocks' ) . '
+ + + +' . esc_html__( '"Identity and Ownership"', 'blank-canvas-blocks' ) . '' . wp_kses_post( ' in The New York Times', 'blank-canvas-blocks' ) . '
+ + + +' . esc_html__( 'Sponsor: Crafty Cookies', 'blank-canvas-blocks' ) . '
+ + + +' . esc_html__( 'Donate to help keep us posting!', 'blank-canvas-blocks' ) . '
+ ', + ) + ); + } + } +endif; +add_action( 'after_setup_theme', 'blank_canvas_register_block_patterns', 12 ); diff --git a/blank-canvas-blocks/sass/base/_alignment.scss b/blank-canvas-blocks/sass/base/_alignment.scss index e023ea5f17..94f00e33d1 100644 --- a/blank-canvas-blocks/sass/base/_alignment.scss +++ b/blank-canvas-blocks/sass/base/_alignment.scss @@ -1,5 +1,22 @@ .wp-block-post-content > .alignfull { margin-left: calc(-1 * var(--wp--custom--margin--horizontal)); margin-right: calc(-1 * var(--wp--custom--margin--horizontal)); + width: unset; } +@include break-mobile { + // limit size of any element that is aligned left/right + .wp-block[data-align="left"], // This is for the editor + .wp-block[data-align="right"], // This is for the editor + .wp-site-blocks .alignleft, + .wp-site-blocks .alignright { + max-width: var(--wp--custom--alignment--aligned-max-width); + } +} + +// When content is aligned left/right (particularly inside of a container) it is floated left/right +// and needs something to ensure that the content follows the block rather than nestling up beside the floated element. +// The issue should be resolved upstream: https://github.com/WordPress/gutenberg/issues/10299 +.wp-block-group { + overflow: auto; +} \ No newline at end of file diff --git a/blank-canvas-blocks/sass/base/_style.scss b/blank-canvas-blocks/sass/base/_style.scss index 369d9f0991..90ff30fa40 100644 --- a/blank-canvas-blocks/sass/base/_style.scss +++ b/blank-canvas-blocks/sass/base/_style.scss @@ -8,7 +8,7 @@ @import "accessibility"; @import "breakpoints"; @import "alignment"; -@import "text-selection"; +@import "text"; //Colors diff --git a/blank-canvas-blocks/sass/base/_text-selection.scss b/blank-canvas-blocks/sass/base/_text.scss similarity index 58% rename from blank-canvas-blocks/sass/base/_text-selection.scss rename to blank-canvas-blocks/sass/base/_text.scss index 033e91b222..8f06aac4e4 100644 --- a/blank-canvas-blocks/sass/base/_text-selection.scss +++ b/blank-canvas-blocks/sass/base/_text.scss @@ -6,3 +6,8 @@ ::-moz-selection { background-color: var(--wp--custom--color--selection); } + +p, h1, h2, h3, h4, h5, h6 { + margin-top: var(--wp--custom--margin--vertical); + margin-bottom: var(--wp--custom--margin--vertical); +} \ No newline at end of file diff --git a/blank-canvas-blocks/sass/blocks/_button.scss b/blank-canvas-blocks/sass/blocks/_button.scss index 4dd71f78fc..2873b0ba54 100644 --- a/blank-canvas-blocks/sass/blocks/_button.scss +++ b/blank-canvas-blocks/sass/blocks/_button.scss @@ -43,3 +43,12 @@ text-decoration: none; // Needed because link styles inside .entry-content add a text decoration } } + +// TODO: I'm not sure what the end goal should be here, but since we are unable to use +// a button block OUTSIDE of the context of the button collection block (grrrrrrrrr) +// then there are undesired margins to be dealt with somehow. +.wp-block-buttons { + .wp-block-button:last-child { + margin-bottom: 0; + } +} \ No newline at end of file diff --git a/blank-canvas-blocks/sass/blocks/_columns.scss b/blank-canvas-blocks/sass/blocks/_columns.scss new file mode 100644 index 0000000000..096bacc766 --- /dev/null +++ b/blank-canvas-blocks/sass/blocks/_columns.scss @@ -0,0 +1,5 @@ +// TODO: This can be removed when Gutenberg no longer expresses opinion about the bottom margin of the block columns +// or perhaps when the margins of blocks can be styled with the "style" portion of theme.json +.wp-block-columns { + margin-bottom: unset; +} \ No newline at end of file diff --git a/blank-canvas-blocks/sass/blocks/_separator.scss b/blank-canvas-blocks/sass/blocks/_separator.scss index d581662658..ab91e93f7f 100644 --- a/blank-canvas-blocks/sass/blocks/_separator.scss +++ b/blank-canvas-blocks/sass/blocks/_separator.scss @@ -1,6 +1,7 @@ -.wp-block-separator:not(.is-style-dots) { - border-bottom: var(--wp--custom--separator--thickness) solid var(--wp--custom--separator--color); - &:not(.is-style-wide) { - max-width: var(--wp--custom--separator--width); +.wp-block-separator { + margin: var(--wp--custom--separator--margin); + opacity: var(--wp--custom--separator--opacity); // Mirror controls that Gutenberg theme.css offers: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/separator/theme.scss + &:not(.is-style-wide){ + width: var(--wp--custom--separator--width); } } \ No newline at end of file diff --git a/blank-canvas-blocks/sass/ponyfill.scss b/blank-canvas-blocks/sass/ponyfill.scss index 210dd56b96..e180f04829 100644 --- a/blank-canvas-blocks/sass/ponyfill.scss +++ b/blank-canvas-blocks/sass/ponyfill.scss @@ -18,7 +18,8 @@ @import "blocks/pullquote"; @import "blocks/quote"; @import "blocks/search"; -@import "blocks/file"; @import "blocks/separator"; +@import "blocks/file"; @import "blocks/table"; @import "blocks/video"; +@import "blocks/columns";