diff --git a/.sandbox-ignore b/.sandbox-ignore index d448670ce0..535661602a 100644 --- a/.sandbox-ignore +++ b/.sandbox-ignore @@ -9,6 +9,7 @@ .vscode .wp-env.* *.code-workspace +block-canvas/ package-lock.json sandbox.sh sandbox-git.sh diff --git a/block-canvas/functions.php b/block-canvas/functions.php new file mode 100644 index 0000000000..1ca1bd6ede --- /dev/null +++ b/block-canvas/functions.php @@ -0,0 +1,58 @@ +get( 'Version' ) + ); + + // Enqueue theme stylesheet. + wp_enqueue_style( 'block_canvas-style' ); + + } + +endif; + +add_action( 'wp_enqueue_scripts', 'block_canvas_styles' ); diff --git a/block-canvas/index.php b/block-canvas/index.php new file mode 100644 index 0000000000..b5b023f16c --- /dev/null +++ b/block-canvas/index.php @@ -0,0 +1,2 @@ + +
+ +
+ +

Proudly Powered by WordPress

+ +
+ +
+ \ No newline at end of file diff --git a/block-canvas/parts/header.html b/block-canvas/parts/header.html new file mode 100644 index 0000000000..5b34a3f9db --- /dev/null +++ b/block-canvas/parts/header.html @@ -0,0 +1,29 @@ + +
+ + + + +
+ + + + + diff --git a/block-canvas/parts/post-meta.html b/block-canvas/parts/post-meta.html new file mode 100644 index 0000000000..bf00c30600 --- /dev/null +++ b/block-canvas/parts/post-meta.html @@ -0,0 +1,8 @@ + +
+ + + + +
+ \ No newline at end of file diff --git a/block-canvas/patterns/404.php b/block-canvas/patterns/404.php new file mode 100644 index 0000000000..f747a9c5cb --- /dev/null +++ b/block-canvas/patterns/404.php @@ -0,0 +1,16 @@ + + + +

+ + + +

+ diff --git a/block-canvas/style.css b/block-canvas/style.css new file mode 100644 index 0000000000..f858b0359c --- /dev/null +++ b/block-canvas/style.css @@ -0,0 +1,133 @@ +/* +Theme Name: Block Canvas +Theme URI: https://github.com/Automattic/themes/tree/trunk/block-canvas +Author: Automattic +Author URI: https://automattic.com/ +Description: Block canvas is a simple theme that supports full-site editing. It comes with a set of minimal templates and design settings that can be manipulated through Global Styles. Use it to build something beautiful. +Requires at least: 5.7 +Tested up to: 5.9 +Requires PHP: 5.7 +Version: 0.0.1 +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Text Domain: block-canvas +Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, theme-options, threaded-comments, translation-ready, wide-blocks, auto-loading-homepage + +Block canvas WordPress Theme, (C) 2021 Automattic, Inc. +Block canvas is distributed under the terms of the GNU GPL. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +*/ + +/* + * Font smoothing + */ + + body { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; +} + +/* + * Button hover styles. + * Necessary until the following issue is resolved in Gutenberg: + * https://github.com/WordPress/gutenberg/issues/27075 + */ + +.wp-block-search__button:hover, +.wp-block-file .wp-block-file__button:hover, +.wp-block-button__link:hover { + background-color: var(--wp--preset--color--primary); +} + +/* + * Search and File Block button styles. + * Necessary until the following issues are resolved in Gutenberg: + * https://github.com/WordPress/gutenberg/issues/36444 + * https://github.com/WordPress/gutenberg/issues/27760 + */ + +.wp-block-search__button, +.wp-block-file .wp-block-file__button { + background-color: var(--wp--preset--color--foreground); + border-radius: 0; + border: none; + color: var(--wp--preset--color--background); + font-size: var(--wp--preset--typography--font-size--normal); + padding: calc(0.667em + 2px) calc(1.333em + 2px); +} + +/* + * Alignment styles, borrowed from Twenty Twenty-Two. + * These rules are temporary, and should not be relied on or + * modified too heavily by themes or plugins that build on + * Twenty Twenty-Two. These are meant to be a precursor to + * a global solution provided by the Block Editor. + * + * Relevant issues: + * https://github.com/WordPress/gutenberg/issues/35607 + * https://github.com/WordPress/gutenberg/issues/35884 + */ + +.wp-site-blocks, +body > .is-root-container, +.edit-post-visual-editor__post-title-wrapper, +.wp-block-group.alignfull, +.wp-block-group.has-background, +.wp-block-columns.alignfull.has-background, +.wp-block-cover.alignfull, +.is-root-container .wp-block[data-align='full'] > .wp-block-group, +.is-root-container .wp-block[data-align='full'] > .wp-block-columns.has-background, +.is-root-container .wp-block[data-align='full'] > .wp-block-cover { + padding-left: var(--wp--custom--gap--horizontal); + padding-right: var(--wp--custom--gap--horizontal); +} + +.wp-site-blocks .alignfull, +.wp-site-blocks > .wp-block-group.has-background, +.wp-site-blocks > .wp-block-cover, +.wp-site-blocks > .wp-block-template-part > .wp-block-group.has-background, +.wp-site-blocks > .wp-block-template-part > .wp-block-cover, +body > .is-root-container > .wp-block-cover, +body > .is-root-container > .wp-block-template-part > .wp-block-group.has-background, +body > .is-root-container > .wp-block-template-part > .wp-block-cover, +.is-root-container .wp-block[data-align='full'] { + margin-left: calc(-1 * var(--wp--custom--gap--horizontal)) !important; + margin-right: calc(-1 * var(--wp--custom--gap--horizontal)) !important; + max-width: unset; + width: unset; +} + +/* Blocks inside columns don't have negative margins. */ +.wp-site-blocks .wp-block-columns .wp-block-column .alignfull, +.is-root-container .wp-block-columns .wp-block-column .wp-block[data-align="full"], +/* We also want to avoid stacking negative margins. */ +.wp-site-blocks .alignfull:not(.wp-block-group) .alignfull, +.is-root-container .wp-block[data-align="full"] > *:not(.wp-block-group) .wp-block[data-align="full"] { + margin-left: auto !important; + margin-right: auto !important; + width: inherit; +} + +/* + * Responsive menu container padding. + * This ensures the responsive container inherits the same + * spacing defined above. This behavior may be built into + * the Block Editor in the future. + */ + +.wp-block-navigation__responsive-container.is-menu-open { + padding-top: var(--wp--custom--gap--horizontal); + padding-bottom: var(--wp--custom--gap--vertical); + padding-right: var(--wp--custom--gap--horizontal); + padding-left: var(--wp--custom--gap--horizontal); +} diff --git a/block-canvas/templates/404.html b/block-canvas/templates/404.html new file mode 100644 index 0000000000..590ed7d5dc --- /dev/null +++ b/block-canvas/templates/404.html @@ -0,0 +1,12 @@ + + + +
+ + + + +
+ + + diff --git a/block-canvas/templates/archive.html b/block-canvas/templates/archive.html new file mode 100644 index 0000000000..097b15cbaa --- /dev/null +++ b/block-canvas/templates/archive.html @@ -0,0 +1,33 @@ + + + +
+ + + +
+ + + + + + + +
+ + + +
+ + + + + + + +
+ +
+ + + diff --git a/block-canvas/templates/blank.html b/block-canvas/templates/blank.html new file mode 100644 index 0000000000..120094756e --- /dev/null +++ b/block-canvas/templates/blank.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/block-canvas/templates/footer-only.html b/block-canvas/templates/footer-only.html new file mode 100644 index 0000000000..6e42f28a78 --- /dev/null +++ b/block-canvas/templates/footer-only.html @@ -0,0 +1,3 @@ + + + diff --git a/block-canvas/templates/header-footer-only.html b/block-canvas/templates/header-footer-only.html new file mode 100644 index 0000000000..376b9c3bff --- /dev/null +++ b/block-canvas/templates/header-footer-only.html @@ -0,0 +1,10 @@ + + + +
+ + +
+ + + diff --git a/block-canvas/templates/index.html b/block-canvas/templates/index.html new file mode 100644 index 0000000000..82523e613d --- /dev/null +++ b/block-canvas/templates/index.html @@ -0,0 +1,33 @@ + + + +
+ + +
+ + + + + + + +
+ + + +
+ + + + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/block-canvas/templates/page.html b/block-canvas/templates/page.html new file mode 100644 index 0000000000..c77fec86e7 --- /dev/null +++ b/block-canvas/templates/page.html @@ -0,0 +1,27 @@ + + + + +
+ +
+ + + +
+ + + +
+ + + +
+ + + + +
+ + + diff --git a/block-canvas/templates/search.html b/block-canvas/templates/search.html new file mode 100644 index 0000000000..29fe3fcb3e --- /dev/null +++ b/block-canvas/templates/search.html @@ -0,0 +1,47 @@ + + + +
+ + + + + +
+ + + +
+ + +
+ + + + + + + + + + + +
+ + + + +
+ + + + + + + +
+ +
+ + + \ No newline at end of file diff --git a/block-canvas/templates/single.html b/block-canvas/templates/single.html new file mode 100644 index 0000000000..12bdb1dd19 --- /dev/null +++ b/block-canvas/templates/single.html @@ -0,0 +1,28 @@ + + + +
+ +
+ + + +
+ + + + + +
+ + + +
+ + + + +
+ + + diff --git a/block-canvas/theme.json b/block-canvas/theme.json new file mode 100644 index 0000000000..bd8fa5a8a9 --- /dev/null +++ b/block-canvas/theme.json @@ -0,0 +1,416 @@ +{ + "$schema": "https://schemas.wp.org/trunk/theme.json", + "version": 2, + "templateParts": [ + { + "name": "header", + "area": "header" + }, + { + "name": "footer", + "area": "footer" + } + ], + "customTemplates": [ + { + "name": "blank", + "title": "Blank", + "postTypes": [ + "page", + "post" + ] + }, + { + "name": "header-footer-only", + "title": "Header and Footer Only", + "postTypes": [ + "page", + "post" + ] + }, + { + "name": "footer-only", + "title": "Footer Only", + "postTypes": [ + "page", + "post" + ] + } + ], + "settings": { + "appearanceTools": true, + "color": { + "palette": [ + { + "slug": "primary", + "color": "#007cba", + "name": "Primary" + }, + { + "slug": "secondary", + "color": "#006ba1", + "name": "Secondary" + }, + { + "slug": "foreground", + "color": "#333333", + "name": "Foreground" + }, + { + "slug": "background", + "color": "#ffffff", + "name": "Background" + }, + { + "slug": "tertiary", + "color": "#F0F0F0", + "name": "Tertiary" + } + ] + }, + "custom": { + "button": { + "border": { + "color": "var(--wp--preset--color--primary)", + "radius": "4px", + "style": "solid", + "width": "2px" + }, + "color": { + "background": "var(--wp--preset--color--primary)", + "text": "var(--wp--preset--color--background)" + }, + "hover": { + "color": { + "text": "var(--wp--preset--color--background)", + "background": "var(--wp--preset--color--secondary)" + }, + "border": { + "color": "var(--wp--preset--color--secondary)" + } + }, + "spacing": { + "padding": { + "top": "0.667em", + "bottom": "0.667em", + "left": "1.333em", + "right": "1.333em" + } + }, + "typography": { + "fontSize": "var(--wp--custom--font-sizes--normal)", + "fontWeight": "normal", + "lineHeight": 2 + } + }, + "fontSizes": { + "x-small": "14px", + "normal": "18px" + }, + "gap": { + "baseline": "15px", + "horizontal": "min(30px, 5vw)", + "vertical": "min(30px, 5vw)" + }, + "heading": { + "typography": { + "fontWeight": 400, + "lineHeight": 1.125 + } + } + }, + "spacing": { + "units": [ + "%", + "px", + "em", + "rem", + "vh", + "vw" + ] + }, + "typography": { + "fontFamilies": [ + { + "fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", + "slug": "body-font", + "name": "Body (System Font)" + }, + { + "fontFamily": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif", + "slug": "heading-font", + "name": "Headings (System Font)" + } + ], + "fontSizes": [ + { + "name": "Small", + "size": "16px", + "slug": "small" + }, + { + "name": "Medium", + "size": "24px", + "slug": "medium" + }, + { + "name": "Large", + "size": "28px", + "slug": "large" + }, + { + "name": "Extra Large", + "size": "32px", + "slug": "x-large" + } + ] + }, + "layout": { + "contentSize": "620px", + "wideSize": "1000px" + } + }, + "styles": { + "blocks": { + "core/button": { + "border": { + "radius": "var(--wp--custom--button--border--radius)" + }, + "color": { + "background": "var(--wp--custom--button--color--background)", + "text": "var(--wp--custom--button--color--text)" + }, + "typography": { + "fontFamily": "var(--wp--preset--font-family--body-font)", + "fontSize": "var(--wp--custom--button--typography--font-size)", + "fontWeight": "var(--wp--custom--button--typography--font-weight)", + "lineHeight": "var(--wp--custom--button--typography--line-height)" + } + }, + "core/code": { + "border": { + "color": "#CCCCCC", + "radius": "0px", + "style": "solid", + "width": "2px" + }, + "spacing": { + "padding": { + "left": "var(--wp--custom--gap--horizontal)", + "right": "var(--wp--custom--gap--horizontal)", + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + }, + "typography": { + "fontFamily": "monospace" + } + }, + "core/gallery": { + "spacing": { + "margin": { + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "core/list": { + "spacing": { + "padding": { + "left": "calc( 2 * var(--wp--custom--gap--horizontal) )" + } + } + }, + "core/navigation": { + "typography": { + "fontSize": "var(--wp--custom--font-sizes--normal)" + } + }, + "core/post-title": { + "spacing": { + "margin": { + "bottom": "0" + } + }, + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontSize": "var(--wp--preset--font-size--large)", + "lineHeight": "1.125" + } + }, + "core/post-date": { + "color": { + "link": "var(--wp--preset--color--foreground)", + "text": "var(--wp--preset--color--foreground)" + }, + "typography": { + "fontSize": "var(--wp--preset--font-size--small)" + } + }, + "core/pullquote": { + "border": { + "style": "solid", + "width": "1px 0" + }, + "typography": { + "fontStyle": "italic", + "fontSize": "var(--wp--preset--font-size--large)" + }, + "spacing": { + "padding": { + "left": "var(--wp--custom--gap--horizontal)", + "right": "var(--wp--custom--gap--horizontal)", + "top": "var(--wp--custom--gap--horizontal)", + "bottom": "var(--wp--custom--gap--horizontal)" + } + } + }, + "core/search": { + "typography": { + "fontSize": "var(--wp--custom--button--typography--font-size)", + "lineHeight": "1.6" + } + }, + "core/separator": { + "color": { + "text": "var(--wp--preset--color--foreground)" + }, + "border": { + "color": "currentColor", + "style": "solid", + "width": "0 0 1px 0" + } + }, + "core/quote": { + "border": { + "color": "var(--wp--preset--color--primary)", + "style": "solid", + "width": "0 0 0 1px" + }, + "spacing": { + "padding": { + "left": "var(--wp--custom--gap--horizontal)" + } + }, + "typography": { + "fontSize": "var(--wp--custom--font-sizes--normal)", + "fontStyle": "normal" + } + }, + "core/site-tagline": { + "typography": { + "fontSize": "var(--wp--custom--font-sizes--x-small)" + } + }, + "core/site-title": { + "typography": { + "fontSize": "var(--wp--custom--font-sizes--normal)", + "fontWeight": "700", + "textDecoration": "none" + } + } + }, + "color": { + "background": "var(--wp--preset--color--background)", + "text": "var(--wp--preset--color--foreground)" + }, + "elements": { + "h1": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "48px" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "h2": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "var(--wp--preset--font-size--x-large)" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "h3": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "var(--wp--preset--font-size--large)" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "h4": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "var(--wp--preset--font-size--medium)" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "h5": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "var(--wp--custom--font-sizes--normal)" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "h6": { + "typography": { + "fontFamily": "var(--wp--preset--font-family--heading-font)", + "fontWeight": "var(--wp--custom--heading--typography--font-weight)", + "lineHeight": "var(--wp--custom--heading--typography--line-height)", + "fontSize": "var(--wp--preset--font-size--small)" + }, + "spacing": { + "margin": { + "top": "var(--wp--custom--gap--vertical)", + "bottom": "var(--wp--custom--gap--vertical)" + } + } + }, + "link": { + "color": { + "text": "var(--wp--preset--color--primary)" + } + } + }, + "spacing": { + "blockGap": "calc(2 * var(--wp--custom--gap--baseline))" + }, + "typography": { + "lineHeight": "1.6", + "fontFamily": "var(--wp--preset--font-family--body-font)", + "fontSize": "var(--wp--custom--font-sizes--normal)" + } + } +}