From 3274f810fc36709b70b051325c8071c4cb21a10c Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Sun, 23 Jun 2024 11:50:27 -0400 Subject: [PATCH 1/6] add styles for h1 --- scss/core-blocks/heading.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scss/core-blocks/heading.scss b/scss/core-blocks/heading.scss index 4c5a72b4..afb15ea7 100644 --- a/scss/core-blocks/heading.scss +++ b/scss/core-blocks/heading.scss @@ -1,3 +1,4 @@ +h1, h2, h3, h4, @@ -13,6 +14,10 @@ h6 { } } +h1 { + font-size: 28px; +} + h2 { font-size: 22px; } From 881ae7b4f5d625b4d399b55e397f8d48d4d6a780 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 24 Jun 2024 10:31:47 -0400 Subject: [PATCH 2/6] prepend address in footer with text --- blocks/footer/edit.tsx | 1 + blocks/footer/render.php | 1 + blocks/footer/style.scss | 10 ++++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/blocks/footer/edit.tsx b/blocks/footer/edit.tsx index 9e61ff62..bd27a835 100644 --- a/blocks/footer/edit.tsx +++ b/blocks/footer/edit.tsx @@ -120,6 +120,7 @@ export default function Edit() { {address ? (
+ {__('Our mailing address is:', 'wp-newsletter-builder')} {address}
) diff --git a/blocks/footer/render.php b/blocks/footer/render.php index a38d43bd..7ed53546 100644 --- a/blocks/footer/render.php +++ b/blocks/footer/render.php @@ -83,6 +83,7 @@ diff --git a/blocks/footer/style.scss b/blocks/footer/style.scss index 193bc6f9..71e73d37 100644 --- a/blocks/footer/style.scss +++ b/blocks/footer/style.scss @@ -52,8 +52,8 @@ } .youtube-icon { - background-color: #FF0000; - color: #FF0000; + background-color: #F00; + color: #F00; } } @@ -65,6 +65,12 @@ .wp-block-wp-newsletter-builder-footer__address { margin-top: 20px; + + span { + display: block; + font-weight: 700; + text-align: center; + } } .wp-block-wp-newsletter-builder-footer__links { From 3fb3e6b45a5bc0b7712a26d42f01cfc2e724c0f9 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 24 Jun 2024 10:34:40 -0400 Subject: [PATCH 3/6] center header image --- blocks/header/index.scss | 6 +++--- blocks/header/style.scss | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/blocks/header/index.scss b/blocks/header/index.scss index bca7dd9e..5cbe5051 100644 --- a/blocks/header/index.scss +++ b/blocks/header/index.scss @@ -7,6 +7,6 @@ * * Replace them with your own styles or remove the file completely. */ - -// .wp-block-wp-newsletter-builder-header { -// } +.wp-block-wp-newsletter-builder-header { + text-align: center; +} diff --git a/blocks/header/style.scss b/blocks/header/style.scss index 440382d9..f9ecd533 100644 --- a/blocks/header/style.scss +++ b/blocks/header/style.scss @@ -12,7 +12,7 @@ */ .wp-block-wp-newsletter-builder-header { - // @TODO: style alt text. + text-align: center; &__placeholder { align-items: center; From 8e1db5633cc548267f6de0ec090f561145c5d552 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 24 Jun 2024 10:35:34 -0400 Subject: [PATCH 4/6] fix byline styles --- blocks/post-byline/style.scss | 5 ++--- blocks/post/style.scss | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/blocks/post-byline/style.scss b/blocks/post-byline/style.scss index 7c8346f5..118d3d29 100644 --- a/blocks/post-byline/style.scss +++ b/blocks/post-byline/style.scss @@ -12,8 +12,7 @@ */ .post__byline { - font-family: var(--template-font-family); - font-size: 15px; - font-weight: bold; + font-size: 16px; + margin-bottom: 8px; text-align: center; } diff --git a/blocks/post/style.scss b/blocks/post/style.scss index 42bbc7aa..d3149c6c 100644 --- a/blocks/post/style.scss +++ b/blocks/post/style.scss @@ -37,9 +37,8 @@ } .post__byline { - font-family: var(--template-font-family); - font-size: 15px; - font-weight: bold; + font-size: 16px; + margin-bottom: 8px; text-align: center; } From 9cc36f2a7482166b7b6d0f981dc238ed65b6b9f5 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 24 Jun 2024 10:36:21 -0400 Subject: [PATCH 5/6] supply defaults for template styles in the editor --- src/assets.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/assets.php b/src/assets.php index f3a7d2a1..25d1a4a9 100644 --- a/src/assets.php +++ b/src/assets.php @@ -291,10 +291,13 @@ function set_template_values(): void { if ( ( 'post' !== $current_screen->base ) || ( 'nb_newsletter' !== $current_screen->post_type ) ) { return; } - $template_id = get_post_meta( get_the_ID(), 'nb_newsletter_template', true ); - $bg_color = get_post_meta( $template_id, 'nb_template_bg_color', true ); - $font = get_post_meta( $template_id, 'nb_template_font', true ); - $link_color = get_post_meta( $template_id, 'nb_template_link_color', true ); + $template_id = get_post_meta( get_the_ID(), 'nb_newsletter_template', true ); + $bg_color_meta = get_post_meta( $template_id, 'nb_template_bg_color', true ); + $font_meta = get_post_meta( $template_id, 'nb_template_font', true ); + $link_color_meta = get_post_meta( $template_id, 'nb_template_link_color', true ); + $bg_color = ! empty( $bg_color_meta ) ? $bg_color_meta : '#fefefe'; + $font = ! empty( $font_meta ) ? $font_meta : 'Arial, sans-serif'; + $link_color = ! empty( $link_color_meta ) ? $link_color_meta : '#0073aa'; printf( '', $font, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped From 4d3a32cd850d69a642d895f2d6e60f8aba194f93 Mon Sep 17 00:00:00 2001 From: cahdeemer Date: Mon, 24 Jun 2024 11:00:54 -0400 Subject: [PATCH 6/6] version bump --- README.md | 2 +- plugin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c2a658fe..9781189b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Contributors: alleyinteractive Tags: alleyinteractive, wp-newsletter-builder -Stable tag: 0.3.26 +Stable tag: 0.3.27 Requires at least: 6.2 diff --git a/plugin.php b/plugin.php index 99e009c3..acdcf35b 100644 --- a/plugin.php +++ b/plugin.php @@ -3,7 +3,7 @@ * Plugin Name: Newsletter Builder * Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder * Description: Interface to manage email newsletters - * Version: 0.3.26 + * Version: 0.3.27 * Author: Alley Interactive * Author URI: https://github.com/alleyinteractive/wp-newsletter-builder * Requires at least: 6.2