diff --git a/config/block-editor-settings.php b/config/block-editor-settings.php
new file mode 100644
index 00000000..aa3b582f
--- /dev/null
+++ b/config/block-editor-settings.php
@@ -0,0 +1,56 @@
+ 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700',
+ 'content-width' => 1062,
+ 'default-button-bg' => $genesis_sample_link_color,
+ 'default-button-color' => $genesis_sample_link_color_contrast,
+ 'default-button-outline-hover' => $genesis_sample_link_color_brightness,
+ 'default-link-color' => $genesis_sample_link_color,
+ 'editor-color-palette' => array(
+ array(
+ 'name' => __( 'Custom color', 'genesis-sample' ), // Called “Link Color” in the Customizer options. Renamed because “Link Color” implies it can only be used for links.
+ 'slug' => 'theme-primary',
+ 'color' => get_theme_mod( 'genesis_sample_link_color', genesis_sample_customizer_get_default_link_color() ),
+ ),
+ array(
+ 'name' => __( 'Accent color', 'genesis-sample' ),
+ 'slug' => 'theme-secondary',
+ 'color' => get_theme_mod( 'genesis_sample_accent_color', genesis_sample_customizer_get_default_accent_color() ),
+ ),
+ ),
+ 'editor-font-sizes' => array(
+ array(
+ 'name' => __( 'Small', 'genesis-sample' ),
+ 'size' => 12,
+ 'slug' => 'small',
+ ),
+ array(
+ 'name' => __( 'Normal', 'genesis-sample' ),
+ 'size' => 18,
+ 'slug' => 'normal',
+ ),
+ array(
+ 'name' => __( 'Large', 'genesis-sample' ),
+ 'size' => 20,
+ 'slug' => 'large',
+ ),
+ array(
+ 'name' => __( 'Larger', 'genesis-sample' ),
+ 'size' => 24,
+ 'slug' => 'larger',
+ ),
+ ),
+);
diff --git a/config/editor-color-palette.php b/config/editor-color-palette.php
deleted file mode 100644
index aafef315..00000000
--- a/config/editor-color-palette.php
+++ /dev/null
@@ -1,29 +0,0 @@
- __( 'Light gray', 'genesis-sample' ),
- 'slug' => 'light-gray',
- 'color' => '#f5f5f5',
- ),
- array(
- 'name' => __( 'Medium gray', 'genesis-sample' ),
- 'slug' => 'medium-gray',
- 'color' => '#999',
- ),
- array(
- 'name' => __( 'Dark gray', 'genesis-sample' ),
- 'slug' => 'dark-gray',
- 'color' => '#333',
- ),
-);
diff --git a/config/editor-font-sizes.php b/config/editor-font-sizes.php
deleted file mode 100644
index 367b4f8f..00000000
--- a/config/editor-font-sizes.php
+++ /dev/null
@@ -1,34 +0,0 @@
- __( 'Small', 'genesis-sample' ),
- 'size' => 12,
- 'slug' => 'small',
- ),
- array(
- 'name' => __( 'Normal', 'genesis-sample' ),
- 'size' => 16,
- 'slug' => 'normal',
- ),
- array(
- 'name' => __( 'Large', 'genesis-sample' ),
- 'size' => 20,
- 'slug' => 'large',
- ),
- array(
- 'name' => __( 'Larger', 'genesis-sample' ),
- 'size' => 24,
- 'slug' => 'larger',
- ),
-);
diff --git a/config/import/content/homepage.php b/config/import/content/homepage.php
index d96755a5..c7cf4ecb 100644
--- a/config/import/content/homepage.php
+++ b/config/import/content/homepage.php
@@ -77,27 +77,19 @@
-
diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css
index 6cb04a81..184aed58 100644
--- a/lib/gutenberg/front-end.css
+++ b/lib/gutenberg/front-end.css
@@ -1,22 +1,3 @@
-/* Font Sizes
----------------------------------------------------------------------------- */
-
-.site-container p.has-small-font-size {
- font-size: 12px;
-}
-
-.site-container p.has-regular-font-size {
- font-size: 16px;
-}
-
-.site-container p.has-large-font-size {
- font-size: 20px;
-}
-
-.site-container p.has-larger-font-size {
- font-size: 24px;
-}
-
/* Drop Caps
---------------------------------------------------------------------------- */
@@ -41,33 +22,6 @@ h6.light {
color: #f5f5f5;
}
-/* Color Palette
----------------------------------------------------------------------------- */
-
-.site-container .has-light-gray-background-color {
- background-color: #f5f5f5 !important;
-}
-
-.site-container .has-light-gray-color {
- color: #f5f5f5 !important;
-}
-
-.site-container .has-medium-gray-background-color {
- background-color: #999 !important;
-}
-
-.site-container .has-medium-gray-color {
- color: #999 !important;
-}
-
-.site-container .has-dark-gray-background-color {
- background-color: #333 !important;
-}
-
-.site-container .has-dark-gray-color {
- color: #333 !important;
-}
-
/* Background Color
---------------------------------------------------------------------------- */
@@ -175,13 +129,12 @@ h6.light {
font-weight: 600;
}
-.wp-block-button .wp-block-button__link {
- background-color: #333;
- border: 0;
+.site-container .wp-block-button .wp-block-button__link {
+ border-width: 0;
border-radius: 5px;
- color: #fff;
cursor: pointer;
font-size: 16px;
+ font-family: "Source Sans Pro", sans-serif;
font-weight: 600;
padding: 15px 30px;
text-align: center;
@@ -190,26 +143,24 @@ h6.light {
width: auto;
}
-.wp-block-button.is-style-outline .wp-block-button__link:focus,
-.wp-block-button.is-style-outline .wp-block-button__link:hover,
-.wp-block-button .wp-block-button__link:focus,
-.wp-block-button .wp-block-button__link:hover {
- box-shadow: inset 0 0 200px rgba(230, 230, 230, 0.15);
-}
-
/* Button Variations */
-.wp-block-button.is-style-squared .wp-block-button__link {
+.site-container .wp-block-button.is-style-squared .wp-block-button__link {
border-radius: 0;
}
-.wp-block-button.is-style-outline .wp-block-button__link {
+.site-container .wp-block-button.is-style-outline .wp-block-button__link {
background-color: transparent;
border: 2px solid currentColor;
border-radius: 0;
- color: #333;
padding: 13px 28px;
}
+.site-container .wp-block-button .wp-block-button__link:focus,
+.site-container .wp-block-button .wp-block-button__link:hover,
+.site-container .wp-block-button.is-style-outline .wp-block-button__link:focus,
+.site-container .wp-block-button.is-style-outline .wp-block-button__link:hover {
+ box-shadow: inset 0 0 200px rgba(230, 230, 230, 0.25);
+}
/* Blockquotes and captions
---------------------------------------------------------------------------- */
diff --git a/lib/gutenberg/init.php b/lib/gutenberg/init.php
index 3a33695a..35805068 100644
--- a/lib/gutenberg/init.php
+++ b/lib/gutenberg/init.php
@@ -35,9 +35,11 @@ function genesis_sample_enqueue_gutenberg_frontend_styles() {
*/
function genesis_sample_block_editor_styles() {
+ $block_editor_settings = genesis_get_config( 'block-editor-settings' );
+
wp_enqueue_style(
'genesis-sample-gutenberg-fonts',
- 'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,700',
+ $block_editor_settings['admin-fonts-url'],
array(),
CHILD_THEME_VERSION
);
@@ -95,25 +97,31 @@ function genesis_sample_blocks_body_classes( $classes ) {
// Make media embeds responsive.
add_theme_support( 'responsive-embeds' );
+$genesis_sample_block_editor_settings = genesis_get_config( 'block-editor-settings' );
+
// Adds support for editor font sizes.
add_theme_support(
'editor-font-sizes',
- genesis_get_config( 'editor-font-sizes' )
+ $genesis_sample_block_editor_settings['editor-font-sizes']
);
// Adds support for editor color palette.
add_theme_support(
'editor-color-palette',
- genesis_get_config( 'editor-color-palette' )
+ $genesis_sample_block_editor_settings['editor-color-palette']
);
+require_once get_stylesheet_directory() . '/lib/gutenberg/inline-styles.php';
+
add_action( 'after_setup_theme', 'genesis_sample_content_width', 0 );
/**
* Set content width to match the “wide” Gutenberg block width.
*/
function genesis_sample_content_width() {
+ $block_editor_settings = genesis_get_config( 'block-editor-settings' );
+
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/924
- $GLOBALS['content_width'] = apply_filters( 'genesis_sample_content_width', 1062 );
+ $GLOBALS['content_width'] = apply_filters( 'genesis_sample_content_width', $block_editor_settings['content-width'] );
}
diff --git a/lib/gutenberg/inline-styles.php b/lib/gutenberg/inline-styles.php
new file mode 100644
index 00000000..40c23a12
--- /dev/null
+++ b/lib/gutenberg/inline-styles.php
@@ -0,0 +1,152 @@
+