diff --git a/assets/css/main-rtl.css b/assets/css/main-rtl.css index 51ae552..209d56c 100644 --- a/assets/css/main-rtl.css +++ b/assets/css/main-rtl.css @@ -461,6 +461,8 @@ input[disabled] { cursor: default; opacity: .66; } .comment-form label { display: block; } +.comment-form [type="checkbox"] + label, .comment-form [type="radio"] + label { display: inline-block; } + .comment-form-author input, .comment-form-email input, .comment-form-url input, .comment-form-comment textarea { width: 100%; } .comment-form-url { clear: both; } @@ -1595,6 +1597,8 @@ blockquote.alignright { margin-right: 0; } .gallery-caption { padding: 1em; margin-top: -1px; } +.sticky { /* No special styles here. */ } + .mejs-container { margin-bottom: 1.62em; } .mejs-container:last-child { margin-bottom: 0; } @@ -2302,6 +2306,8 @@ div.sharedaddy { margin-top: 2.6244rem; border-color: inherit; } @media only screen and (min-width: 42em) { .entry-author .author-bio { clear: both; } } +.entry-author .author-link { display: block; margin-top: 1em; } + .fl-builder .entry-author, .content-layout-no-paddings .entry-author { /* $content_width */ max-width: 744px; max-width: 41.33333rem; margin-left: auto; margin-right: auto; } .entry-content .portfolio-entry { padding: 1.62em; margin: 1em; border-width: 1px; border-style: solid; border-bottom-width: 2px; border-bottom-color: inherit; } @@ -2334,25 +2340,27 @@ div.sharedaddy { margin-top: 2.6244rem; border-color: inherit; } .posts .type-jetpack-portfolio .entry-content { display: none; } -.entry-content .testimonial-entry { margin: 1em; } +.entry-content .testimonial-entry { margin: 1.81em; } .entry-content .testimonial-entry .testimonial-featured-image { display: inline-block; max-width: 6em; margin-top: 1em; } +.testimonial-entry-title a { display: inline-block; vertical-align: top; } + .testimonial-entry-title .entry-subtitle { margin: 0; font-size: inherit; } .jetpack-testimonial-shortcode { display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; } -.entry-content .jetpack-testimonial-shortcode { margin: -1em; } +.entry-content .jetpack-testimonial-shortcode { margin: -1.81em; } -.jetpack-testimonial-shortcode .testimonial-entry { width: calc( 100% - 2em); } +.jetpack-testimonial-shortcode .testimonial-entry { width: calc( 100% - 3.62em); } -@media only screen and (min-width: 42em) { .jetpack-testimonial-shortcode .testimonial-entry { width: calc( 50% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-1 { width: calc( 100% - 2em); } } +@media only screen and (min-width: 42em) { .jetpack-testimonial-shortcode .testimonial-entry { width: calc( 50% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-1 { width: calc( 100% - 3.62em); } } -@media only screen and (min-width: 55em) { .jetpack-testimonial-shortcode .testimonial-entry-column-3 { width: calc( 33.33333% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-4 { width: calc( 25% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-5 { width: calc( 20% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-6 { width: calc( 16.66667% - 2em); } } +@media only screen and (min-width: 55em) { .jetpack-testimonial-shortcode .testimonial-entry-column-3 { width: calc( 33.33333% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-4 { width: calc( 25% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-5 { width: calc( 20% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-6 { width: calc( 16.66667% - 3.62em); } } /* FILE: main/plugins/__subtitles.scss */ .entry-subtitle { display: block; margin-top: 0.38em; opacity: .8; } diff --git a/assets/css/main.css b/assets/css/main.css index 68213de..d6799f2 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -459,6 +459,8 @@ input[disabled] { cursor: default; opacity: .66; } .comment-form label { display: block; } +.comment-form [type="checkbox"] + label, .comment-form [type="radio"] + label { display: inline-block; } + .comment-form-author input, .comment-form-email input, .comment-form-url input, .comment-form-comment textarea { width: 100%; } .comment-form-url { clear: both; } @@ -1593,6 +1595,8 @@ blockquote.alignright { margin-right: 0; } .gallery-caption { padding: 1em; margin-top: -1px; } +.sticky { /* No special styles here. */ } + .mejs-container { margin-bottom: 1.62em; } .mejs-container:last-child { margin-bottom: 0; } @@ -2300,6 +2304,8 @@ div.sharedaddy { margin-top: 2.6244rem; border-color: inherit; } @media only screen and (min-width: 42em) { .entry-author .author-bio { clear: both; } } +.entry-author .author-link { display: block; margin-top: 1em; } + .fl-builder .entry-author, .content-layout-no-paddings .entry-author { /* $content_width */ max-width: 744px; max-width: 41.33333rem; margin-left: auto; margin-right: auto; } .entry-content .portfolio-entry { padding: 1.62em; margin: 1em; border-width: 1px; border-style: solid; border-bottom-width: 2px; border-bottom-color: inherit; } @@ -2332,25 +2338,27 @@ div.sharedaddy { margin-top: 2.6244rem; border-color: inherit; } .posts .type-jetpack-portfolio .entry-content { display: none; } -.entry-content .testimonial-entry { margin: 1em; } +.entry-content .testimonial-entry { margin: 1.81em; } .entry-content .testimonial-entry .testimonial-featured-image { display: inline-block; max-width: 6em; margin-top: 1em; } +.testimonial-entry-title a { display: inline-block; vertical-align: top; } + .testimonial-entry-title .entry-subtitle { margin: 0; font-size: inherit; } .jetpack-testimonial-shortcode { display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-flex-wrap: wrap; -ms-flex-wrap: wrap; flex-wrap: wrap; } -.entry-content .jetpack-testimonial-shortcode { margin: -1em; } +.entry-content .jetpack-testimonial-shortcode { margin: -1.81em; } -.jetpack-testimonial-shortcode .testimonial-entry { width: calc( 100% - 2em); } +.jetpack-testimonial-shortcode .testimonial-entry { width: calc( 100% - 3.62em); } -@media only screen and (min-width: 42em) { .jetpack-testimonial-shortcode .testimonial-entry { width: calc( 50% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-1 { width: calc( 100% - 2em); } } +@media only screen and (min-width: 42em) { .jetpack-testimonial-shortcode .testimonial-entry { width: calc( 50% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-1 { width: calc( 100% - 3.62em); } } -@media only screen and (min-width: 55em) { .jetpack-testimonial-shortcode .testimonial-entry-column-3 { width: calc( 33.33333% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-4 { width: calc( 25% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-5 { width: calc( 20% - 2em); } - .jetpack-testimonial-shortcode .testimonial-entry-column-6 { width: calc( 16.66667% - 2em); } } +@media only screen and (min-width: 55em) { .jetpack-testimonial-shortcode .testimonial-entry-column-3 { width: calc( 33.33333% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-4 { width: calc( 25% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-5 { width: calc( 20% - 3.62em); } + .jetpack-testimonial-shortcode .testimonial-entry-column-6 { width: calc( 16.66667% - 3.62em); } } /* FILE: main/plugins/__subtitles.scss */ .entry-subtitle { display: block; margin-top: 0.38em; opacity: .8; } diff --git a/assets/css/woocommerce-rtl.css b/assets/css/woocommerce-rtl.css index 69a9eb1..162bef9 100644 --- a/assets/css/woocommerce-rtl.css +++ b/assets/css/woocommerce-rtl.css @@ -212,7 +212,7 @@ ul.order_details::after { background-position: 0 0; top: auto; bottom: -0.5em; } .variation dd { float: right; margin-right: 0.38em; } -.single-product .summary .variations .label { font-weight: 700; } +.single-product .summary .variations .label { font-weight: 700; white-space: nowrap; } .single-product .summary .variations select { float: left; width: auto; padding-left: 1.62em; padding-top: 0; padding-bottom: 0; background-color: transparent; background-origin: padding-box; border-width: 0; border-bottom-width: 2px; border-bottom-style: solid; border-color: currentColor; cursor: pointer; } @@ -220,7 +220,7 @@ ul.order_details::after { background-position: 0 0; top: auto; bottom: -0.5em; } .single-product .summary .variations_button .button:first-child { width: 100%; } -.single-product .summary .single_variation .price { display: block; margin-bottom: 1em; } +.single-product .summary .single_variation .price { display: block; } .single-product .summary .reset_variations { float: left; margin-top: 0.38em; margin-left: 0.62em; text-decoration: none; font-size: 0.81em; } @@ -373,6 +373,8 @@ ul.products .product .button, ul.products .product .added_to_cart { position: re ul.products .product .button::before, ul.products .product .added_to_cart::before { content: '\f447'; display: inline-block; margin-left: 0.38em; line-height: 0.62; font-size: 1.38em; vertical-align: middle; } +ul.products .product.outofstock .button::before, ul.products .product.outofstock .added_to_cart::before { display: none; } + ul.products .product .button + .button { margin-top: 1em; } ul.products .product .button.loading::before { content: '\f420'; -webkit-animation-name: rotate; animation-name: rotate; -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } @@ -495,7 +497,7 @@ ul.products.columns-1 .product { width: 97.24%; } .single-product .summary .product-description-link-container { margin-top: -1em; text-align: left; } -.single-product .summary .price { font-size: 1.62em; } +.single-product .summary .price { margin-bottom: 1.62rem; font-size: 1.62em; } .single-product .summary .stock { display: inline-block; padding: 0.38em 0.62em; font-size: 0.81em; border-width: 1px; border-style: solid; } @@ -905,7 +907,7 @@ html .content-layout-stretched .woocommerce-tabs .woocommerce-Tabs-panel--descri .shipping-calculator-button { font-weight: 700; text-transform: uppercase; border: 2px solid; color: inherit; } -.shipping-calculator-form { padding: 1em 1.62em; } +.shipping-calculator-form { padding: 1em; } .cart-empty { margin-bottom: 1em; font-weight: 700; } @@ -978,9 +980,13 @@ html .content-layout-stretched .woocommerce-tabs .woocommerce-Tabs-panel--descri .wc_payment_methods .payment_box { padding: 1em 1.62em; } +.woocommerce-privacy-policy-text { margin: 1.62em 0; } + .wc-terms-and-conditions { margin-top: 1.62em; text-align: center; } -.woocommerce-terms-and-conditions { padding: 1.62em; margin: 1.62em 0; font-size: 0.905em; border-width: 1px; border-style: dashed; } +.woocommerce-terms-and-conditions { padding: 1.62em; margin-bottom: 1.62em; font-size: 0.905em; border-width: 1px; border-style: dashed; } + +.woocommerce-terms-and-conditions-wrapper { margin-top: 1.62em; } .woocommerce-terms-and-conditions h2, .woocommerce-terms-and-conditions .h2 { font-size: 1.38em; } diff --git a/assets/css/woocommerce.css b/assets/css/woocommerce.css index d1268b1..a984564 100644 --- a/assets/css/woocommerce.css +++ b/assets/css/woocommerce.css @@ -212,7 +212,7 @@ ul.order_details::after { background-position: 0 0; top: auto; bottom: -0.5em; } .variation dd { float: left; margin-left: 0.38em; } -.single-product .summary .variations .label { font-weight: 700; } +.single-product .summary .variations .label { font-weight: 700; white-space: nowrap; } .single-product .summary .variations select { float: right; width: auto; padding-right: 1.62em; padding-top: 0; padding-bottom: 0; background-color: transparent; background-origin: padding-box; border-width: 0; border-bottom-width: 2px; border-bottom-style: solid; border-color: currentColor; cursor: pointer; } @@ -220,7 +220,7 @@ ul.order_details::after { background-position: 0 0; top: auto; bottom: -0.5em; } .single-product .summary .variations_button .button:first-child { width: 100%; } -.single-product .summary .single_variation .price { display: block; margin-bottom: 1em; } +.single-product .summary .single_variation .price { display: block; } .single-product .summary .reset_variations { float: right; margin-top: 0.38em; margin-right: 0.62em; text-decoration: none; font-size: 0.81em; } @@ -373,6 +373,8 @@ ul.products .product .button, ul.products .product .added_to_cart { position: re ul.products .product .button::before, ul.products .product .added_to_cart::before { content: '\f447'; display: inline-block; margin-right: 0.38em; line-height: 0.62; font-size: 1.38em; vertical-align: middle; } +ul.products .product.outofstock .button::before, ul.products .product.outofstock .added_to_cart::before { display: none; } + ul.products .product .button + .button { margin-top: 1em; } ul.products .product .button.loading::before { content: '\f420'; -webkit-animation-name: rotate; animation-name: rotate; -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-timing-function: linear; animation-timing-function: linear; -webkit-animation-iteration-count: infinite; animation-iteration-count: infinite; } @@ -495,7 +497,7 @@ ul.products.columns-1 .product { width: 97.24%; } .single-product .summary .product-description-link-container { margin-top: -1em; text-align: right; } -.single-product .summary .price { font-size: 1.62em; } +.single-product .summary .price { margin-bottom: 1.62rem; font-size: 1.62em; } .single-product .summary .stock { display: inline-block; padding: 0.38em 0.62em; font-size: 0.81em; border-width: 1px; border-style: solid; } @@ -905,7 +907,7 @@ html .content-layout-stretched .woocommerce-tabs .woocommerce-Tabs-panel--descri .shipping-calculator-button { font-weight: 700; text-transform: uppercase; border: 2px solid; color: inherit; } -.shipping-calculator-form { padding: 1em 1.62em; } +.shipping-calculator-form { padding: 1em; } .cart-empty { margin-bottom: 1em; font-weight: 700; } @@ -978,9 +980,13 @@ html .content-layout-stretched .woocommerce-tabs .woocommerce-Tabs-panel--descri .wc_payment_methods .payment_box { padding: 1em 1.62em; } +.woocommerce-privacy-policy-text { margin: 1.62em 0; } + .wc-terms-and-conditions { margin-top: 1.62em; text-align: center; } -.woocommerce-terms-and-conditions { padding: 1.62em; margin: 1.62em 0; font-size: 0.905em; border-width: 1px; border-style: dashed; } +.woocommerce-terms-and-conditions { padding: 1.62em; margin-bottom: 1.62em; font-size: 0.905em; border-width: 1px; border-style: dashed; } + +.woocommerce-terms-and-conditions-wrapper { margin-top: 1.62em; } .woocommerce-terms-and-conditions h2, .woocommerce-terms-and-conditions .h2 { font-size: 1.38em; } diff --git a/assets/js/scripts-masonry.js b/assets/js/scripts-masonry.js new file mode 100644 index 0000000..760fab1 --- /dev/null +++ b/assets/js/scripts-masonry.js @@ -0,0 +1,75 @@ +/** + * Masonry layouts + * + * @package Reykjavik + * @copyright WebMan Design, Oliver Juhas + * + * @since 1.2.0 + * @version 1.2.0 + */ + + + + + +( function( $ ) { + + if ( $().masonry ) { + + + + + + /** + * Masonry posts/products + */ + + var + $isShop = $( document.body ).is( '.archive, .woocommerce' ), + $list = ( $isShop ) ? ( $( '.products' ) ) : ( $( '.posts' ) ), + $itemClass = ( $isShop ) ? ( '.product' ) : ( '.entry' ); + + $list + .imagesLoaded( function() { + + // Processing + + $list + .masonry( { + itemSelector : $itemClass, + percentPosition : true, + isOriginLeft : ( 'rtl' !== $( 'html' ).attr( 'dir' ) ) + } ); + + } ); + + + + /** + * Jetpack Infinite Scroll posts loading + */ + + $( document.body ) + .on( 'post-load', function() { + + // Processing + + $list + .imagesLoaded( function() { + + // Processing + + $list + .masonry( 'reload' ); + + } ); + + } ); + + + + + + } // /masonry + +} )( jQuery ); diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 500f512..609e19f 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -7,7 +7,7 @@ // @copyright WebMan Design, Oliver Juhas // // @since 1.0.0 -// @version 1.0.8 +// @version 1.2.0 // diff --git a/assets/scss/main/content/__wp.scss b/assets/scss/main/content/__wp.scss index 7ac2a37..923e0f7 100644 --- a/assets/scss/main/content/__wp.scss +++ b/assets/scss/main/content/__wp.scss @@ -65,6 +65,14 @@ +// Sticky posts + + .sticky { + /* No special styles here. */ + } + + + // Media player .mejs-container { diff --git a/assets/scss/main/plugins/__jetpack.scss b/assets/scss/main/plugins/__jetpack.scss index 0873d2f..685cf40 100644 --- a/assets/scss/main/plugins/__jetpack.scss +++ b/assets/scss/main/plugins/__jetpack.scss @@ -148,6 +148,11 @@ } + &-link { + display: block; + margin-top: 1em; + } + } .fl-builder &, @@ -262,10 +267,12 @@ // Testimonials + $gutter: 3.62em; + .testimonial-entry { .entry-content & { - margin: 1em; + margin: $gutter / 2; .testimonial-featured-image { display: inline-block; @@ -277,6 +284,11 @@ &-title { + a { + display: inline-block; + vertical-align: top; + } + .entry-subtitle { margin: 0; font-size: inherit; @@ -291,24 +303,24 @@ flex-wrap: wrap; .entry-content & { - margin: -1em; + margin: -$gutter / 2; } .testimonial-entry { $columns: 1; // Default layout on small devices. - width: calc( #{ percentage( 1 / $columns ) } - 2em ); + width: calc( #{ percentage( 1 / $columns ) } - #{ $gutter } ); } @include responsive( map_get( $breakpoint, 'm' ) ) { .testimonial-entry { $columns: 2; // Default layout on medium devices. - width: calc( #{ percentage( 1 / $columns ) } - 2em ); + width: calc( #{ percentage( 1 / $columns ) } - #{ $gutter } ); } .testimonial-entry-column-1 { $columns: 1; - width: calc( #{ percentage( 1 / $columns ) } - 2em ); + width: calc( #{ percentage( 1 / $columns ) } - #{ $gutter } ); } } @@ -318,7 +330,7 @@ @for $columns from 3 through 6 { .testimonial-entry-column-#{ $columns } { - width: calc( #{ percentage( 1 / $columns ) } - 2em ); + width: calc( #{ percentage( 1 / $columns ) } - #{ $gutter } ); } } diff --git a/assets/scss/starter/_starter.scss b/assets/scss/starter/_starter.scss index 22301cd..56d5f4b 100644 --- a/assets/scss/starter/_starter.scss +++ b/assets/scss/starter/_starter.scss @@ -12,7 +12,7 @@ // @copyright WebMan Design, Oliver Juhas // // @since 1.0.0 -// @version 1.0.1 +// @version 1.2.0 // diff --git a/assets/scss/starter/content/forms/__comments.scss b/assets/scss/starter/content/forms/__comments.scss index c6c0c2e..351c527 100644 --- a/assets/scss/starter/content/forms/__comments.scss +++ b/assets/scss/starter/content/forms/__comments.scss @@ -43,6 +43,11 @@ display: block; } + [type="checkbox"] + label, + [type="radio"] + label { + display: inline-block; + } + } .comment-form-author input, diff --git a/assets/scss/woocommerce.scss b/assets/scss/woocommerce.scss index f0ec47f..82a8d73 100644 --- a/assets/scss/woocommerce.scss +++ b/assets/scss/woocommerce.scss @@ -7,7 +7,7 @@ // @copyright WebMan Design, Oliver Juhas // // @since 1.0.0 -// @version 1.0.7 +// @version 1.2.0 // diff --git a/assets/scss/woocommerce/main/__loop.scss b/assets/scss/woocommerce/main/__loop.scss index 7488ae6..84359d9 100644 --- a/assets/scss/woocommerce/main/__loop.scss +++ b/assets/scss/woocommerce/main/__loop.scss @@ -97,6 +97,11 @@ ul.products { // Unfortunately, in some cases also a DIV wrapper has a class of line-height: $golden_major; font-size: 1em + $golden_minor; vertical-align: middle; + + @include in( '.product.outofstock' ) { + display: none; + } + } } diff --git a/assets/scss/woocommerce/main/__single.scss b/assets/scss/woocommerce/main/__single.scss index d30a4e2..21d3c62 100644 --- a/assets/scss/woocommerce/main/__single.scss +++ b/assets/scss/woocommerce/main/__single.scss @@ -141,6 +141,7 @@ // Price .price { + margin-bottom: $golden +rem; font-size: $golden +em; } diff --git a/assets/scss/woocommerce/main/__variations.scss b/assets/scss/woocommerce/main/__variations.scss index 5477d40..a1df6c7 100644 --- a/assets/scss/woocommerce/main/__variations.scss +++ b/assets/scss/woocommerce/main/__variations.scss @@ -41,6 +41,7 @@ .label { font-weight: 700; + white-space: nowrap; } select { @@ -76,7 +77,6 @@ .price { display: block; - margin-bottom: 1em; } } diff --git a/assets/scss/woocommerce/pages/__cart.scss b/assets/scss/woocommerce/pages/__cart.scss index 41b13c5..d1bf919 100644 --- a/assets/scss/woocommerce/pages/__cart.scss +++ b/assets/scss/woocommerce/pages/__cart.scss @@ -289,7 +289,7 @@ } &-form { - padding: 1em ( $golden +em ); + padding: 1em; } } diff --git a/assets/scss/woocommerce/pages/__checkout.scss b/assets/scss/woocommerce/pages/__checkout.scss index 25e4a84..a741a50 100644 --- a/assets/scss/woocommerce/pages/__checkout.scss +++ b/assets/scss/woocommerce/pages/__checkout.scss @@ -228,7 +228,11 @@ - // Terms and conditions + // Privacy, terms and conditions + + .woocommerce-privacy-policy-text { + margin: ( $golden +em ) 0; + } .wc-terms-and-conditions { margin-top: $golden +em; @@ -237,11 +241,15 @@ .woocommerce-terms-and-conditions { padding: $golden +em; - margin: ( $golden +em ) 0; + margin-bottom: $golden +em; font-size: 1em - $golden_minor / 4; border-width: 1px; border-style: dashed; + &-wrapper { + margin-top: $golden +em; + } + h2, .h2 { font-size: $golden_minor + 1em; } diff --git a/changelog.md b/changelog.md index 85a4b6d..4961462 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,35 @@ # Reykjavik Changelog +## 1.2.0 + +* **Add**: WooCommerce masonry products layout when product images are set to "uncropped" +* **Update**: WordPress 4.9.6 compatibility (GDPR) +* **Update**: Improved custom widget enhancements +* **Update**: Jetpack Testimonials shortcode styles +* **Update**: Jetpack Author Bio box styles +* **Update**: Beaver Builder compatibility +* **Update**: WooCommerce compatibility and styles +* **Fix**: Beaver Builder row width + +### Files changed: + + changelog.md + style.css + assets/js/scripts-masonry.js + assets/scss/main.scss + assets/scss/woocommerce.scss + assets/scss/starter/_starter.scss + includes/frontend/class-assets.php + includes/frontend/class-header.php + includes/plugins/beaver-builder/class-beaver-builder-assets.php + includes/plugins/beaver-builder/class-beaver-builder-form.php + includes/plugins/jetpack/class-jetpack.php + includes/plugins/woocommerce/class-woocommerce-loop.php + includes/widgets/class-wp-widget-recent-posts.php + includes/widgets/class-wp-widget-text.php + templates/parts/footer/site-info.php + + ## 1.1.2 * **Fix**: Just fixing the installer ZIP diff --git a/includes/frontend/class-assets.php b/includes/frontend/class-assets.php index ec560ed..a740927 100644 --- a/includes/frontend/class-assets.php +++ b/includes/frontend/class-assets.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 * * Contents: * @@ -167,7 +167,7 @@ public static function register_styles() { * Registering theme scripts * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 */ public static function register_scripts() { @@ -179,6 +179,7 @@ public static function register_scripts() { 'jquery-fitvids' => array( get_theme_file_uri( 'assets/js/vendors/fitvids/jquery.fitvids.js' ) ), 'reykjavik-skip-link-focus-fix' => array( 'src' => get_theme_file_uri( 'assets/js/skip-link-focus-fix.js' ), 'deps' => array() ), 'reykjavik-scripts-global' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-global.js' ), 'deps' => $script_global_deps ), + 'reykjavik-scripts-masonry' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-masonry.js' ), 'deps' => array( 'jquery-masonry' ) ), 'reykjavik-scripts-nav-a11y' => array( get_theme_file_uri( 'assets/js/scripts-navigation-accessibility.js' ) ), 'reykjavik-scripts-nav-mobile' => array( get_theme_file_uri( 'assets/js/scripts-navigation-mobile.js' ) ), ); @@ -279,7 +280,7 @@ public static function enqueue_styles() { * Frontend scripts enqueue * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 */ public static function enqueue_scripts() { @@ -314,6 +315,12 @@ public static function enqueue_scripts() { } } + // Masonry + + if ( (bool) apply_filters( 'wmhook_reykjavik_is_masonry_layout', false ) ) { + $enqueue_assets[30] = 'reykjavik-scripts-masonry'; + } + // Global theme scripts $enqueue_assets[100] = 'reykjavik-scripts-global'; diff --git a/includes/frontend/class-header.php b/includes/frontend/class-header.php index 1cb551e..766359c 100644 --- a/includes/frontend/class-header.php +++ b/includes/frontend/class-header.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 * * Contents: * @@ -343,7 +343,7 @@ public static function site_branding() { * HTML Body classes * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 * * @param array $classes */ @@ -397,6 +397,12 @@ public static function body_class( $classes = array() ) { $post_id = get_the_ID(); + // Privacy Policy page + + if ( (int) get_option( 'wp_page_for_privacy_policy' ) === $post_id ) { + $classes[] = 'page-privacy-policy'; + } + // Has featured image? if ( has_post_thumbnail() ) { @@ -464,6 +470,10 @@ public static function body_class( $classes = array() ) { $classes[] = 'posts-layout-list'; } + if ( (bool) apply_filters( 'wmhook_reykjavik_is_masonry_layout', false ) ) { + $classes[] = 'posts-layout-masonry'; + } + // Enable outdented page layout if ( diff --git a/includes/plugins/beaver-builder/class-beaver-builder-assets.php b/includes/plugins/beaver-builder/class-beaver-builder-assets.php index bdca0a2..c589eec 100644 --- a/includes/plugins/beaver-builder/class-beaver-builder-assets.php +++ b/includes/plugins/beaver-builder/class-beaver-builder-assets.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.1.1 + * @version 1.2.0 * * Contents: * @@ -33,7 +33,7 @@ class Reykjavik_Beaver_Builder_Assets { * Constructor * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 */ private function __construct() { @@ -46,6 +46,7 @@ private function __construct() { add_action( 'init', __CLASS__ . '::late_load', 900 ); add_action( 'wp_enqueue_scripts', __CLASS__ . '::assets' ); + add_action( 'wp_enqueue_scripts', __CLASS__ . '::assets_widget_text' ); // Filters @@ -199,6 +200,35 @@ public static function assets() { + /** + * Loading assets in Beaver Builder + * + * @subpackage Widgets + * + * @since 1.2.0 + * @version 1.2.0 + */ + public static function assets_widget_text() { + + // Requirements check + + if ( + ! is_callable( 'Reykjavik_WP_Widget_Text::enqueue' ) + || ! is_callable( 'FLBuilderModel::is_builder_active' ) + || ! FLBuilderModel::is_builder_active() + ) { + return; + } + + + // Processing + + Reykjavik_WP_Widget_Text::enqueue(); + + } // /assets_widget_text + + + /** @@ -209,7 +239,7 @@ public static function assets() { * Custom layout styles * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 * * @param string $css * @param array $nodes @@ -232,30 +262,40 @@ public static function layout_styles( $css, $nodes ) { } if ( $global_row_margins ) { - $css .= "\r\n\r\n"; + $css .= PHP_EOL.PHP_EOL; $css .= '.fl-row-fixed-width .fl-row-content-wrap'; - $css .= ','; + $css .= ', '; $css .= '.fl-row-layout-full-fixed .fl-row-fixed-width > .fl-col-group'; $css .= ' { '; $css .= 'width: auto;'; + $css .= ' '; + $css .= 'max-width: calc(100% + ' . esc_attr( $global_row_margins ) . ' + ' . esc_attr( $global_row_margins ) . ');'; + $css .= ' '; $css .= 'margin-left: -' . esc_attr( $global_row_margins ) . ';'; + $css .= ' '; $css .= 'margin-right: -' . esc_attr( $global_row_margins ) . ';'; - $css .= ' }' . "\r\n\r\n"; + $css .= ' }' . PHP_EOL.PHP_EOL; } // Fixing responsive element hiding - $css .= "\r\n\r\n"; + $css .= PHP_EOL.PHP_EOL; $css .= '@media (min-width: ' . absint( $global_settings->responsive_breakpoint + 1 ) . 'px) and (max-width: ' . absint( $global_settings->medium_breakpoint ) . 'px) { '; - $css .= '.fl-col-group .fl-visible-desktop-medium.fl-col, .fl-col-group .fl-visible-medium.fl-col, .fl-col-group .fl-visible-medium-mobile.fl-col'; + $css .= '.fl-col-group .fl-visible-desktop-medium.fl-col'; + $css .= ', '; + $css .= '.fl-col-group .fl-visible-medium.fl-col'; + $css .= ', '; + $css .= '.fl-col-group .fl-visible-medium-mobile.fl-col'; $css .= ' { display: flex; }'; - $css .= ' }' . "\r\n\r\n"; + $css .= ' }' . PHP_EOL.PHP_EOL; - $css .= "\r\n\r\n"; + $css .= PHP_EOL.PHP_EOL; $css .= '@media (max-width: ' . absint( $global_settings->responsive_breakpoint ) . 'px) { '; - $css .= '.fl-col-group .fl-visible-medium-mobile.fl-col, .fl-col-group .fl-visible-mobile.fl-col'; + $css .= '.fl-col-group .fl-visible-medium-mobile.fl-col'; + $css .= ', '; + $css .= '.fl-col-group .fl-visible-mobile.fl-col'; $css .= ' { display: flex; }'; - $css .= ' }' . "\r\n\r\n"; + $css .= ' }' . PHP_EOL.PHP_EOL; // Output diff --git a/includes/plugins/beaver-builder/class-beaver-builder-form.php b/includes/plugins/beaver-builder/class-beaver-builder-form.php index e32f3e6..3150a6f 100644 --- a/includes/plugins/beaver-builder/class-beaver-builder-form.php +++ b/includes/plugins/beaver-builder/class-beaver-builder-form.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 * * Contents: * @@ -32,7 +32,7 @@ class Reykjavik_Beaver_Builder_Form { * Constructor * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 */ private function __construct() { @@ -44,7 +44,7 @@ private function __construct() { add_filter( 'fl_builder_register_settings_form', __CLASS__ . '::register_settings_form', 10, 2 ); - add_filter( 'fl_builder_render_settings_field', __CLASS__ . '::predefined_classes_dropdown', 10, 2 ); + add_filter( 'fl_builder_field_js_config', __CLASS__ . '::predefined_classes_dropdown', 10, 2 ); } // /__construct diff --git a/includes/plugins/jetpack/class-jetpack.php b/includes/plugins/jetpack/class-jetpack.php index 9bdc1ce..87b981d 100644 --- a/includes/plugins/jetpack/class-jetpack.php +++ b/includes/plugins/jetpack/class-jetpack.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 * * Contents: * @@ -278,29 +278,73 @@ public static function infinite_scroll_render() { * Display author bio * * @since 1.0.0 - * @version 1.0.0 + * @version 1.2.0 */ public static function author_bio() { // Requirements check if ( - ! function_exists( 'jetpack_author_bio' ) - || ! Reykjavik_Post::is_singular() - || ! in_array( get_post_type(), (array) apply_filters( 'wmhook_{%= prefix_hook %}_jetpack_author_bio_post_type', array( 'post' ) ) ) - ) { + ! function_exists( 'jetpack_author_bio' ) + || ! Reykjavik_Post::is_singular() + || post_password_required() + || ! in_array( get_post_type(), (array) apply_filters( 'wmhook_reykjavik_jetpack_author_bio_post_type', array( 'post' ) ) ) + ) { return; } // Output - jetpack_author_bio(); + echo self::get_author_bio(); } // /author_bio + /** + * Get author bio HTML + * + * @since 1.2.0 + * @version 1.2.0 + * + * @param boolean $remove_default_paragraph + */ + public static function get_author_bio( $remove_default_paragraph = true ) { + + // Requirements check + + if ( ! function_exists( 'jetpack_author_bio' ) ) { + return; + } + + + // Processing + + ob_start(); + jetpack_author_bio(); + $output = ob_get_clean(); + + if ( $remove_default_paragraph ) { + $output = str_replace( + array( + '
', + ), + '', + $output + ); + } + + + // Output + + return $output; + + } // /get_author_bio + + + /** * Author bio avatar size * diff --git a/includes/plugins/woocommerce/class-woocommerce-loop.php b/includes/plugins/woocommerce/class-woocommerce-loop.php index 91efe38..9ea8dbf 100644 --- a/includes/plugins/woocommerce/class-woocommerce-loop.php +++ b/includes/plugins/woocommerce/class-woocommerce-loop.php @@ -6,7 +6,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.6 + * @version 1.2.0 * * Contents: * @@ -34,7 +34,7 @@ class Reykjavik_WooCommerce_Loop { * Constructor * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 */ private function __construct() { @@ -93,6 +93,8 @@ private function __construct() { add_filter( 'wmhook_reykjavik_post_media_image_size', __CLASS__ . '::product_media_size', 15 ); + add_filter( 'wmhook_reykjavik_is_masonry_layout', __CLASS__ . '::is_masonry' ); + } // /__construct @@ -485,6 +487,34 @@ public static function search_results_product_title( $title, $id ) { + /** + * When to use masonry posts layout? + * + * @since 1.2.0 + * @version 1.2.0 + * + * @param boolean $is_masonry + */ + public static function is_masonry( $is_masonry ) { + + // Processing + + if ( + ( is_shop() || is_product_taxonomy() ) + && 'uncropped' === get_option( 'woocommerce_thumbnail_cropping' ) + ) { + $is_masonry = true; + } + + + // Output + + return $is_masonry; + + } // /is_masonry + + + } // /Reykjavik_WooCommerce_Loop diff --git a/includes/widgets/class-wp-widget-recent-posts.php b/includes/widgets/class-wp-widget-recent-posts.php index e7edd4b..17c3b33 100644 --- a/includes/widgets/class-wp-widget-recent-posts.php +++ b/includes/widgets/class-wp-widget-recent-posts.php @@ -8,7 +8,7 @@ * @copyright WebMan Design, Oliver Juhas * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 * * Contents: * @@ -43,7 +43,7 @@ * Widget class * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 * * Contents: * @@ -64,7 +64,7 @@ class Reykjavik_WP_Widget_Recent_Posts extends WP_Widget_Recent_Posts { * Output HTML * * @since 1.0.0 - * @version 1.0.5 + * @version 1.2.0 */ public function widget( $args, $instance ) { @@ -156,7 +156,7 @@ public function widget( $args, $instance ) { if ( $instance['show_date'] ) { $output .= ''; - $output .= '