-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1 - create an empty theme using new-empty-theme.php from theme…
…-experiments
- Loading branch information
1 parent
e49f899
commit 8622696
Showing
8 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
* Alignments, loaded in the front-end only. | ||
*/ | ||
|
||
body { | ||
margin: 0; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
.wp-site-blocks, | ||
.wp-block-template-part.alignfull { | ||
padding: 0 var(--wp--custom--margin--horizontal); | ||
} | ||
|
||
.wp-site-blocks > *:not(.wp-block-post-content), | ||
.wp-site-blocks .wp-block-post-content > * { | ||
max-width: var(--wp--custom--width--default); | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.wp-site-blocks .alignwide { | ||
width: var(--wp--custom--width--wide); | ||
max-width: 100%; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.wp-site-blocks .alignfull { | ||
transform: translateX(calc(0px - var(--wp--custom--margin--horizontal))); | ||
width: calc(100% + (2 * var(--wp--custom--margin--horizontal))); | ||
max-width: calc(100% + (2 * var(--wp--custom--margin--horizontal))); | ||
margin-left: 0; | ||
margin-right: 0; | ||
box-sizing: content-box; | ||
} | ||
|
||
.wp-site-blocks .wp-block-template-part.alignfull { | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
.wp-site-blocks .wp-block-columns.alignfull { | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
.aligncenter { | ||
text-align: center; | ||
} | ||
|
||
.wp-site-blocks .alignleft { | ||
float: left; | ||
margin-right: 2em; | ||
max-width: 360px; | ||
} | ||
|
||
.wp-site-blocks .alignright { | ||
float: right; | ||
margin-left: 2em; | ||
max-width: 360px; | ||
} | ||
|
||
@media screen and (min-width: 1290px) { | ||
|
||
.wp-site-blocks, | ||
.wp-block-template-part.alignfull { | ||
padding: 0; | ||
} | ||
|
||
.wp-site-blocks .alignfull { | ||
transform: translateX(0px); | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<!-- wp:site-title /--> | ||
|
||
<!-- wp:site-tagline /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<!-- wp:template-part {"slug":"header","theme":"sb","tagName":"header"} /--> | ||
|
||
<!-- wp:query {"queryId":1,"query":{"offset":0,"postType":"post","categoryIds":[],"tagIds":[],"order":"desc","orderBy":"date","author":"","search":"","sticky":""}} --> | ||
<!-- wp:query-loop --> | ||
<!-- wp:post-title {"isLink":true} /--> | ||
|
||
<!-- wp:post-excerpt /--> | ||
<!-- /wp:query-loop --> | ||
<!-- /wp:query --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!-- wp:template-part {"slug":"header","theme":"sb","tagName":"header"} /--> | ||
|
||
<!-- wp:post-title /--> | ||
|
||
<!-- wp:post-content /--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"settings": { | ||
"defaults": { | ||
"color": { | ||
"gradients": [ ], | ||
"link": true, | ||
"palette": [ ] | ||
}, | ||
"spacing": { | ||
"customPadding": true | ||
}, | ||
"typography": { | ||
"customLineHeight": true, | ||
"fontFamilies": [ ], | ||
"fontSizes": [ ] | ||
}, | ||
"custom": { | ||
"width": { | ||
"default": "840px", | ||
"wide": "1100px" | ||
}, | ||
"margin": { | ||
"horizontal": "14px" | ||
} | ||
} | ||
} | ||
}, | ||
"styles": { | ||
"root": { | ||
"color": { }, | ||
"typography": { } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
if ( ! function_exists( 'sb_support' ) ) : | ||
function sb_support() { | ||
|
||
// Adding support for featured images. | ||
add_theme_support( 'post-thumbnails' ); | ||
|
||
// Adding support for alignwide and alignfull classes in the block editor. | ||
add_theme_support( 'align-wide' ); | ||
|
||
// Adding support for core block visual styles. | ||
add_theme_support( 'wp-block-styles' ); | ||
|
||
// Adding support for responsive embedded content. | ||
add_theme_support( 'responsive-embeds' ); | ||
|
||
// Add support for editor styles. | ||
add_theme_support( 'editor-styles' ); | ||
|
||
// Enqueue editor styles. | ||
add_editor_style( 'style.css' ); | ||
|
||
// Add support for custom units. | ||
add_theme_support( 'custom-units' ); | ||
} | ||
add_action( 'after_setup_theme', 'sb_support' ); | ||
endif; | ||
|
||
/** | ||
* Enqueue scripts and styles. | ||
*/ | ||
function sb_scripts() { | ||
|
||
// Enqueue theme stylesheet. | ||
wp_enqueue_style( 'sb-style', get_template_directory_uri() . '/style.css', array(), wp_get_theme()->get( 'Version' ) ); | ||
|
||
// Enqueue alignments stylesheet. | ||
wp_enqueue_style( 'sb-alignments-style', get_template_directory_uri() . '/assets/alignments-front.css', array(), wp_get_theme()->get( 'Version' ) ); | ||
} | ||
add_action( 'wp_enqueue_scripts', 'sb_scripts' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
Theme Name: SB | ||
Theme URI: https://seriouslybonkers.com | ||
Author: Herb Miller | ||
Description: Seriously Bonker's experimental Full Site Editing theme | ||
Requires at least: 5.3 | ||
Tested up to: 5.5 | ||
Requires PHP: 5.6 | ||
Version: 1.0 | ||
License: GNU General Public License v2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
Text Domain: sb | ||
SB WordPress Theme, (C) 2021 WordPress.org | ||
SB is distributed under the terms of the GNU GPL. | ||
*/ |