├── .editorconfig ├── .gitattributes ├── .gitignore ├── assets ├── css │ └── blocks │ │ ├── core-avatar.css │ │ ├── core-calendar.css │ │ ├── core-code.css │ │ ├── core-column.css │ │ ├── core-comments-pagination-numbers.css │ │ ├── core-file.css │ │ ├── core-gallery.css │ │ ├── core-latest-comments.css │ │ ├── core-list.css │ │ ├── core-media-text.css │ │ ├── core-navigation.css │ │ ├── core-paragraph.css │ │ ├── core-post-comments-form.css │ │ ├── core-post-content.css │ │ ├── core-post-template.css │ │ ├── core-pullquote.css │ │ ├── core-query-pagination-numbers.css │ │ ├── core-query-pagination.css │ │ ├── core-rss.css │ │ ├── core-social-links.css │ │ ├── core-table-of-contents.css │ │ ├── core-table.css │ │ └── core-term-description.css ├── fonts │ ├── figtree │ │ ├── figtree-italic.woff2 │ │ └── figtree.woff2 │ └── jost │ │ ├── jost-italic.woff2 │ │ └── jost.woff2 ├── img │ └── .gitkeep └── js │ └── .gitkeep ├── changelog.md ├── functions.php ├── license.md ├── parts ├── comments.html ├── footer.html └── header.html ├── patterns ├── post-grid-cover.php ├── post-list-cover.php └── post-list-default.php ├── readme.md ├── screenshot.png ├── src ├── Assets.php ├── BlockPatterns.php ├── BlockStyleVariations.php ├── BlockTemplateParts.php └── functions-helpers.php ├── style.css ├── styles └── .gitkeep ├── templates ├── 404.html ├── archive.html ├── author.html ├── index.html ├── search.html ├── single.html ├── singular.html └── template-canvas.html └── theme.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | indent_style = tab 8 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Handle line endings. 2 | # See https://help.github.com/articles/dealing-with-line-endings/ 3 | 4 | * text auto 5 | *.gif binary 6 | *.ico binary 7 | *.jpg binary 8 | *.png binary 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /vendor 3 | /phpcs.xml 4 | /.phpcs.xml 5 | *.map 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /assets/css/blocks/core-avatar.css: -------------------------------------------------------------------------------- 1 | /* Remove extra whitespace from inline block element so this aligns correctly. */ 2 | .wp-block-avatar__image { 3 | display: block; 4 | } 5 | 6 | /* Setting `border.radius` via `theme.json` applies it to the wrapper. */ 7 | .wp-block-avatar > *, 8 | .wp-block-avatar__image, 9 | .wp-block-avatar__link { 10 | border-radius: inherit; 11 | } 12 | -------------------------------------------------------------------------------- /assets/css/blocks/core-calendar.css: -------------------------------------------------------------------------------- 1 | /* Removes WP's default background color on the header. */ 2 | :where(.wp-block-calendar table:not(.has-background) th) { 3 | background: unset; 4 | } 5 | 6 | /* Overwrites WP's default border-color on cells. */ 7 | .wp-block-calendar table:where( :not( .has-text-color ) ) :is( td, th ) { 8 | border-color: var( --wp--preset--color--neutral-300 ); 9 | } 10 | 11 | /* More spacing than WP's default for cells. */ 12 | .wp-block-calendar :is( td, th ) { 13 | padding: var( --wp--preset--spacing--30 ) var( --wp--preset--spacing--10 ); 14 | } 15 | 16 | :where( .wp-block-calendar caption ) { 17 | margin: 0 var( --wp--preset--spacing--40 ) var( --wp--preset--spacing--20 ); 18 | } 19 | 20 | .wp-calendar-nav { 21 | display: flex; 22 | justify-content: space-between; 23 | margin: var( --wp--preset--spacing--10 ) var( --wp--preset--spacing--40 ) 0; 24 | } 25 | 26 | 27 | .wp-block-calendar th { 28 | font-weight: 600; 29 | } 30 | -------------------------------------------------------------------------------- /assets/css/blocks/core-code.css: -------------------------------------------------------------------------------- 1 | /* Fixes for WP's wrapping and overflow on the code block. */ 2 | .wp-block-code code { 3 | overflow: auto; 4 | word-wrap: normal; 5 | white-space: revert; 6 | } 7 | -------------------------------------------------------------------------------- /assets/css/blocks/core-column.css: -------------------------------------------------------------------------------- 1 | .wp-block-column { 2 | container-type: inline-size; 3 | } 4 | -------------------------------------------------------------------------------- /assets/css/blocks/core-comments-pagination-numbers.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Adds some baseline layout to pagination numbers. Core has almost no design 3 | * tools available for this block. 4 | */ 5 | .wp-block-comments-pagination-numbers { 6 | display: flex; 7 | gap: var( --wp--preset--spacing--20 ); 8 | } 9 | -------------------------------------------------------------------------------- /assets/css/blocks/core-file.css: -------------------------------------------------------------------------------- 1 | /* The editor has an extra wrapper that doesn't exist in the front-end. */ 2 | .wp-block-file, 3 | .wp-block-file__content-wrapper { 4 | /* Fix box-sizing. */ 5 | box-sizing: border-box; 6 | 7 | /* Flex for nicer display. */ 8 | display: flex; 9 | justify-content: space-between; 10 | align-items: center; 11 | } 12 | 13 | /* Overwrite WP's hard-coded font-size so that it inherits from its parent. */ 14 | .wp-block-file:not( .wp-element-button ) { 15 | font-size: inherit; 16 | } 17 | -------------------------------------------------------------------------------- /assets/css/blocks/core-gallery.css: -------------------------------------------------------------------------------- 1 | /* Fix for WP adding left/right padding to gallery images in constrained layouts. */ 2 | .wp-block-gallery.alignfull .wp-block-image { 3 | padding-left: 0; 4 | padding-right: 0; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /assets/css/blocks/core-latest-comments.css: -------------------------------------------------------------------------------- 1 | /* Reverts WP's default comment date font-size. */ 2 | .wp-block-latest-comments__comment-date { 3 | font-size: inherit; 4 | } 5 | 6 | /* Adjusts WP's comment excerpt font-size and spacing. */ 7 | .wp-block-latest-comments__comment-excerpt p { 8 | font-size: inherit; 9 | margin: var( --wp--preset--spacing--10 ) 0 0; 10 | } 11 | -------------------------------------------------------------------------------- /assets/css/blocks/core-list.css: -------------------------------------------------------------------------------- 1 | /* Lighten the marker color. */ 2 | :where( :not( .has-text-color ) ) li::marker { 3 | color: var( --wp--preset--color--neutral-400 ); 4 | } 5 | -------------------------------------------------------------------------------- /assets/css/blocks/core-media-text.css: -------------------------------------------------------------------------------- 1 | .wp-block-media-text__content { 2 | container-type: inline-size; 3 | } 4 | -------------------------------------------------------------------------------- /assets/css/blocks/core-navigation.css: -------------------------------------------------------------------------------- 1 | /* Zeroes out WP's inherited gap between items in the mobile menu. */ 2 | .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container { 3 | gap: 0; 4 | } 5 | 6 | /* Zeroes out WP's default padding for submenus in the mobile menu. */ 7 | .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container { 8 | padding-top: 0; 9 | } 10 | -------------------------------------------------------------------------------- /assets/css/blocks/core-paragraph.css: -------------------------------------------------------------------------------- 1 | /* Override WP's drop-cap implementation with modern solution. */ 2 | @supports ( initial-letter: 3 ) or ( -webkit-initial-letter: 3 ) { 3 | .has-drop-cap:not(:focus)::first-letter { 4 | -webkit-initial-letter: 3; 5 | initial-letter: 3; 6 | float: none; 7 | margin: 0; 8 | padding-right: var( --wp--preset--spacing--20 ); 9 | font-family: inherit; 10 | font-size: inherit; 11 | font-weight: 700; 12 | line-height: inherit; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /assets/css/blocks/core-post-comments-form.css: -------------------------------------------------------------------------------- 1 | /* Fix for WP not applying block spacing inside of the form. */ 2 | .wp-block-post-comments-form > *, 3 | .wp-block-post-comments-form form > * { 4 | margin-block-start: 0; 5 | margin-block-end: 0; 6 | } 7 | 8 | .wp-block-post-comments-form > * + *, 9 | .wp-block-post-comments-form form > * + *, 10 | .wp-block-post-comments-form .comment-reply-title + * { 11 | margin-block-start: var( --wp--preset--spacing--40 ); 12 | } 13 | 14 | /* Overwrites WP's default padding with a theme spacing size. */ 15 | .wp-block-post-comments-form input:not([type=submit]):not([type=checkbox]), 16 | .wp-block-post-comments-form textarea { 17 | padding: var( --wp--preset--spacing--20 ); 18 | } 19 | 20 | /* Fixes misaligned checkbox and label when label wraps to two lines. */ 21 | .wp-block-post-comments-form .comment-form-cookies-consent { 22 | align-items: baseline; 23 | } 24 | -------------------------------------------------------------------------------- /assets/css/blocks/core-post-content.css: -------------------------------------------------------------------------------- 1 | /* Add fluid spacing to list padding. */ 2 | :where( .wp-block-post-content :where( ul, ol ) ) { 3 | padding-inline-start: var( --wp--preset--spacing--120 ); 4 | } 5 | 6 | /* Loosen the spacing between elements in a list. */ 7 | :where( .wp-block-post-content :where( li + li, li > ul, li > ol ) ) { 8 | margin-block-start: var( --wp--preset--spacing--20 ); 9 | } 10 | 11 | /* Give the text and marker some breathing room. */ 12 | :where( .wp-block-post-content :where( ul, ol ):not( [class*=wp-block-] ) li ) { 13 | padding-left: 0.25em; 14 | } 15 | -------------------------------------------------------------------------------- /assets/css/blocks/core-post-template.css: -------------------------------------------------------------------------------- 1 | /* Zero out potential spacing on list items. */ 2 | :where( .wp-block-post-template > .wp-block-post ) { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | /** 8 | * Adds a "no gap" block style to the Post Template block. This is necessary 9 | * until the block supports the `blockGap` design tool. 10 | * 11 | * @link https://github.com/WordPress/gutenberg/pull/49050 12 | */ 13 | .wp-block-post-template.is-layout-flow.is-style-no-gap > * + * { 14 | margin-block-start: 0; 15 | } 16 | 17 | .wp-block-post-template.is-flex-container.is-style-no-gap { 18 | gap: 0; 19 | } 20 | 21 | @media ( min-width: 600px ) { 22 | .wp-block-post-template.is-flex-container.is-style-no-gap.columns-2 > .wp-block-post { 23 | width: calc( 100% / 2 ); 24 | } 25 | .wp-block-post-template.is-flex-container.is-style-no-gap.columns-3 > .wp-block-post { 26 | width: calc( 100% / 3 ); 27 | } 28 | .wp-block-post-template.is-flex-container.is-style-no-gap.columns-4 > .wp-block-post { 29 | width: calc( 100% / 4 ); 30 | } 31 | .wp-block-post-template.is-flex-container.is-style-no-gap.columns-5 > .wp-block-post { 32 | width: calc( 100% / 5 ); 33 | } 34 | .wp-block-post-template.is-flex-container.is-style-no-gap.columns-6 > .wp-block-post { 35 | width: calc( 100% / 6 ); 36 | } 37 | } 38 | 39 | /* Set a query container for flex query loops. */ 40 | .wp-block-post-template.is-flex-container > .wp-block-post { 41 | container-type: inline-size; 42 | } 43 | 44 | /* Utility class for filling out the container with unequal columns per row. */ 45 | .wp-block-post-template.is-style-flex-grow > .wp-block-post { 46 | flex-grow: 1; 47 | min-width: 18rem; 48 | } 49 | 50 | @media ( min-width: 64rem ) { 51 | .wp-block-post-template.is-style-flex-grow.columns-4 > .wp-block-post { 52 | min-width: 16rem; 53 | } 54 | .wp-block-post-template.is-style-flex-grow.columns-5 > .wp-block-post { 55 | min-width: 14rem; 56 | } 57 | .wp-block-post-template.is-style-flex-grow.columns-6 > .wp-block-post { 58 | min-width: 12rem; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /assets/css/blocks/core-pullquote.css: -------------------------------------------------------------------------------- 1 | /* Zero out default browser spacing. */ 2 | .wp-block-pullquote blockquote { 3 | margin: 0; 4 | padding: 0; 5 | } 6 | 7 | /* Add default padding when the block has a background. */ 8 | .wp-block-pullquote.has-background { 9 | padding: var( --wp--style--block-gap ); 10 | } 11 | 12 | /* Cite doesn't have a standalone block-level wrapper. */ 13 | .wp-block-pullquote cite { 14 | display: block; 15 | } 16 | 17 | /* Fix for WP not applying block spacing inside of pullquotes. */ 18 | .wp-block-pullquote blockquote > * { 19 | margin-block-start: 0; 20 | margin-block-end: 0; 21 | } 22 | 23 | .wp-block-pullquote blockquote > * + * { 24 | margin-block-start: var( --wp--style--block-gap ); 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /assets/css/blocks/core-query-pagination-numbers.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Adds some baseline layout to pagination numbers. Core has almost no design 3 | * tools available for this block. 4 | */ 5 | .wp-block-query-pagination-numbers { 6 | display: flex; 7 | gap: var( --wp--preset--spacing--20 ); 8 | } 9 | -------------------------------------------------------------------------------- /assets/css/blocks/core-query-pagination.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Fixes WP's hard coded margin for this in the editor, which breaks the block 3 | * gap for any containing block. 4 | */ 5 | .editor-styles-wrapper .is-layout-constrained > * + .wp-block-query-pagination.block-editor-block-list__layout { 6 | margin-block-start: var( --wp--style--block-gap ); 7 | } 8 | 9 | /* Remove WP's hard-coded bottom and right margin on sub-blocks. */ 10 | .wp-block-query-pagination > [class*=wp-block-query-pagination-] { 11 | margin: 0; 12 | } 13 | 14 | /* No dimensions or inner blocks layout width support for the block yet. */ 15 | .has-global-padding > .alignfull > .wp-block-query-pagination { 16 | box-sizing: content-box; 17 | padding-right: var(--wp--style--root--padding-right); 18 | padding-left: var(--wp--style--root--padding-left); 19 | } 20 | -------------------------------------------------------------------------------- /assets/css/blocks/core-rss.css: -------------------------------------------------------------------------------- 1 | /* Adds missing spacing between feed items when they have excerpts. */ 2 | .wp-block-rss.has-excerpts .wp-block-rss__item + .wp-block-rss__item { 3 | margin-block-start: var( --wp--style--block-gap ); 4 | } 5 | 6 | /* Reverts WP's default author and publish date font-size. */ 7 | .wp-block-rss__item-author, 8 | .wp-block-rss__item-publish-date { 9 | font-size: inherit; 10 | } 11 | -------------------------------------------------------------------------------- /assets/css/blocks/core-social-links.css: -------------------------------------------------------------------------------- 1 | /* Padding adjustments. */ 2 | .wp-block-social-links .wp-social-link .wp-block-social-link-anchor { 3 | padding: var( --wp--preset--spacing--20 ); 4 | } 5 | 6 | .wp-block-social-links.is-style-pill-shape .wp-social-link .wp-block-social-link-anchor { 7 | padding: var( --wp--preset--spacing--20 ) var( --wp--preset--spacing--40 ); 8 | } 9 | 10 | /* Font-size fixes to match the theme. */ 11 | .wp-block-social-links.has-small-icon-size { 12 | font-size: var( --wp--preset--font-size--lg ); 13 | } 14 | 15 | .wp-block-social-links.has-normal-icon-size { 16 | font-size: var( --wp--preset--font-size--xl ); 17 | } 18 | 19 | .wp-block-social-links.has-large-icon-size { 20 | font-size: var( --wp--preset--font-size--2-xl ); 21 | } 22 | 23 | .wp-block-social-links.has-huge-icon-size { 24 | font-size: var( --wp--preset--font-size--3-xl ); 25 | } 26 | 27 | .wp-block-social-links.has-small-icon-size .wp-block-social-link-label:not( .screen-reader-text ) { 28 | font-size: var( --wp--preset--font-size--sm ); 29 | } 30 | 31 | .wp-block-social-links.has-normal-icon-size .wp-block-social-link-label:not( .screen-reader-text ) { 32 | font-size: var( --wp--preset--font-size--md ); 33 | } 34 | 35 | .wp-block-social-links:is( .has-large-icon-size, .has-huge-icon-size ) .wp-block-social-link-label:not( .screen-reader-text ) { 36 | font-size: var( --wp--preset--font-size--xs ); 37 | font-weight: 500; 38 | letter-spacing: 0.0625em; 39 | text-transform: uppercase; 40 | } 41 | -------------------------------------------------------------------------------- /assets/css/blocks/core-table-of-contents.css: -------------------------------------------------------------------------------- 1 | /* List spacing. */ 2 | .wp-block-table-of-contents > ol { 3 | margin-block-start: 0; 4 | margin-block-end: 0; 5 | } 6 | 7 | /* Tighten spacing between list elements. */ 8 | .wp-block-table-of-contents ol :where( li + li, li > ol ) { 9 | margin-block-start: revert; 10 | } 11 | -------------------------------------------------------------------------------- /assets/css/blocks/core-table.css: -------------------------------------------------------------------------------- 1 | /* Make WP's default borders smaller. */ 2 | .wp-block-table :is( thead, tfoot ) { 3 | border-width: 2px; 4 | } 5 | 6 | /* Fixes inconsistent default `thead` and `tfoot` alignment. */ 7 | .wp-block-table thead tr { 8 | text-align: left; 9 | } 10 | 11 | /* Less prominent bold for headers. */ 12 | .wp-block-table :where( th, tfoot ) { 13 | font-weight: 600; 14 | } 15 | 16 | /** 17 | * `theme.json` border support for tables is horribly broken, so we're just 18 | * inheriting everything here. 19 | */ 20 | .wp-block-table :is( thead, tfoot, tr th, tr td ) { 21 | border-color: inherit; 22 | } 23 | 24 | /* Styling via `theme.json` appends to the table instead of the wrapper. */ 25 | .wp-block-table.is-style-stripes { 26 | border: none; 27 | } 28 | 29 | .wp-block-table.is-style-stripes tbody tr:nth-child( odd ) { 30 | background-color: var( --wp--preset--color--neutral-100 ); 31 | } 32 | -------------------------------------------------------------------------------- /assets/css/blocks/core-term-description.css: -------------------------------------------------------------------------------- 1 | /* Fix for WP not applying block spacing for nested elements. */ 2 | .wp-block-term-description > * { 3 | margin-block-start: 0; 4 | margin-block-end: 0; 5 | } 6 | 7 | .wp-block-term-description > * + * { 8 | margin-block-start: var( --wp--style--block-gap ); 9 | } 10 | -------------------------------------------------------------------------------- /assets/fonts/figtree/figtree-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/fonts/figtree/figtree-italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/figtree/figtree.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/fonts/figtree/figtree.woff2 -------------------------------------------------------------------------------- /assets/fonts/jost/jost-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/fonts/jost/jost-italic.woff2 -------------------------------------------------------------------------------- /assets/fonts/jost/jost.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/fonts/jost/jost.woff2 -------------------------------------------------------------------------------- /assets/img/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/img/.gitkeep -------------------------------------------------------------------------------- /assets/js/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/assets/js/.gitkeep -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## [1.0.0] - 2023-05-01 4 | 5 | ### Added 6 | 7 | * Literally everything. This is version 1.0, after all. 8 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2023, Your Name 8 | * @link https://yourwebsite.tld 9 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 | */ 11 | 12 | namespace FirstDraft; 13 | 14 | // Load class files. 15 | require_once get_parent_theme_file_path( 'src/Assets.php' ); 16 | require_once get_parent_theme_file_path( 'src/BlockStyleVariations.php' ); 17 | require_once get_parent_theme_file_path( 'src/BlockPatterns.php' ); 18 | require_once get_parent_theme_file_path( 'src/BlockTemplateParts.php' ); 19 | 20 | // Load functions files. 21 | require_once get_parent_theme_file_path( 'src/functions-helpers.php' ); 22 | 23 | // Bootstrap the theme. 24 | theme(); 25 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /parts/comments.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 |
24 | 25 |
26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 |
36 | 37 | 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 |
54 | 55 | -------------------------------------------------------------------------------- /parts/footer.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 |

Powered by WordPress, crazy ideas, and passion.

19 | 20 |
21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /parts/header.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 6 | 7 |
8 | 9 |
10 | 11 | -------------------------------------------------------------------------------- /patterns/post-grid-cover.php: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 | 32 | 33 |
34 | 35 |
36 | 37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 |
45 | 46 | 47 | 48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 | -------------------------------------------------------------------------------- /patterns/post-list-cover.php: -------------------------------------------------------------------------------- 1 | 12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 45 | 46 | 47 | 48 | 49 |
50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 |
59 | 60 | -------------------------------------------------------------------------------- /patterns/post-list-default.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 | 41 | 42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |
52 | 53 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # First Draft 2 | 3 | _**The first draft of your next block theme for WordPress.**_ 4 | 5 | First Draft is meant to be a starting point for building block themes and an educational tool. Its audience is a mixed bag, ranging from people are just now dipping their toes into theme creation to those who are highly-knowledgeable developers. Decisions about its architecture tries to account for this full spectrum while following best practices. 6 | 7 | One of the primary goals of the project is to be a showcase of WordPress' modern theming features. This includes everything from patterns, to block style variations, to block-based templates. 8 | 9 | The theme attempts to be reasonably bare-bones in terms of style, leaving the bells and whistles up to you. At the same time, it is also highly opinionated on certain matters, such as naming schemes. 10 | 11 | First Draft was built to be forked so that you can do things your own way. 12 | 13 | ## FAQs 14 | 15 | ### Why no build process? 16 | 17 | The theme aims to very much be "plug-n-play" for anyone at any skill level. Additional technical hurdles can be the difference between someone learning theme design for the first time or giving up before they even get to the fun part of it. Besides, if you are advanced enough to set up build tools, it should be easy to insert your preferred system into your fork of First Draft. 18 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/screenshot.png -------------------------------------------------------------------------------- /src/Assets.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2023, Your Name 8 | * @link https://yourwebsite.tld 9 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 | */ 11 | 12 | namespace FirstDraft; 13 | 14 | class Assets 15 | { 16 | /** 17 | * Boots the component, running its actions/filters. 18 | * 19 | * @since 1.0.0 20 | */ 21 | public function boot(): void 22 | { 23 | // Editor styles. 24 | add_action( 'after_setup_theme', [ $this, 'addEditorStyles' ] ); 25 | 26 | // Front-end only. 27 | add_action( 'wp_enqueue_scripts', [ $this, 'enqueueAssets'] ); 28 | 29 | // Enqueue block-specific styles. 30 | add_action( 'init', [ $this, 'enqueueBlockStyles' ] ); 31 | } 32 | 33 | /** 34 | * Add editor stylesheets. 35 | * 36 | * @since 1.0.0 37 | * @link https://developer.wordpress.org/reference/functions/add_editor_style/ 38 | */ 39 | public function addEditorStyles(): void 40 | { 41 | add_editor_style( [ 42 | get_parent_theme_file_uri( 'style.css' ) 43 | ] ); 44 | } 45 | 46 | /** 47 | * Enqueue scripts/styles for the front end. 48 | * 49 | * @since 1.0.0 50 | */ 51 | public function enqueueAssets(): void 52 | { 53 | // Loads the primary `style.css` file. 54 | wp_enqueue_style( 55 | 'first-draft-style', 56 | get_parent_theme_file_uri( 'style.css' ), 57 | null, 58 | filemtime( get_parent_theme_file_path( 'style.css' ) ) 59 | ); 60 | } 61 | 62 | /** 63 | * Enqueues block-specific styles so that they only load when the block 64 | * is in use. Block styles are stored under `/assets/css/blocks` are 65 | * automatically enqueued. Each file should be named 66 | * `{$block_namespace}-{$block_slug}.css`. 67 | * 68 | * @since 1.0.0 69 | * @link https://developer.wordpress.org/reference/functions/wp_enqueue_block_style/ 70 | */ 71 | public function enqueueBlockStyles(): void 72 | { 73 | // Gets all the block stylesheets. 74 | $files = glob( get_parent_theme_file_path( 'assets/css/blocks/*.css' ) ); 75 | 76 | foreach ( $files as $file ) { 77 | 78 | // Gets the filename without the path or extension. 79 | $name = str_replace( [ 80 | get_parent_theme_file_path( 'assets/css/blocks/' ), 81 | '.css' 82 | ], '', $file ); 83 | 84 | // Sanitize the name to make sure it contains only 85 | // characters allowed in a block type name. 86 | $name = preg_replace( '/[^a-z0-9-]/', '', strtolower( $name ) ); 87 | 88 | // Get the position of the first hyphen. 89 | $pos = strpos( $name, '-' ); 90 | 91 | // Bail if there is no hyphen. 92 | if ( false === $pos ) { 93 | continue; 94 | } 95 | 96 | // Converts the filename to its associated block name by 97 | // replacing the first `-` with a `/`. Filenames must 98 | // use `{namespace}-{slug}` for this to work. 99 | $block = substr_replace( $name, '/', $pos, 1 ); 100 | 101 | // Register the block style. 102 | wp_enqueue_block_style( $block, [ 103 | 'handle' => "first-draft-block-{$name}", 104 | 'src' => get_parent_theme_file_uri( "assets/css/blocks/{$name}.css" ), 105 | 'path' => get_parent_theme_file_path( "assets/css/blocks/{$name}.css" ), 106 | 'ver' => filemtime( get_parent_theme_file_path( "assets/css/blocks/{$name}.css" ) ) 107 | ] ); 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/BlockPatterns.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright Copyright (c) 2023, Your Name 9 | * @link https://yourwebsite.tld 10 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 | */ 12 | 13 | namespace FirstDraft; 14 | 15 | class BlockPatterns 16 | { 17 | /** 18 | * Boots the component, running its actions/filters. 19 | * 20 | * @since 1.0.0 21 | */ 22 | public function boot(): void 23 | { 24 | // Patterns theme support. 25 | add_action( 'after_setup_theme', [ $this, 'themeSupport' ] ); 26 | 27 | // Register patterns/categories. 28 | add_action( 'init', [ $this, 'register' ] ); 29 | } 30 | 31 | /** 32 | * Removes theme support for core patterns. 33 | * 34 | * @since 1.0.0 35 | */ 36 | public function themeSupport(): void 37 | { 38 | remove_theme_support( 'core-block-patterns' ); 39 | } 40 | 41 | /** 42 | * Register block pattern categories. Note that this theme registers 43 | * patterns by adding them as individual pattern files in the `/patterns` 44 | * folder. 45 | * 46 | * @since 1.0.0 47 | * @link https://developer.wordpress.org/reference/functions/register_block_pattern_category/ 48 | */ 49 | public function register(): void 50 | { 51 | // Registers a base `theme` category. 52 | register_block_pattern_category( 'theme', [ 53 | 'label' => __( 'Theme', 'first-draft' ), 54 | 'description' => __( 'Patterns registered by the theme.', 'first-draft' ) 55 | ] ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/BlockStyleVariations.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2023, Your Name 8 | * @link https://yourwebsite.tld 9 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 | */ 11 | 12 | namespace FirstDraft; 13 | 14 | class BlockStyleVariations 15 | { 16 | /** 17 | * Boots the component, running its actions/filters. 18 | * 19 | * @since 1.0.0 20 | */ 21 | public function boot(): void 22 | { 23 | add_action( 'init', [ $this, 'register'] ); 24 | } 25 | 26 | /** 27 | * Register block styles. 28 | * 29 | * @since 1.0.0 30 | * @link https://developer.wordpress.org/reference/functions/register_block_style/ 31 | */ 32 | public function register(): void 33 | { 34 | // Adds a "no gap" style for the Post Template block. 35 | // CSS in the `/assets/css/blocks/core-post-template.css`. 36 | // This can be removed when the block supports `blockGap`. 37 | // @link https://github.com/WordPress/gutenberg/pull/49050 38 | register_block_style( 'core/post-template', [ 39 | 'name' => 'no-gap', 40 | 'label' => __( 'No Gap', 'first-draft' ) 41 | ] ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/BlockTemplateParts.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright Copyright (c) 2023, Your Name 8 | * @link https://yourwebsite.tld 9 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 | */ 11 | 12 | namespace FirstDraft; 13 | 14 | class BlockTemplateParts 15 | { 16 | /** 17 | * Boots the component, running its actions/filters. 18 | * 19 | * @since 1.0.0 20 | */ 21 | public function boot(): void 22 | { 23 | add_action( 'default_wp_template_part_areas', [ $this, 'filterAreas'] ); 24 | } 25 | 26 | /** 27 | * Filter the core template part areas to add custom areas needed for 28 | * the theme. 29 | * 30 | * @since 1.0.0 31 | * @link https://developer.wordpress.org/reference/hooks/default_wp_template_part_areas/ 32 | */ 33 | public function filterAreas( array $default_area_definitions ): array 34 | { 35 | $default_area_definitions[] = [ 36 | 'area' => 'comments', 37 | 'area_tag' => 'section', 38 | 'label' => __( 'Comments', 'first-draft' ), 39 | 'description' => __( 'The Comments template defines a page area that typically contains the post comments list and form.', 'first-draft' ), 40 | // Core only supports four icons at the moment, so this 41 | // one doesn't actually appear. But the value must be 42 | // defined to avoid an error. 43 | // @link https://github.com/WordPress/gutenberg/issues/36814 44 | 'icon' => 'comments' 45 | ]; 46 | 47 | return $default_area_definitions; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/functions-helpers.php: -------------------------------------------------------------------------------- 1 | 6 | * @copyright Copyright (c) 2023, Your Name 7 | * @link https://yourwebsite.tld 8 | * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 9 | */ 10 | 11 | namespace FirstDraft; 12 | 13 | /** 14 | * Mini container used to reference the various theme components. Bootstraps the 15 | * theme on first call by executing each component's `boot()` method. The 16 | * `theme()` function acts as the single instance of the theme, and devs can 17 | * access any class/component by passing in its reference via the `$component` 18 | * parameter (useful for accessing hooks within classes). 19 | * 20 | * @since 1.0.0 21 | * @return mixed 22 | * @todo Add `mixed` return type declaration with PHP 8-only support. 23 | */ 24 | function theme( string $component = '' ) 25 | { 26 | static $bindings = []; 27 | 28 | // If there are no bound components, register and boot them. 29 | if ( [] === $bindings ) { 30 | 31 | // Bind instances of the theme's component classes that need to 32 | // be booted when the theme launches. 33 | $bindings = [ 34 | 'assets' => new Assets(), 35 | 'block-style-variations' => new BlockStyleVariations(), 36 | 'block-patterns' => new BlockPatterns(), 37 | 'block-template-parts' => new BlockTemplateParts() 38 | ]; 39 | 40 | // Boot each of the components. 41 | foreach ( $bindings as $binding ) { 42 | $binding->boot(); 43 | } 44 | } 45 | 46 | return '' === $component ? $bindings : $bindings[ $component ]; 47 | } 48 | -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Theme Name: First Draft 3 | * Theme URI: https://github.com/justintadlock/first-draft 4 | * Description: The first draft of your next WordPress theme. 5 | * Version: 1.0.0 6 | * Author: Your Name 7 | * Author URI: https://yourwebsite.tld 8 | * Tags: block-patterns, block-styles, editor-style, full-site-editing, wide-blocks 9 | * Text Domain: first-draft 10 | * Domain Path: /assets/lang 11 | * Tested up to: 6.3 12 | * Requires at least: 6.2 13 | * Requires PHP: 7.4 14 | * License: GNU General Public License v2.0 or later 15 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html 16 | */ 17 | 18 | /* Defaults. */ 19 | * { 20 | /* Enables features from the registered fonts. */ 21 | font-feature-settings: "tnum", "ss01" 1; 22 | font-variant-numeric: slashed-zero; 23 | 24 | } 25 | 26 | a:where( :not( :focus ) ), 27 | input:focus, 28 | textarea:focus, 29 | .wp-element-button { 30 | transition: all 0.5s ease-in-out; 31 | } 32 | 33 | :where( a:not( .wp-element-button ):focus ) { 34 | outline: 1px solid currentColor; 35 | outline-offset: 0.0625em; 36 | } 37 | 38 | a, 39 | .wp-element-button { 40 | text-underline-offset: 0.0625em; 41 | } 42 | 43 | :where( :not( pre ) > code ) { 44 | padding: 0.125em 0.25em; 45 | font-size: 0.8125em; 46 | font-weight: 600; 47 | background: var( --wp--preset--color--neutral-100 ); 48 | } 49 | 50 | kbd { 51 | padding: 0.125em 0.25em; 52 | font-size: 0.8125em; 53 | background: var( --wp--preset--color--neutral-100 ); 54 | border: 1px solid var( --wp--preset--color--neutral-300 ); 55 | border-radius: 0.25rem; 56 | } 57 | 58 | mark { 59 | padding: 0.25em; 60 | } 61 | 62 | s { 63 | color: var( --wp--preset--color--neutral-400 ); 64 | text-decoration-color: var( --wp--preset--color--primary-700 ); 65 | } 66 | 67 | sup, 68 | sub { 69 | font-size: 0.8125em; 70 | } 71 | 72 | audio, 73 | video { 74 | display: block; 75 | } 76 | 77 | /** 78 | * Combine each line-height set via `settings.custom.lineHeight` in `theme.json` 79 | * with the corresponding font-size set via `setting.typography.fontSizes`. 80 | */ 81 | .has-5-xl-font-size { line-height: var( --wp--custom--line-height--5-xl ); } 82 | .has-4-xl-font-size { line-height: var( --wp--custom--line-height--4-xl ); } 83 | .has-3-xl-font-size { line-height: var( --wp--custom--line-height--3-xl ); } 84 | .has-2-xl-font-size { line-height: var( --wp--custom--line-height--2-xl ); } 85 | .has-xl-font-size { line-height: var( --wp--custom--line-height--xl ); } 86 | .has-lg-font-size { line-height: var( --wp--custom--line-height--lg ); } 87 | .has-md-font-size { line-height: var( --wp--custom--line-height--md ); } 88 | .has-sm-font-size { line-height: var( --wp--custom--line-height--sm ); } 89 | .has-xs-font-size { line-height: var( --wp--custom--line-height--xs ); } 90 | 91 | /* Loosens the spacing above headings tightens the spacing below. */ 92 | .wp-block-post-content :is( h1, h2, h3, h4, h5, h6 ) { 93 | margin-block-end: 0; 94 | } 95 | 96 | .wp-block-post-content * + :is( h1, h2, h3, h4, h5, h6 ) { 97 | margin-block-start: var( --wp--preset--spacing--120 ); 98 | } 99 | 100 | .wp-block-post-content :is( h1, h2, h3, h4, h5, h6 ) + * { 101 | margin-block-start: var( --wp--preset--spacing--40 ); 102 | } 103 | 104 | .wp-block-post-content :where( hr, .wp-block-spacer ) + :is( h1, h2, h3, h4, h5, h6 ), 105 | .wp-block-post-content :is( h1, h2, h3, h4, h5, h6 ) + :where( hr, .wp-block-spacer ) { 106 | margin-block-start: var( --wp--style--block-gap ); 107 | } 108 | 109 | /* Center captions (WP doesn't support text-align in `theme.json`). */ 110 | .wp-element-caption { 111 | text-align: center; 112 | } 113 | 114 | /* Prefix `cite` elements (WP doesn't support element CSS in `theme.json`). */ 115 | cite::before { 116 | content: "\2013\00a0" 117 | } 118 | 119 | /* Adds form element styles, which aren't yet supported in `theme.json`. */ 120 | input, 121 | select, 122 | textarea, 123 | :where( .wp-block-search__button-inside .wp-block-search__inside-wrapper ), 124 | .wp-block-search__input, 125 | .wp-block-post-comments-form :is( input:not( .wp-element-button ), textarea ) { 126 | font-family: inherit; 127 | font-size: inherit; 128 | font-style: normal; 129 | font-weight: 400; 130 | line-height: inherit; 131 | color: inherit; 132 | background: transparent; 133 | border: 1px solid var( --wp--preset--color--neutral-300 ); 134 | } 135 | 136 | input[type="checkbox"], 137 | input[type="radio"], 138 | .wp-block-search__button-inside .wp-block-search__input { 139 | border: none; 140 | } 141 | -------------------------------------------------------------------------------- /styles/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justintadlock/first-draft/a84a592b049e03f69518823c18cb56997bfbba40/styles/.gitkeep -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |

404: Nothing Found

16 | 17 |
18 | 19 | 20 | 21 |
22 | 23 |

It looks like you stumbled upon a page that does not exist. Perhaps rolling the dice with a search might help:

24 | 25 |
26 | 27 | 28 |
29 | 30 | 31 |
32 | 33 | 34 | 35 | 36 |
37 | 38 | -------------------------------------------------------------------------------- /templates/archive.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /templates/author.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 |
24 | 25 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 |
10 | 11 | 12 | 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /templates/search.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 |
13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /templates/single.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 |
29 | 30 |

Topics:

31 | 32 |
33 | 34 |
35 | 36 | 37 |
38 | 39 | 40 | 41 |
42 | 43 |
44 | 45 | 46 |
47 | 48 | 49 | 50 | 51 |
52 | 53 | -------------------------------------------------------------------------------- /templates/singular.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 |
11 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 |
29 | 30 | -------------------------------------------------------------------------------- /templates/template-canvas.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 |
8 | 9 |
10 | 11 | 12 | 13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /theme.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schemas.wp.org/trunk/theme.json", 3 | "version": 2, 4 | "settings": { 5 | "border": { 6 | "color": true, 7 | "radius": true, 8 | "style": true, 9 | "width": true 10 | }, 11 | "color": { 12 | "custom": true, 13 | "defaultDuotone": false, 14 | "defaultGradients": false, 15 | "defaultPalette": false, 16 | "link": true, 17 | "duotone": [ 18 | { 19 | "name": "Grayscale", 20 | "slug": "grayscale", 21 | "colors": [ "#000000", "#ffffff" ] 22 | }, 23 | { 24 | "name": "Dark Grayscale", 25 | "slug": "dark-grayscale", 26 | "colors": [ "#000000", "#7f7f7f" ] 27 | }, 28 | { 29 | "name": "Primary", 30 | "slug": "primary", 31 | "colors": [ "#0c4a6e", "#e0f2fe" ] 32 | }, 33 | { 34 | "name": "Primary and White", 35 | "slug": "primary-white", 36 | "colors": [ "#0c4a6e", "#ffffff" ] 37 | } 38 | ], 39 | "gradients": [ 40 | { 41 | "gradient": "linear-gradient( 0deg, var( --wp--preset--color--primary-500 ) 0%, var( --wp--preset--color--primary-700 ) 100% )", 42 | "name": "Linear: 0 degrees (Primary)", 43 | "slug": "0-deg-primary" 44 | }, 45 | { 46 | "gradient": "linear-gradient( 90deg, var( --wp--preset--color--primary-500 ) 0%, var( --wp--preset--color--primary-700 ) 100% )", 47 | "name": "Linear: 90 degrees (Primary)", 48 | "slug": "90-deg-primary" 49 | }, 50 | { 51 | "gradient": "linear-gradient( 180deg, var( --wp--preset--color--primary-500 ) 0%, var( --wp--preset--color--primary-700 ) 100% )", 52 | "name": "Linear: 180 degrees (Primary)", 53 | "slug": "180-deg-primary" 54 | }, 55 | { 56 | "gradient": "linear-gradient( 270deg, var( --wp--preset--color--primary-500 ) 0%, var( --wp--preset--color--primary-700 ) 100% )", 57 | "name": "Linear: 270 degrees (Primary)", 58 | "slug": "270-deg-primary" 59 | }, 60 | { 61 | "gradient": "linear-gradient( 360deg, var( --wp--preset--color--primary-500 ) 0%, var( --wp--preset--color--primary-700 ) 100% )", 62 | "name": "Linear: 360 degrees (Primary)", 63 | "slug": "360-deg-primary" 64 | }, 65 | { 66 | "gradient": "radial-gradient( var( --wp--preset--color--primary-500 ), var( --wp--preset--color--primary-700 ) )", 67 | "name": "Radial (Primary)", 68 | "slug": "radial-primary" 69 | } 70 | ], 71 | "palette": [ 72 | { 73 | "slug": "black", 74 | "color": "#000000", 75 | "name": "Black" 76 | }, 77 | { 78 | "slug": "white", 79 | "color": "#ffffff", 80 | "name": "White" 81 | }, 82 | { 83 | "slug": "neutral-900", 84 | "color": "#0f172a", 85 | "name": "Neutral: 900" 86 | }, 87 | { 88 | "slug": "neutral-800", 89 | "color": "#1e293b", 90 | "name": "Neutral: 800" 91 | }, 92 | { 93 | "slug": "neutral-700", 94 | "color": "#334155", 95 | "name": "Neutral: 700" 96 | }, 97 | { 98 | "slug": "neutral-600", 99 | "color": "#475569", 100 | "name": "Neutral: 600" 101 | }, 102 | { 103 | "slug": "neutral-500", 104 | "color": "#64748b", 105 | "name": "Neutral: 500" 106 | }, 107 | { 108 | "slug": "neutral-400", 109 | "color": "#94a3b8", 110 | "name": "Neutral: 400" 111 | }, 112 | { 113 | "slug": "neutral-300", 114 | "color": "#cbd5e1", 115 | "name": "Neutral: 300" 116 | }, 117 | { 118 | "slug": "neutral-200", 119 | "color": "#e2e8f0", 120 | "name": "Neutral: 200" 121 | }, 122 | { 123 | "slug": "neutral-100", 124 | "color": "#f1f5f9", 125 | "name": "Neutral: 100" 126 | }, 127 | { 128 | "slug": "primary-900", 129 | "color": "#0c4a6e", 130 | "name": "Primary: 900" 131 | }, 132 | { 133 | "slug": "primary-800", 134 | "color": "#075985", 135 | "name": "Primary: 800" 136 | }, 137 | { 138 | "slug": "primary-700", 139 | "color": "#0369a1", 140 | "name": "Primary: 700" 141 | }, 142 | { 143 | "slug": "primary-600", 144 | "color": "#0284c7", 145 | "name": "Primary: 600" 146 | }, 147 | { 148 | "slug": "primary-500", 149 | "color": "#0ea5e9", 150 | "name": "Primary: 500" 151 | }, 152 | { 153 | "slug": "primary-400", 154 | "color": "#38bdf8", 155 | "name": "Primary: 400" 156 | }, 157 | { 158 | "slug": "primary-300", 159 | "color": "#7dd3fc", 160 | "name": "Primary: 300" 161 | }, 162 | { 163 | "slug": "primary-200", 164 | "color": "#bae6fd", 165 | "name": "Primary: 200" 166 | }, 167 | { 168 | "slug": "primary-100", 169 | "color": "#e0f2fe", 170 | "name": "Primary: 100" 171 | } 172 | ] 173 | }, 174 | "custom": { 175 | "lineHeight": { 176 | "xs": "1.5", 177 | "sm": "1.625", 178 | "md": "1.5", 179 | "lg": "1.75", 180 | "xl": "1.75", 181 | "2-xl": "1.5", 182 | "3-xl": "clamp( 2rem, 2.5cqi + 1.15rem, 2.25rem )", 183 | "4-xl": "clamp( 2.125rem, 4.0625cqi + 0.74375rem, 2.53125rem )", 184 | "5-xl": "clamp( 2.25rem, 5.55556cqi + 0.36111rem, 3.25rem )" 185 | } 186 | }, 187 | "layout": { 188 | "contentSize": "40rem", 189 | "wideSize": "64rem" 190 | }, 191 | "shadow": { 192 | "presets": [ 193 | { 194 | "name": "Small", 195 | "slug": "sm", 196 | "shadow": "0 1px 3px 0 rgba( 0, 0, 0, 0.3 )" 197 | }, 198 | { 199 | "name": "Medium", 200 | "slug": "md", 201 | "shadow": "0 2px 5px 0 rgba( 0, 0, 0, 0.3 )" 202 | }, 203 | { 204 | "name": "Large", 205 | "slug": "lg", 206 | "shadow": "0 4px 10px 0 rgba( 0, 0, 0, 0.3 )" 207 | }, 208 | { 209 | "name": "XL", 210 | "slug": "xl", 211 | "shadow": "0 8px 15px 0 rgba( 0, 0, 0, 0.3 )" 212 | }, 213 | { 214 | "name": "2XL", 215 | "slug": "2-xl", 216 | "shadow": "0 12px 20px 0 rgba( 0, 0, 0, 0.3 )" 217 | }, 218 | { 219 | "name": "Inner", 220 | "slug": "inner", 221 | "shadow": "inset 0 2px 4px 0 rgba( 0, 0, 0, 0.06 )" 222 | } 223 | ] 224 | }, 225 | "spacing": { 226 | "blockGap": true, 227 | "customSpacingSize": true, 228 | "margin": true, 229 | "padding": true, 230 | "spacingSizes": [ 231 | { 232 | "name": "Pixel - Fixed (1px)", 233 | "size": "1px", 234 | "slug": "px" 235 | }, 236 | { 237 | "name": "Step 1 - Fixed (0.25rem)", 238 | "size": "0.25rem", 239 | "slug": "10" 240 | }, 241 | { 242 | "name": "Step 2 - Fixed (0.5rem)", 243 | "size": "0.5rem", 244 | "slug": "20" 245 | }, 246 | { 247 | "name": "Step 3 - Fixed (0.75rem)", 248 | "size": "0.75rem", 249 | "slug": "30" 250 | }, 251 | { 252 | "name": "Step 4 - Fixed (1rem)", 253 | "size": "1rem", 254 | "slug": "40" 255 | }, 256 | { 257 | "name": "Step 5 - Fixed (1.25rem)", 258 | "size": "1.25rem", 259 | "slug": "50" 260 | }, 261 | { 262 | "name": "Step 6 - Fixed (1.5rem)", 263 | "size": "1.5rem", 264 | "slug": "60" 265 | }, 266 | { 267 | "name": "Step 7 - Fixed (1.75rem)", 268 | "size": "1.75rem", 269 | "slug": "70" 270 | }, 271 | { 272 | "name": "Step 8 - Fixed (2rem)", 273 | "size": "2rem", 274 | "slug": "80" 275 | }, 276 | { 277 | "name": "Step 9 - Fluid (2.25rem)", 278 | "size": "clamp(2rem, calc(2rem + ((1vw - 0.4rem) * 1.0417)), 2.25rem)", 279 | "slug": "90" 280 | }, 281 | { 282 | "name": "Step 10 - Fluid (2.5rem)", 283 | "size": "clamp(2rem, calc(2rem + ((1vw - 0.4rem) * 2.0833)), 2.5rem)", 284 | "slug": "100" 285 | }, 286 | { 287 | "name": "Step 12 - Fluid (3rem)", 288 | "size": "clamp(2rem, calc(2rem + ((1vw - 0.4rem) * 4.1667)), 3rem)", 289 | "slug": "120" 290 | }, 291 | { 292 | "name": "Step 16 - Fluid (4rem)", 293 | "size": "clamp(2rem, calc(2rem + ((1vw - 0.4rem) * 8.3333)), 4rem)", 294 | "slug": "160" 295 | }, 296 | { 297 | "name": "Step 24 - Fluid (6rem)", 298 | "size": "clamp(4rem, calc(4rem + ((1vw - 0.4rem) * 8.3333)), 6rem)", 299 | "slug": "240" 300 | }, 301 | { 302 | "name": "Step 32 - Fluid (8rem)", 303 | "size": "clamp(4rem, calc(4rem + ((1vw - 0.4rem) * 16.6667)), 8rem)", 304 | "slug": "320" 305 | } 306 | ], 307 | "units": [ "rem", "em", "%", "vh", "vw", "px" ] 308 | }, 309 | "typography": { 310 | "customFontSize": false, 311 | "dropCap": true, 312 | "fontFamilies": [ 313 | { 314 | "fontFamily": "Jost, ui-sans-serif, sans-serif", 315 | "slug": "primary", 316 | "name": "Primary (Jost)", 317 | "fontFace": [ 318 | { 319 | "fontFamily": "Jost", 320 | "fontWeight": "100 900", 321 | "fontStyle": "normal", 322 | "fontStretch": "normal", 323 | "src": [ "file:./assets/fonts/jost/jost.woff2" ] 324 | }, 325 | { 326 | "fontFamily": "Jost", 327 | "fontWeight": "100 900", 328 | "fontStyle": "italic", 329 | "fontStretch": "normal", 330 | "src": [ "file:./assets/fonts/jost/jost-italic.woff2" ] 331 | } 332 | ] 333 | }, 334 | { 335 | "fontFamily": "Figtree, ui-sans-serif, sans-serif", 336 | "slug": "secondary", 337 | "name": "Secondary (Figtree)", 338 | "fontFace": [ 339 | { 340 | "fontFamily": "Figtree", 341 | "fontWeight": "300 900", 342 | "fontStyle": "normal", 343 | "fontStretch": "normal", 344 | "src": [ "file:./assets/fonts/figtree/figtree.woff2" ] 345 | }, 346 | { 347 | "fontFamily": "Figtree", 348 | "fontWeight": "300 900", 349 | "fontStyle": "italic", 350 | "fontStretch": "normal", 351 | "src": [ "file:./assets/fonts/figtree/figtree-italic.woff2" ] 352 | } 353 | ] 354 | }, 355 | { 356 | "fontFamily": "\"Source Code Pro\", Monaco, Consolas, \"Andale Mono WT\", \"Andale Mono\", \"Lucida Console\", \"Lucida Sans Typewriter\", \"DejaVu Sans Mono\", \"Bitstream Vera Sans Mono\", \"Liberation Mono\", \"Nimbus Mono L\", \"Courier New\", Courier, monospace", 357 | "slug": "mono", 358 | "name": "Monospace" 359 | } 360 | ], 361 | "fontSizes": [ 362 | { 363 | "name": "Extra Small - Fixed", 364 | "size": "0.875rem", 365 | "slug": "xs" 366 | }, 367 | { 368 | "name": "Small - Fixed", 369 | "size": "0.9375rem", 370 | "slug": "sm" 371 | }, 372 | { 373 | "name": "Medium - Fixed", 374 | "size": "1rem", 375 | "slug": "md" 376 | }, 377 | { 378 | "name": "Large - Fluid", 379 | "size": "clamp( 1.0625rem, 0.625cqi + 0.85rem, 1.125rem )", 380 | "slug": "lg" 381 | }, 382 | { 383 | "name": "Extra Large - Fluid", 384 | "size": "clamp( 1.125rem, 1.25cqi + 0.7rem, 1.25rem )", 385 | "slug": "xl" 386 | }, 387 | { 388 | "name": "2XL - Fluid", 389 | "size": "clamp( 1.25rem, 2.5cqi + 0.4rem, 1.5rem )", 390 | "slug": "2-xl" 391 | }, 392 | { 393 | "name": "3XL - Fluid", 394 | "size": "clamp( 1.5rem, 3.75cqi + 0.225rem, 1.875rem )", 395 | "slug": "3-xl" 396 | }, 397 | { 398 | "name": "4XL - Fluid", 399 | "size": "clamp( 1.75rem, 5cqi + 0.05rem, 2.25rem )", 400 | "slug": "4-xl" 401 | }, 402 | { 403 | "name": "5XL - Fluid", 404 | "size": "clamp( 2rem, 5.55556cqi + 0.11111rem, 3rem )", 405 | "slug": "5-xl" 406 | } 407 | ], 408 | "fontStyle": true, 409 | "fontWeight": true, 410 | "letterSpacing": true, 411 | "lineHeight": false, 412 | "textDecoration": true, 413 | "textTransform": true 414 | }, 415 | "useRootPaddingAwareAlignments": true 416 | }, 417 | "styles": { 418 | "color": { 419 | "text": "var( --wp--preset--color--neutral-900 )", 420 | "background": "var( --wp--preset--color--white )" 421 | }, 422 | "spacing": { 423 | "blockGap": "2rem", 424 | "padding": { 425 | "top": "0", 426 | "bottom": "0", 427 | "left": "2rem", 428 | "right": "2rem" 429 | } 430 | }, 431 | "typography": { 432 | "fontFamily": "var( --wp--preset--font-family--secondary )", 433 | "fontSize": "var( --wp--preset--font-size--xl )", 434 | "lineHeight": "var( --wp--custom--line-height--xl )" 435 | }, 436 | "elements": { 437 | "button": { 438 | "border": { 439 | "radius": "0" 440 | }, 441 | "color": { 442 | "text": "var( --wp--preset--color--white )", 443 | "background": "var( --wp--preset--color--primary-600 )" 444 | }, 445 | "spacing": { 446 | "padding": { 447 | "top": "var( --wp--preset--spacing--20 )", 448 | "bottom": "var( --wp--preset--spacing--20 )", 449 | "left": "var( --wp--preset--spacing--60 )", 450 | "right": "var( --wp--preset--spacing--60 )" 451 | } 452 | }, 453 | "typography": { 454 | "fontSize": "var( --wp--preset--font-size--lg )", 455 | "fontWeight": "500", 456 | "lineHeight": "var( --wp--custom--line-height--lg )" 457 | }, 458 | ":focus": { 459 | "color": { 460 | "background": "var( --wp--preset--color--primary-800 )" 461 | }, 462 | "typography": { 463 | "textDecoration": "underline" 464 | } 465 | }, 466 | ":hover": { 467 | "color": { 468 | "background": "var( --wp--preset--color--primary-800 )" 469 | }, 470 | "typography": { 471 | "textDecoration": "underline" 472 | } 473 | } 474 | }, 475 | "caption": { 476 | "color": { 477 | "text": "var( --wp--preset--color--neutral-700 )" 478 | }, 479 | "spacing": { 480 | "margin": { 481 | "top": "var( --wp--preset--spacing--20 )", 482 | "bottom": "0", 483 | "left": "var( --wp--preset--spacing--40 )", 484 | "right": "var( --wp--preset--spacing--40 )" 485 | } 486 | }, 487 | "typography": { 488 | "fontSize": "var( --wp--preset--font-size--lg )", 489 | "lineHeight": "var( --wp--custom--line-height--lg )" 490 | } 491 | }, 492 | "cite": { 493 | "color": { 494 | "text": "var( --wp--preset--color--neutral-700 )" 495 | }, 496 | "typography": { 497 | "fontSize": "0.875em", 498 | "fontStyle": "normal", 499 | "fontWeight": "300" 500 | } 501 | }, 502 | "heading": { 503 | "typography": { 504 | "fontFamily": "var( --wp--preset--font-family--primary )", 505 | "fontWeight": "700" 506 | } 507 | }, 508 | "h1": { 509 | "typography": { 510 | "fontSize": "var( --wp--preset--font-size--5-xl )", 511 | "lineHeight": "var( --wp--custom--line-height--5-xl )" 512 | } 513 | }, 514 | "h2": { 515 | "typography": { 516 | "fontSize": "var( --wp--preset--font-size--4-xl )", 517 | "lineHeight": "var( --wp--custom--line-height--4-xl )" 518 | } 519 | }, 520 | "h3": { 521 | "typography": { 522 | "fontSize": "var( --wp--preset--font-size--3-xl )", 523 | "lineHeight": "var( --wp--custom--line-height--3-xl )" 524 | } 525 | }, 526 | "h4": { 527 | "typography": { 528 | "fontSize": "var( --wp--preset--font-size--2-xl )", 529 | "lineHeight": "var( --wp--custom--line-height--2-xl )" 530 | } 531 | }, 532 | "h5": { 533 | "typography": { 534 | "fontSize": "var( --wp--preset--font-size--xl )", 535 | "lineHeight": "var( --wp--custom--line-height--xl )" 536 | } 537 | }, 538 | "h6": { 539 | "typography": { 540 | "fontSize": "var( --wp--preset--font-size--lg )", 541 | "lineHeight": "var( --wp--custom--line-height--lg )" 542 | } 543 | }, 544 | "link": { 545 | "color": { 546 | "text": "var( --wp--preset--color--primary-700 )" 547 | }, 548 | "typography": { 549 | "textDecoration": "underline" 550 | }, 551 | ":focus": { 552 | "typography": { 553 | "textDecoration": "underline" 554 | } 555 | }, 556 | ":hover": { 557 | "color": { 558 | "text": "inherit" 559 | }, 560 | "typography": { 561 | "textDecoration": "underline" 562 | } 563 | } 564 | } 565 | }, 566 | "blocks": { 567 | "core/avatar": { 568 | "border": { 569 | "radius": "9999em" 570 | } 571 | }, 572 | "core/button": { 573 | "shadow": "var( --wp--preset--shadow--sm )", 574 | "variations": { 575 | "outline": { 576 | "spacing": { 577 | "padding": { 578 | "top": { "ref": "styles.elements.button.spacing.padding.top" }, 579 | "bottom": { "ref": "styles.elements.button.spacing.padding.bottom" }, 580 | "left": { "ref": "styles.elements.button.spacing.padding.left" }, 581 | "right": { "ref": "styles.elements.button.spacing.padding.right" } 582 | } 583 | } 584 | } 585 | } 586 | }, 587 | "core/calendar": { 588 | "typography": { 589 | "fontSize": "var( --wp--preset--font-size--lg )", 590 | "lineHeight": "var( --wp--custom--line-height--lg )" 591 | } 592 | }, 593 | "core/code": { 594 | "border": { 595 | "color": "var( --wp--preset--color--neutral-300 )", 596 | "style": "solid", 597 | "width": "1px" 598 | }, 599 | "spacing": { 600 | "padding": { 601 | "top": "var( --wp--preset--spacing--80 )", 602 | "bottom": "var( --wp--preset--spacing--80 )", 603 | "left": "var( --wp--preset--spacing--80 )", 604 | "right": "var( --wp--preset--spacing--80 )" 605 | } 606 | }, 607 | "typography": { 608 | "fontFamily": "var( --wp--preset--font-family--mono )", 609 | "fontSize": "var( --wp--preset--font-size--md )", 610 | "lineHeight": "var( --wp--preset--line-height--md )" 611 | } 612 | }, 613 | "core/cover": { 614 | "color": { 615 | "text": "var( --wp--preset--color--white )" 616 | }, 617 | "elements": { 618 | "link": { 619 | ":any-link": { 620 | "color": { 621 | "text": "inherit" 622 | } 623 | } 624 | } 625 | } 626 | }, 627 | "core/details": { 628 | "border": { 629 | "color": "var( --wp--preset--color--neutral-300 )", 630 | "style": "solid", 631 | "width": "1px" 632 | }, 633 | "spacing": { 634 | "padding": { 635 | "top": "var( --wp--preset--spacing--40 )", 636 | "bottom": "var( --wp--preset--spacing--40 )", 637 | "left": "var( --wp--preset--spacing--40 )", 638 | "right": "var( --wp--preset--spacing--40 )" 639 | } 640 | } 641 | }, 642 | "core/file": { 643 | "border": { 644 | "color": "var( --wp--preset--color--neutral-300 )", 645 | "style": "solid", 646 | "width": "1px" 647 | }, 648 | "spacing": { 649 | "padding": { 650 | "top": "var( --wp--preset--spacing--80 )", 651 | "bottom": "var( --wp--preset--spacing--80 )", 652 | "left": "var( --wp--preset--spacing--80 )", 653 | "right": "var( --wp--preset--spacing--80 )" 654 | } 655 | } 656 | }, 657 | "core/gallery": { 658 | "css": "--wp--style--gallery-gap-default: var( --wp--preset--spacing--40 );" 659 | }, 660 | "core/image": { 661 | "css": "& img {\n\tbox-shadow: var( --wp--preset--shadow--md );\n}" 662 | }, 663 | "core/latest-comments": { 664 | "spacing": { 665 | "padding": { 666 | "left": "0", 667 | "right": "0" 668 | } 669 | } 670 | }, 671 | "core/post-featured-image": { 672 | "css": "& img {\n\tbox-shadow: var( --wp--preset--shadow--md );\n}" 673 | }, 674 | "core/navigation": { 675 | "spacing": { 676 | "blockGap": "var( --wp--preset--spacing--60 )" 677 | }, 678 | "typography": { 679 | "fontSize": "var( --wp--preset--font-size--lg )", 680 | "lineHeight": "var( --wp--custom--line-height--lg )" 681 | }, 682 | "elements": { 683 | "link": { 684 | "typography": { 685 | "textDecoration": "none" 686 | }, 687 | ":focus": { 688 | "typography": { 689 | "textDecoration": "underline" 690 | } 691 | }, 692 | ":hover": { 693 | "typography": { 694 | "textDecoration": "underline" 695 | } 696 | } 697 | } 698 | } 699 | }, 700 | "core/pullquote": { 701 | "border": { 702 | "top": { 703 | "color": "var( --wp--preset--color--neutral-300 )", 704 | "style": "solid", 705 | "width": "var( --wp--preset--spacing--10 )" 706 | }, 707 | "bottom": { 708 | "color": "var( --wp--preset--color--neutral-300 )", 709 | "style": "solid", 710 | "width": "var( --wp--preset--spacing--10 )" 711 | } 712 | }, 713 | "spacing": { 714 | "padding": { 715 | "top": "var( --wp--preset--spacing--80 )", 716 | "bottom": "var( --wp--preset--spacing--80 )" 717 | } 718 | }, 719 | "typography": { 720 | "fontSize": "var( --wp--preset--font-size--2-xl )", 721 | "lineHeight": "var( --wp--custom--line-height--2-xl )" 722 | } 723 | }, 724 | "core/preformatted": { 725 | "typography": { 726 | "fontFamily": "var( --wp--preset--font-family--mono )", 727 | "fontSize": "var( --wp--preset--font-size--md )", 728 | "lineHeight": "var( --wp--custom--line-height--md )" 729 | } 730 | }, 731 | "core/query-pagination": { 732 | "spacing": { 733 | "padding": { 734 | "bottom": "var( --wp--style--block-gap )" 735 | } 736 | } 737 | }, 738 | "core/quote": { 739 | "border": { 740 | "left": { 741 | "color": "var( --wp--preset--color--neutral-300 )", 742 | "style": "solid", 743 | "width": "var( --wp--preset--spacing--10 )" 744 | } 745 | }, 746 | "spacing": { 747 | "padding": { 748 | "left": "var( --wp--preset--spacing--40 )" 749 | } 750 | } 751 | }, 752 | "core/post-title": { 753 | "elements": { 754 | "link": { 755 | "color": { 756 | "text": "var( --wp--preset--color--neutral-900 )" 757 | }, 758 | "typography": { 759 | "textDecoration": "none" 760 | } 761 | } 762 | } 763 | }, 764 | "core/separator": { 765 | "border": { 766 | "top": { 767 | "width": "1px" 768 | }, 769 | "bottom": { 770 | "width": "0" 771 | } 772 | }, 773 | "color": { 774 | "text": "var( --wp--preset--color--neutral-300 )" 775 | }, 776 | "variations": { 777 | "wide": { 778 | "border": { 779 | "top": { 780 | "width": "var( --wp--preset--spacing--10 )" 781 | } 782 | } 783 | } 784 | } 785 | }, 786 | "core/site-title": { 787 | "typography": { 788 | "fontSize": "var( --wp--preset--font-size--xl )", 789 | "fontStyle": "normal", 790 | "fontWeight": "700", 791 | "textTransform": "uppercase" 792 | }, 793 | "elements": { 794 | "link": { 795 | "typography": { 796 | "textDecoration": "none" 797 | } 798 | } 799 | } 800 | }, 801 | "core/social-links": { 802 | "spacing": { 803 | "blockGap": "var( --wp--preset--spacing--40 )" 804 | }, 805 | "css": "&:not( .is-style-logos-only ) .wp-block-social-link {\n\tbox-shadow: var( --wp--preset--shadow--sm );\n}" 806 | }, 807 | "core/table": { 808 | "border": { 809 | "color": "var( --wp--preset--color--neutral-300 )" 810 | }, 811 | "typography": { 812 | "fontSize": "var( --wp--preset--font-size--lg )", 813 | "lineHeight": "var( --wp--custom--line-height--lg )" 814 | } 815 | }, 816 | "core/table-of-contents": { 817 | "css": "& ol {\n\tlist-style: disc;\n}" 818 | } 819 | } 820 | }, 821 | "customTemplates": [ 822 | { 823 | "name": "template-canvas", 824 | "title": "Custom: Canvas", 825 | "postTypes": [ "page", "post" ] 826 | } 827 | ], 828 | "templateParts": [ 829 | { 830 | "area": "header", 831 | "name": "header", 832 | "title": "Header" 833 | }, 834 | { 835 | "area": "footer", 836 | "name": "footer", 837 | "title": "Footer" 838 | }, 839 | { 840 | "area": "comments", 841 | "name": "comments", 842 | "title": "Comments" 843 | } 844 | ] 845 | } 846 | --------------------------------------------------------------------------------