From d4fe68eaab4f01b101a6763b4ad3efd57a3915c7 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sun, 9 Aug 2020 12:29:06 +0200 Subject: [PATCH 1/4] Removed SO Premium ID --- inc/extras.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/inc/extras.php b/inc/extras.php index deb210e..0e7f29f 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -129,11 +129,3 @@ function polestar_post_class_filter( $classes ) { } endif; add_filter( 'post_class', 'polestar_post_class_filter' ); - -/** - * Add our SiteOrigin Premium affiliate ID. - */ -function polestar_siteorigin_premium( $id ) { - return 1; -} -add_filter( 'siteorigin_premium_affiliate_id', 'polestar_siteorigin_premium' ); From db9ccb0a84e0bcbcecc127832d72c08423826f32 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sun, 6 Sep 2020 14:52:30 +0200 Subject: [PATCH 2/4] Added basic layout Block Editor styles --- sass/site/_layout.scss | 24 ++++++++++++++++ sass/site/primary/_posts-and-pages.scss | 20 +++++++++++++ sass/style.scss | 1 + style.css | 37 ++++++++++++++++++++++--- 4 files changed, 78 insertions(+), 4 deletions(-) diff --git a/sass/site/_layout.scss b/sass/site/_layout.scss index ec0079e..0b1e8a0 100644 --- a/sass/site/_layout.scss +++ b/sass/site/_layout.scss @@ -12,6 +12,7 @@ .site-content { @include clearfix; + overflow: hidden; } // Content area without sidebar. @@ -81,3 +82,26 @@ width: 100%; } } + +// Block Editor Wide and Full widths. +.page-layout-no-sidebar { + + .alignfull { + margin-left: calc(50% - 50vw); + width: 100vw; + } + + @media (min-width: calc(1140px + 200px)) { + + .alignwide { + left: -100px; + position: relative; + width: calc(100% + 20vw); + } + } + + .alignfull .wp-block-group__inner-container { + margin: auto; + max-width: 1140px; + } +} diff --git a/sass/site/primary/_posts-and-pages.scss b/sass/site/primary/_posts-and-pages.scss index 5033bcc..4e22977 100644 --- a/sass/site/primary/_posts-and-pages.scss +++ b/sass/site/primary/_posts-and-pages.scss @@ -371,6 +371,26 @@ } } +/*-------------------------------------------------------------- +## - Block Styles +--------------------------------------------------------------*/ +// Apply 50px bottom margin to top level blocks. +.entry-content > div[class^='wp-block-'] { + margin-bottom: 50px; +} + +.wp-block-group { + + &.has-background { + padding: 30px; + + &.alignfull { + padding-right: 0; + padding-left: 0; + } + } +} + /*-------------------------------------------------------------- ## - Search Form --------------------------------------------------------------*/ diff --git a/sass/style.scss b/sass/style.scss index c2b2769..e1f8ee8 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -56,6 +56,7 @@ or a child theme. ## - Posts and pages ## - Posts ## - Archives, Search Results & 404 + ## - Block Styles ## - Search Form ## - Related Posts ## - Author Box diff --git a/style.css b/style.css index b96d2c0..423322b 100644 --- a/style.css +++ b/style.css @@ -56,6 +56,7 @@ or a child theme. ## - Posts and pages ## - Posts ## - Archives, Search Results & 404 + ## - Block Styles ## - Search Form ## - Related Posts ## - Author Box @@ -1581,10 +1582,12 @@ a { .full-width .polestar-container { max-width: none; } -.site-content::after { - clear: both; - content: ""; - display: table; } +.site-content { + overflow: hidden; } + .site-content::after { + clear: both; + content: ""; + display: table; } .content-area { width: 100%; } @@ -1632,6 +1635,20 @@ a { padding: 50px 0 0; width: 100%; } } +.page-layout-no-sidebar .alignfull { + margin-left: calc(50% - 50vw); + width: 100vw; } + +@media (min-width: calc(1140px + 200px)) { + .page-layout-no-sidebar .alignwide { + left: -100px; + position: relative; + width: calc(100% + 20vw); } } + +.page-layout-no-sidebar .alignfull .wp-block-group__inner-container { + margin: auto; + max-width: 1140px; } + /*-------------------------------------------------------------- ## - Header --------------------------------------------------------------*/ @@ -2118,6 +2135,18 @@ a { float: none; width: 100%; } } +/*-------------------------------------------------------------- +## - Block Styles +--------------------------------------------------------------*/ +.entry-content > div[class^='wp-block-'] { + margin-bottom: 50px; } + +.wp-block-group.has-background { + padding: 30px; } + .wp-block-group.has-background.alignfull { + padding-right: 0; + padding-left: 0; } + /*-------------------------------------------------------------- ## - Search Form --------------------------------------------------------------*/ From 25c64ef5419a1512eea1132987ac96ec47dc5469 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sun, 6 Sep 2020 14:56:27 +0200 Subject: [PATCH 3/4] Enabled BE Wide Alignment support --- functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions.php b/functions.php index 55ec1ae..6c7cd01 100644 --- a/functions.php +++ b/functions.php @@ -40,6 +40,13 @@ function polestar_setup() { */ add_theme_support( 'title-tag' ); + /* + * Enable support for Block Editor Wide Alignment. + * + * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#wide-alignment + */ + add_theme_support( 'align-wide' ); + /* * Enable support for Post Thumbnails on posts and pages. * From 07c3f7feadfce1697de710afac03e091b3950bad Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sun, 6 Sep 2020 14:56:40 +0200 Subject: [PATCH 4/4] Updated changelog --- readme.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.txt b/readme.txt index b2284cc..d27a0b1 100644 --- a/readme.txt +++ b/readme.txt @@ -151,6 +151,9 @@ Released under [GPL version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0 == Changelog == += 1.4.2 - 06 September 2020 = +* Added Block Editor support for Wide Alignment. + = 1.4.1 - 26 July 2020 = * WooCommerce: Adjusted spacing for `No Products` notification. * Minor code formatting enhancements.