diff --git a/README.md b/README.md index 94849461..2b8b5c87 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Contributors: alleyinteractive Tags: alleyinteractive, wp-newsletter-builder -Stable tag: 0.3.29 +Stable tag: 0.3.30 Requires at least: 6.2 diff --git a/block-filters/latest-posts/index.php b/block-filters/latest-posts/index.php new file mode 100644 index 00000000..60970e2e --- /dev/null +++ b/block-filters/latest-posts/index.php @@ -0,0 +1,36 @@ + * { + margin: 16px; + } + } + + img { + max-width: 250px; + } + + .wp-block-latest-posts__post-title { + color: currentColor; + display: block; + font-weight: bold; + margin-bottom: 8px; + text-decoration: none; + } + + .wp-block-latest-posts__featured-image { + display: table-cell; + + &.aligncenter { + display: block; + margin-bottom: 8px; + margin-left: auto; + margin-right: auto; + max-width: none; + padding-left: 0; + padding-right: 0; + width: 100%; + + img { + max-width: 90%; + width: 100%; + } + } + + &.alignleft { + float: left; + margin-right: 16px; + } + + &.alignright { + float: right; + margin-left: 16px; + } + } + + .wp-block-latest-posts__post-author, + .wp-block-latest-posts__post-date { + display: block; + font-size: 13px; + } + + .wp-block-latest-posts__post-excerpt { + font-size: 14px; + margin-bottom: 8px; + margin-top: 8px; + + > a { + display: none; + } + } + + @media screen and (max-width: 480px) { + li { + display: block; + width: 100%; + } + + img { + max-width: none; + width: 100%; + } + } +} diff --git a/scss/editor/editor.scss b/scss/editor/editor.scss index ded6d622..2012fa5d 100644 --- a/scss/editor/editor.scss +++ b/scss/editor/editor.scss @@ -34,5 +34,6 @@ @import '@/scss/core-blocks/separator'; @import '@/scss/core-blocks/list'; @import '@/scss/core-blocks/typography'; + @import '@/scss/core-blocks/latest-posts'; } } diff --git a/webpack.config.js b/webpack.config.js index 5f280e27..0f33c61a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -27,6 +27,7 @@ module.exports = (env, { mode }) => ({ 'wp-newsletter-builder-button/index': './block-filters/button', 'wp-newsletter-builder-heading/index': './block-filters/heading', 'wp-newsletter-builder-image/index': './block-filters/image', + 'wp-newsletter-builder-latest-posts/index': './block-filters/latest-posts', 'wp-newsletter-builder-list/index': './block-filters/list', 'wp-newsletter-builder-paragraph/index': './block-filters/paragraph', 'wp-newsletter-builder-separator/index': './block-filters/separator',