Skip to content

Commit

Permalink
Merge pull request #156 from alleyinteractive/feature/LEDE-2676/styli…
Browse files Browse the repository at this point in the history
…ng-clean-up

LEDE-2676 Styling clean up & small fixes
  • Loading branch information
cahdeemer authored Jun 24, 2024
2 parents ad5b06e + 4d3a32c commit d72ce47
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions blocks/footer/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export default function Edit() {
{address
? (
<div className="wp-block-wp-newsletter-builder-footer__address">
<span>{__('Our mailing address is:', 'wp-newsletter-builder')}</span>
{address}
</div>
)
Expand Down
1 change: 1 addition & 0 deletions blocks/footer/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@

<?php if ( ! empty( $nb_address ) ) : ?>
<div class="wp-block-wp-newsletter-builder-footer__address">
<span><?php esc_html_e( 'Our mailing address is:', 'wp-newsletter-builder' ); ?></span>
<?php echo esc_html( $nb_address ); ?>
</div>
<?php endif; ?>
Expand Down
10 changes: 8 additions & 2 deletions blocks/footer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
}

.youtube-icon {
background-color: #FF0000;
color: #FF0000;
background-color: #F00;
color: #F00;
}
}

Expand All @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions blocks/header/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion blocks/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

.wp-block-wp-newsletter-builder-header {
// @TODO: style alt text.
text-align: center;

&__placeholder {
align-items: center;
Expand Down
5 changes: 2 additions & 3 deletions blocks/post-byline/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 2 additions & 3 deletions blocks/post/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions scss/core-blocks/heading.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
h1,
h2,
h3,
h4,
Expand All @@ -13,6 +14,10 @@ h6 {
}
}

h1 {
font-size: 28px;
}

h2 {
font-size: 22px;
}
Expand Down
11 changes: 7 additions & 4 deletions src/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
'<style>:root {--template-font-family: %s; --template-bg-color: %s; --template-link-color: %s;}</style>',
$font, // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
Expand Down

0 comments on commit d72ce47

Please sign in to comment.