@automattic/newspack-blocks 1.68.2 → 1.69.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/babel/15387cb771ffa80b113069531d7dbf2a.json.gz +0 -0
- package/.cache/babel/20e776cde824c2a3cb901dca6977367b.json.gz +0 -0
- package/.cache/babel/56046f06a99a61b7847b604a58062e17.json.gz +0 -0
- package/.cache/babel/6444da3051780011261cc12e796a6e36.json.gz +0 -0
- package/.cache/babel/764469c94d0f935d0d48d3b8ca9964ff.json.gz +0 -0
- package/.cache/babel/845433093cc647521f9ed7aada6399c5.json.gz +0 -0
- package/.cache/babel/acff6371a410845f5da464cb4e237aaf.json.gz +0 -0
- package/.cache/babel/f5dc184121cc109a8bc4f20364bd68b5.json.gz +0 -0
- package/CHANGELOG.md +15 -0
- package/composer.lock +12 -12
- package/dist/block_styles.asset.php +1 -1
- package/dist/block_styles.css +1 -1
- package/dist/block_styles.rtl.css +1 -1
- package/dist/carousel/view.asset.php +1 -1
- package/dist/carousel/view.js +1 -1
- package/dist/donate/view.asset.php +1 -1
- package/dist/donate/view.css +1 -1
- package/dist/donate/view.rtl.css +1 -1
- package/dist/donateStreamlined.asset.php +1 -1
- package/dist/donateStreamlined.js +1 -1
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.js +1 -1
- package/dist/editor.rtl.css +1 -1
- package/dist/homepage-articles/view.asset.php +1 -1
- package/dist/homepage-articles/view.css +1 -1
- package/dist/homepage-articles/view.rtl.css +1 -1
- package/dist/modal.asset.php +1 -1
- package/dist/modal.css +1 -1
- package/dist/modal.js +1 -1
- package/dist/modal.rtl.css +1 -1
- package/includes/class-modal-checkout.php +70 -1
- package/newspack-blocks.php +2 -2
- package/package.json +5 -5
- package/src/block-styles/core/columns/view.scss +2 -8
- package/src/blocks/checkout-button/block.json +7 -0
- package/src/blocks/checkout-button/edit.js +99 -12
- package/src/blocks/checkout-button/save.js +3 -1
- package/src/blocks/checkout-button/view.php +8 -1
- package/src/blocks/donate/styles/style-variations.scss +1 -4
- package/src/blocks/homepage-articles/view.scss +2 -8
- package/src/blocks/video-playlist/editor.scss +1 -4
- package/src/modal-checkout/modal.js +57 -14
- package/src/modal-checkout/modal.scss +57 -4
- package/src/templates/author-profile-card.php +26 -18
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
- package/.cache/babel/0988afa42fd3fe14da7ae43c9d02661e.json.gz +0 -0
- package/.cache/babel/0fc85d33d9c79c26521df1d74d37473e.json.gz +0 -0
- package/.cache/babel/1f75e279f33d30dace0c18b21b746178.json.gz +0 -0
- package/.cache/babel/5ee469cfff0fc7181d9e0db8e1d58cf0.json.gz +0 -0
- package/.cache/babel/6170ac021bca94b65aaf9d91313c47a9.json.gz +0 -0
- package/.cache/babel/66c747a8bdec1ed403f703e47256fa03.json.gz +0 -0
- package/.cache/babel/6b02d0502dfcd8c011a2ba4381ab01f4.json.gz +0 -0
- package/.cache/babel/91e706536d45a88f098e9394344dbeb9.json.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '5358e8ecb6dea486eae826fdce280fff');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.newspack-preview-label{position:absolute;top:5px;left:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha .post-thumbnail{margin:0 0 .25em}.wpnbha .post-thumbnail img{height:auto;width:100%}.wpnbha .post-thumbnail figcaption{margin-bottom:.5em}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:0;margin-right:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:.5em}.wpnbha .entry-meta .byline:not(:last-child){margin-right:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-right:.5em}.wpnbha p{margin:.5em 0}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{bottom:0;left:0;margin:0;overflow:hidden;position:absolute;right:0;top:0}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;left:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;right:0;text-align:right;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:right}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-left:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links,amp-script .wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label,amp-script .wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a,amp-script .wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover,amp-script .wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors,amp-script .wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author,amp-script .wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child),amp-script .wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos,amp-script .wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}.wpnbha article .entry-title{font-size:1.2em}.wpnbha article .entry-meta{font-size:.8em}.wpnbha article .avatar{height:25px;width:25px}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}.wpnbha.ts-8 .entry-title,.wpnbha.ts-9 .entry-title,.wpnbha.ts-10 .entry-title{line-height:1.1}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}.wpnbha.ts-7 .newspack-post-subtitle,.wpnbha.ts-8 .newspack-post-subtitle,.wpnbha.ts-9 .newspack-post-subtitle,.wpnbha.ts-10 .newspack-post-subtitle{font-size:1.4em}.wpnbha.ts-10 article .entry-title{font-size:2.6em}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}.wpnbha.ts-9 article .entry-title{font-size:2.4em}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}.wpnbha.ts-8 article .entry-title{font-size:2.2em}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}.wpnbha.ts-7 article .entry-title{font-size:2em}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}.wpnbha.ts-6 article .entry-title{font-size:1.7em}.wpnbha.ts-6 article .newspack-post-subtitle{font-size:1.4em}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}.wpnbha.ts-5 article .entry-title{font-size:1.4em}.wpnbha.ts-5 article .newspack-post-subtitle{font-size:1.2em}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}.wpnbha.ts-3 article .entry-title{font-size:1em}.wpnbha.ts-3 article .entry-meta,.wpnbha.ts-3 article .entry-wrapper .more-link,.wpnbha.ts-3 article .entry-wrapper p,.wpnbha.ts-3 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}.wpnbha.ts-1 article .entry-title,.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-right:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-right:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-right:0}}.newspack-post-subtitle--in-homepage-block{margin-top:.3em;margin-bottom:0;line-height:1.4;font-style:italic}amp-script .wpnbha.has-more-button.is-loading button{display:none}amp-script .wpnbha.has-more-button.is-error .error,amp-script .wpnbha.has-more-button.is-error button,amp-script .wpnbha.has-more-button.is-loading .loading{display:block}
|
|
1
|
+
.newspack-preview-label{position:absolute;top:5px;left:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha .post-thumbnail{margin:0 0 .25em}.wpnbha .post-thumbnail img{height:auto;width:100%}.wpnbha .post-thumbnail figcaption{margin-bottom:.5em}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:0;margin-right:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:.5em}.wpnbha .entry-meta .byline:not(:last-child){margin-right:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-right:.5em}.wpnbha p{margin:.5em 0}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;left:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;right:0;text-align:right;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:right}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-left:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links,amp-script .wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label,amp-script .wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a,amp-script .wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover,amp-script .wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors,amp-script .wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author,amp-script .wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child),amp-script .wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos,amp-script .wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}.wpnbha article .entry-title{font-size:1.2em}.wpnbha article .entry-meta{font-size:.8em}.wpnbha article .avatar{height:25px;width:25px}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}.wpnbha.ts-8 .entry-title,.wpnbha.ts-9 .entry-title,.wpnbha.ts-10 .entry-title{line-height:1.1}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}.wpnbha.ts-7 .newspack-post-subtitle,.wpnbha.ts-8 .newspack-post-subtitle,.wpnbha.ts-9 .newspack-post-subtitle,.wpnbha.ts-10 .newspack-post-subtitle{font-size:1.4em}.wpnbha.ts-10 article .entry-title{font-size:2.6em}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}.wpnbha.ts-9 article .entry-title{font-size:2.4em}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}.wpnbha.ts-8 article .entry-title{font-size:2.2em}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}.wpnbha.ts-7 article .entry-title{font-size:2em}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}.wpnbha.ts-6 article .entry-title{font-size:1.7em}.wpnbha.ts-6 article .newspack-post-subtitle{font-size:1.4em}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}.wpnbha.ts-5 article .entry-title{font-size:1.4em}.wpnbha.ts-5 article .newspack-post-subtitle{font-size:1.2em}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}.wpnbha.ts-3 article .entry-title{font-size:1em}.wpnbha.ts-3 article .entry-meta,.wpnbha.ts-3 article .entry-wrapper .more-link,.wpnbha.ts-3 article .entry-wrapper p,.wpnbha.ts-3 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}.wpnbha.ts-1 article .entry-title,.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-right:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-right:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-right:0}}.newspack-post-subtitle--in-homepage-block{margin-top:.3em;margin-bottom:0;line-height:1.4;font-style:italic}amp-script .wpnbha.has-more-button.is-loading button{display:none}amp-script .wpnbha.has-more-button.is-error .error,amp-script .wpnbha.has-more-button.is-error button,amp-script .wpnbha.has-more-button.is-loading .loading{display:block}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.newspack-preview-label{position:absolute;top:5px;right:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha .post-thumbnail{margin:0 0 .25em}.wpnbha .post-thumbnail img{height:auto;width:100%}.wpnbha .post-thumbnail figcaption{margin-bottom:.5em}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:0;margin-left:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:.5em}.wpnbha .entry-meta .byline:not(:last-child){margin-left:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-left:.5em}.wpnbha p{margin:.5em 0}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{bottom:0;right:0;margin:0;overflow:hidden;position:absolute;left:0;top:0}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);bottom:0;content:"";right:0;position:absolute;left:0;top:0;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;right:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;left:0;text-align:left;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:left}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-right:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links,amp-script .wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label,amp-script .wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a,amp-script .wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover,amp-script .wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors,amp-script .wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author,amp-script .wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child),amp-script .wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos,amp-script .wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}.wpnbha article .entry-title{font-size:1.2em}.wpnbha article .entry-meta{font-size:.8em}.wpnbha article .avatar{height:25px;width:25px}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}.wpnbha.ts-8 .entry-title,.wpnbha.ts-9 .entry-title,.wpnbha.ts-10 .entry-title{line-height:1.1}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}.wpnbha.ts-7 .newspack-post-subtitle,.wpnbha.ts-8 .newspack-post-subtitle,.wpnbha.ts-9 .newspack-post-subtitle,.wpnbha.ts-10 .newspack-post-subtitle{font-size:1.4em}.wpnbha.ts-10 article .entry-title{font-size:2.6em}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}.wpnbha.ts-9 article .entry-title{font-size:2.4em}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}.wpnbha.ts-8 article .entry-title{font-size:2.2em}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}.wpnbha.ts-7 article .entry-title{font-size:2em}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}.wpnbha.ts-6 article .entry-title{font-size:1.7em}.wpnbha.ts-6 article .newspack-post-subtitle{font-size:1.4em}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}.wpnbha.ts-5 article .entry-title{font-size:1.4em}.wpnbha.ts-5 article .newspack-post-subtitle{font-size:1.2em}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}.wpnbha.ts-3 article .entry-title{font-size:1em}.wpnbha.ts-3 article .entry-meta,.wpnbha.ts-3 article .entry-wrapper .more-link,.wpnbha.ts-3 article .entry-wrapper p,.wpnbha.ts-3 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}.wpnbha.ts-1 article .entry-title,.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-left:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-left:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-left:0}}.newspack-post-subtitle--in-homepage-block{margin-top:.3em;margin-bottom:0;line-height:1.4;font-style:italic}amp-script .wpnbha.has-more-button.is-loading button{display:none}amp-script .wpnbha.has-more-button.is-error .error,amp-script .wpnbha.has-more-button.is-error button,amp-script .wpnbha.has-more-button.is-loading .loading{display:block}
|
|
1
|
+
.newspack-preview-label{position:absolute;top:5px;right:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha .post-thumbnail{margin:0 0 .25em}.wpnbha .post-thumbnail img{height:auto;width:100%}.wpnbha .post-thumbnail figcaption{margin-bottom:.5em}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:0;margin-left:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta{display:flex;flex-wrap:wrap;align-items:center;margin-top:.5em}.wpnbha .entry-meta .byline:not(:last-child){margin-left:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-left:.5em}.wpnbha p{margin:.5em 0}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;right:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;left:0;text-align:left;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:left}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-right:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links,amp-script .wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label,amp-script .wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a,amp-script .wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover,amp-script .wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors,amp-script .wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author,amp-script .wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child),amp-script .wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos,amp-script .wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}.wpnbha article .entry-title{font-size:1.2em}.wpnbha article .entry-meta{font-size:.8em}.wpnbha article .avatar{height:25px;width:25px}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}.wpnbha.ts-8 .entry-title,.wpnbha.ts-9 .entry-title,.wpnbha.ts-10 .entry-title{line-height:1.1}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}.wpnbha.ts-7 .newspack-post-subtitle,.wpnbha.ts-8 .newspack-post-subtitle,.wpnbha.ts-9 .newspack-post-subtitle,.wpnbha.ts-10 .newspack-post-subtitle{font-size:1.4em}.wpnbha.ts-10 article .entry-title{font-size:2.6em}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}.wpnbha.ts-9 article .entry-title{font-size:2.4em}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}.wpnbha.ts-8 article .entry-title{font-size:2.2em}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}.wpnbha.ts-7 article .entry-title{font-size:2em}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}.wpnbha.ts-6 article .entry-title{font-size:1.7em}.wpnbha.ts-6 article .newspack-post-subtitle{font-size:1.4em}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}.wpnbha.ts-5 article .entry-title{font-size:1.4em}.wpnbha.ts-5 article .newspack-post-subtitle{font-size:1.2em}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}.wpnbha.ts-3 article .entry-title{font-size:1em}.wpnbha.ts-3 article .entry-meta,.wpnbha.ts-3 article .entry-wrapper .more-link,.wpnbha.ts-3 article .entry-wrapper p,.wpnbha.ts-3 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}.wpnbha.ts-1 article .entry-title,.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.8em}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-left:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-left:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-left:0}}.newspack-post-subtitle--in-homepage-block{margin-top:.3em;margin-bottom:0;line-height:1.4;font-style:italic}amp-script .wpnbha.has-more-button.is-loading button{display:none}amp-script .wpnbha.has-more-button.is-error .error,amp-script .wpnbha.has-more-button.is-error button,amp-script .wpnbha.has-more-button.is-loading .loading{display:block}
|
package/dist/modal.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '89b5a69d0fc9f8514a18ce79f563ad07');
|
package/dist/modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@-webkit-keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}.newspack-blocks-checkout-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);z-index:99999}.newspack-blocks-checkout-modal__content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:calc(100vw - 32px);max-width:580px;min-height:200px;max-height:calc(100vh - 32px);background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close){width:100%;height:100%;border:0;border-radius:5px}.newspack-blocks-checkout-modal__spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__spinner>span{width:25px;height:25px;border:2px solid #fff;border-top-color:#767676;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.newspack-blocks-checkout-modal__close{position:absolute;top:0;right:0;padding:8px;border:0;background:transparent;color:#111;cursor:pointer}.newspack-blocks-checkout-modal__close:focus,.newspack-blocks-checkout-modal__close:hover{color:#767676}.newspack-blocks-checkout-modal__close svg{display:block}@media(max-width:600px){.newspack-blocks-checkout-modal__content{max-width:100%;width:100%;border-radius:0;top:auto;bottom:0;left:0;transform:none}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close){border-radius:0}}
|
|
1
|
+
@-webkit-keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}to{transform:rotate(1turn)}}.newspack-blocks-checkout-modal,.newspack-blocks-variation-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.75);z-index:99999}.newspack-blocks-checkout-modal__content,.newspack-blocks-variation-modal__content{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:calc(100vw - 32px);max-width:580px;min-height:200px;max-height:calc(100vh - 32px);background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close),.newspack-blocks-variation-modal__content>:not(.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close){width:100%;height:100%;border:0;border-radius:5px}.newspack-blocks-checkout-modal__spinner,.newspack-blocks-variation-modal__spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__spinner>span,.newspack-blocks-variation-modal__spinner>span{width:25px;height:25px;border:2px solid #fff;border-top-color:#767676;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close{position:absolute;top:0;right:0;padding:8px;border:0;background:transparent;color:#111;cursor:pointer}.newspack-blocks-checkout-modal__close:focus,.newspack-blocks-checkout-modal__close:hover,.newspack-blocks-variation-modal__close:focus,.newspack-blocks-variation-modal__close:hover{color:#767676}.newspack-blocks-checkout-modal__close svg,.newspack-blocks-variation-modal__close svg{display:block}.newspack-blocks-variation-modal__content{padding:32px}.newspack-blocks-variation-modal__content h3{margin:0 0 1em}.newspack-blocks-variation-modal__content p{font-size:.8em}.newspack-blocks-variation-modal__content form{margin:0 0 .5em}.newspack-blocks-variation-modal__content form:last-child{margin:0}.newspack-blocks-variation-modal__content form button{display:block;width:100%;padding:16px;margin:0;border:1px solid #ccc;background:transparent;color:#111;text-align:inherit;font-weight:inherit}.newspack-blocks-variation-modal__content form button>span{display:block}.newspack-blocks-variation-modal__content form button .summary{width:100%;display:flex;justify-content:space-between;align-items:baseline}.newspack-blocks-variation-modal__content form button .variation_name{font-weight:600}.newspack-blocks-variation-modal__content form button .description{padding-top:1em;margin-top:1em;font-size:.9em;border-top:1px solid #ccc}.newspack-blocks-variation-modal__content form button bdi{font-weight:600;font-size:1.8em}@media(max-width:600px){.newspack-blocks-checkout-modal__content,.newspack-blocks-variation-modal__content{max-width:100%;width:100%;border-radius:0;top:auto;bottom:0;left:0;transform:none}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-variation-modal__close,.newspack-blocks-checkout-modal__close),.newspack-blocks-variation-modal__content>:not(.newspack-blocks-variation-modal__close,.newspack-blocks-checkout-modal__close){border-radius:0}}
|
package/dist/modal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.
|
|
1
|
+
(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function o(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.r(t);var r,a;function c(e){var t=e.querySelector("iframe");t&&(t.src="about:blank"),document.body.classList.remove("newspack-modal-checkout-open"),r.disconnect(),e.style.display="none"}a=function(){var e=document.querySelector(".newspack-blocks-checkout-modal");if(e){var t=document.querySelector(".newspack-blocks-checkout-modal__spinner"),n="newspack_modal_checkout",a=document.createElement("input");a.type="hidden",a.name="modal_checkout",a.value="1";var i=e.querySelector(".newspack-blocks-checkout-modal__content"),l=document.createElement("iframe");l.name=n,i.appendChild(l),e.addEventListener("click",(function(t){t.target===e&&c(e)})),e.querySelectorAll(".newspack-blocks-checkout-modal__close").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),c(e)}))}));var d=document.querySelectorAll(".newspack-blocks-variation-modal");d.forEach((function(e){e.addEventListener("click",(function(t){t.target===e&&(e.style.display="none")})),e.querySelectorAll(".newspack-blocks-variation-modal__close").forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),e.style.display="none"}))}))})),document.querySelectorAll(".wpbnbd.wpbnbd--platform-wc,.wp-block-newspack-blocks-checkout-button,.newspack-blocks-variation-modal").forEach((function(c){c.querySelectorAll("form").forEach((function(c){c.appendChild(a.cloneNode()),c.target=n,c.addEventListener("submit",(function(n){var a=new FormData(c);if(d.forEach((function(e){return e.style.display="none"})),a.get("is_variable")&&!a.get("variation_id")){var u=o(d).find((function(e){return e.dataset.productId===a.get("product_id")}));if(u)return n.preventDefault(),void(u.style.display="block")}t.style.display="flex",e.style.display="block",document.body.classList.add("newspack-modal-checkout-open"),r=new ResizeObserver((function(e){if(e&&e.length){var t=e[0].contentRect;t&&(i.style.height=t.top+t.bottom+"px")}})),l.addEventListener("load",(function(){var e=l.contentWindow.location;if(window.newspackReaderActivation&&e.href.indexOf("order-received")>-1){var n=window.newspackReaderActivation,o=new Proxy(new URLSearchParams(e.search),{get:function(e,t){return e.get(t)}});o.email&&(n.setReaderEmail(o.email),n.setAuthenticated(!0))}var a=l.contentWindow.document.querySelector("#newspack_modal_checkout");a&&r.observe(a),t.style.display="none"}))}))}))}))}},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",a):a());var i=window;for(var l in t)i[l]=t[l];t.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
package/dist/modal.rtl.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@-webkit-keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}.newspack-blocks-checkout-modal{position:fixed;top:0;right:0;width:100%;height:100%;background:rgba(0,0,0,.75);z-index:99999}.newspack-blocks-checkout-modal__content{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);width:calc(100vw - 32px);max-width:580px;min-height:200px;max-height:calc(100vh - 32px);background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close){width:100%;height:100%;border:0;border-radius:5px}.newspack-blocks-checkout-modal__spinner{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__spinner>span{width:25px;height:25px;border:2px solid #fff;border-top-color:#767676;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.newspack-blocks-checkout-modal__close{position:absolute;top:0;left:0;padding:8px;border:0;background:transparent;color:#111;cursor:pointer}.newspack-blocks-checkout-modal__close:focus,.newspack-blocks-checkout-modal__close:hover{color:#767676}.newspack-blocks-checkout-modal__close svg{display:block}@media(max-width:600px){.newspack-blocks-checkout-modal__content{max-width:100%;width:100%;border-radius:0;top:auto;bottom:0;right:0;transform:none}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close){border-radius:0}}
|
|
1
|
+
@-webkit-keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(-180deg)}to{transform:rotate(-1turn)}}.newspack-blocks-checkout-modal,.newspack-blocks-variation-modal{position:fixed;top:0;right:0;width:100%;height:100%;background:rgba(0,0,0,.75);z-index:99999}.newspack-blocks-checkout-modal__content,.newspack-blocks-variation-modal__content{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);width:calc(100vw - 32px);max-width:580px;min-height:200px;max-height:calc(100vh - 32px);background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close),.newspack-blocks-variation-modal__content>:not(.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close){width:100%;height:100%;border:0;border-radius:5px}.newspack-blocks-checkout-modal__spinner,.newspack-blocks-variation-modal__spinner{position:absolute;top:50%;right:50%;transform:translate(50%,-50%);width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:5px}.newspack-blocks-checkout-modal__spinner>span,.newspack-blocks-variation-modal__spinner>span{width:25px;height:25px;border:2px solid #fff;border-top-color:#767676;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.newspack-blocks-checkout-modal__close,.newspack-blocks-variation-modal__close{position:absolute;top:0;left:0;padding:8px;border:0;background:transparent;color:#111;cursor:pointer}.newspack-blocks-checkout-modal__close:focus,.newspack-blocks-checkout-modal__close:hover,.newspack-blocks-variation-modal__close:focus,.newspack-blocks-variation-modal__close:hover{color:#767676}.newspack-blocks-checkout-modal__close svg,.newspack-blocks-variation-modal__close svg{display:block}.newspack-blocks-variation-modal__content{padding:32px}.newspack-blocks-variation-modal__content h3{margin:0 0 1em}.newspack-blocks-variation-modal__content p{font-size:.8em}.newspack-blocks-variation-modal__content form{margin:0 0 .5em}.newspack-blocks-variation-modal__content form:last-child{margin:0}.newspack-blocks-variation-modal__content form button{display:block;width:100%;padding:16px;margin:0;border:1px solid #ccc;background:transparent;color:#111;text-align:inherit;font-weight:inherit}.newspack-blocks-variation-modal__content form button>span{display:block}.newspack-blocks-variation-modal__content form button .summary{width:100%;display:flex;justify-content:space-between;align-items:baseline}.newspack-blocks-variation-modal__content form button .variation_name{font-weight:600}.newspack-blocks-variation-modal__content form button .description{padding-top:1em;margin-top:1em;font-size:.9em;border-top:1px solid #ccc}.newspack-blocks-variation-modal__content form button bdi{font-weight:600;font-size:1.8em}@media(max-width:600px){.newspack-blocks-checkout-modal__content,.newspack-blocks-variation-modal__content{max-width:100%;width:100%;border-radius:0;top:auto;bottom:0;right:0;transform:none}.newspack-blocks-checkout-modal__content>:not(.newspack-blocks-variation-modal__close,.newspack-blocks-checkout-modal__close),.newspack-blocks-variation-modal__content>:not(.newspack-blocks-variation-modal__close,.newspack-blocks-checkout-modal__close){border-radius:0}}
|
|
@@ -20,12 +20,20 @@ final class Modal_Checkout {
|
|
|
20
20
|
*/
|
|
21
21
|
private static $has_modal = false;
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Products that are being rendered a checkout modal for.
|
|
25
|
+
*
|
|
26
|
+
* @var true[] Product IDs as keys.
|
|
27
|
+
*/
|
|
28
|
+
private static $products = [];
|
|
29
|
+
|
|
23
30
|
/**
|
|
24
31
|
* Initialize hooks.
|
|
25
32
|
*/
|
|
26
33
|
public static function init() {
|
|
27
34
|
add_action( 'template_redirect', [ __CLASS__, 'process_checkout_request' ] );
|
|
28
35
|
add_action( 'wp_footer', [ __CLASS__, 'render_modal_markup' ], 100 );
|
|
36
|
+
add_action( 'wp_footer', [ __CLASS__, 'render_variation_selection' ], 100 );
|
|
29
37
|
add_action( 'wp_enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
|
30
38
|
add_filter( 'show_admin_bar', [ __CLASS__, 'show_admin_bar' ] );
|
|
31
39
|
add_action( 'template_include', [ __CLASS__, 'get_checkout_template' ] );
|
|
@@ -41,9 +49,13 @@ final class Modal_Checkout {
|
|
|
41
49
|
public static function process_checkout_request() {
|
|
42
50
|
$is_newspack_checkout = filter_input( INPUT_GET, 'newspack_checkout', FILTER_SANITIZE_NUMBER_INT );
|
|
43
51
|
$product_id = filter_input( INPUT_GET, 'product_id', FILTER_SANITIZE_NUMBER_INT );
|
|
52
|
+
$variation_id = filter_input( INPUT_GET, 'variation_id', FILTER_SANITIZE_NUMBER_INT );
|
|
44
53
|
if ( ! $is_newspack_checkout || ! $product_id ) {
|
|
45
54
|
return;
|
|
46
55
|
}
|
|
56
|
+
if ( $variation_id ) {
|
|
57
|
+
$product_id = $variation_id;
|
|
58
|
+
}
|
|
47
59
|
|
|
48
60
|
\WC()->cart->empty_cart();
|
|
49
61
|
|
|
@@ -162,6 +174,58 @@ final class Modal_Checkout {
|
|
|
162
174
|
<?php
|
|
163
175
|
}
|
|
164
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Render variation selection modal for variable products.
|
|
179
|
+
*/
|
|
180
|
+
public static function render_variation_selection() {
|
|
181
|
+
$products = array_keys( self::$products );
|
|
182
|
+
foreach ( $products as $product_id ) {
|
|
183
|
+
$product = wc_get_product( $product_id );
|
|
184
|
+
if ( ! $product->is_type( 'variable' ) ) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
?>
|
|
188
|
+
<div class="newspack-blocks-variation-modal" data-product-id="<?php echo esc_attr( $product_id ); ?>" style="display:none;">
|
|
189
|
+
<div class="newspack-blocks-variation-modal__content">
|
|
190
|
+
<a href="#" class="newspack-blocks-variation-modal__close">
|
|
191
|
+
<span class="screen-reader-text"><?php esc_html_e( 'Close', 'newspack-blocks' ); ?></span>
|
|
192
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false">
|
|
193
|
+
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/>
|
|
194
|
+
</svg>
|
|
195
|
+
</a>
|
|
196
|
+
<div class="newspack-blocks-variation-modal__selection" data-product-id="<?php echo esc_attr( $product_id ); ?>">
|
|
197
|
+
<h3><?php echo esc_html( $product->get_name() ); ?></h3>
|
|
198
|
+
<p><?php esc_html_e( 'Select an option below:', 'newspack-blocks' ); ?></p>
|
|
199
|
+
<?php
|
|
200
|
+
$variations = $product->get_available_variations( 'objects' );
|
|
201
|
+
foreach ( $variations as $variation ) {
|
|
202
|
+
$name = $variation->get_formatted_variation_attributes( true );
|
|
203
|
+
$price = $variation->get_price_html();
|
|
204
|
+
$description = $variation->get_variation_description();
|
|
205
|
+
?>
|
|
206
|
+
<form>
|
|
207
|
+
<input type="hidden" name="newspack_checkout" value="1" />
|
|
208
|
+
<input type="hidden" name="product_id" value="<?php echo esc_attr( $variation->get_id() ); ?>" />
|
|
209
|
+
<button>
|
|
210
|
+
<span class="summary">
|
|
211
|
+
<span class="price"><?php echo $price; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span>
|
|
212
|
+
<span class="variation_name"><?php echo esc_html( $name ); ?></span>
|
|
213
|
+
</span>
|
|
214
|
+
<?php if ( ! empty( $description ) ) : ?>
|
|
215
|
+
<span class="description"><?php echo esc_html( $description ); ?></span>
|
|
216
|
+
<?php endif; ?>
|
|
217
|
+
</button>
|
|
218
|
+
</form>
|
|
219
|
+
<?php
|
|
220
|
+
}
|
|
221
|
+
?>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
<?php
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
165
229
|
/**
|
|
166
230
|
* Enqueue scripts for the checkout page rendered in a modal.
|
|
167
231
|
*/
|
|
@@ -189,9 +253,14 @@ final class Modal_Checkout {
|
|
|
189
253
|
|
|
190
254
|
/**
|
|
191
255
|
* Enqueue script for triggering modal checkout.
|
|
256
|
+
*
|
|
257
|
+
* @param int $product_id Product ID (optional).
|
|
192
258
|
*/
|
|
193
|
-
public static function enqueue_modal() {
|
|
259
|
+
public static function enqueue_modal( $product_id = null ) {
|
|
194
260
|
self::$has_modal = true;
|
|
261
|
+
if ( ! empty( $product_id ) ) {
|
|
262
|
+
self::$products[ $product_id ] = true;
|
|
263
|
+
}
|
|
195
264
|
wp_enqueue_script(
|
|
196
265
|
'newspack-blocks-modal',
|
|
197
266
|
plugins_url( 'dist/modal.js', \NEWSPACK_BLOCKS__PLUGIN_FILE ),
|
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.blog/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 1.
|
|
10
|
+
* Version: 1.69.0-alpha.2
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '1.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '1.69.0-alpha.2' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/newspack-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.69.0-alpha.2",
|
|
4
4
|
"author": "Automattic",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@rushstack/eslint-patch": "^1.
|
|
6
|
+
"@rushstack/eslint-patch": "^1.3.0",
|
|
7
7
|
"@testing-library/dom": "^8.20.0",
|
|
8
8
|
"@testing-library/user-event": "^14.4.3",
|
|
9
9
|
"@types/lodash": "^4.14.194",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
"newspack-scripts": "^5.1.0",
|
|
17
17
|
"postcss-scss": "^4.0.6",
|
|
18
18
|
"prettier": "npm:wp-prettier@^2.6.2-beta-1",
|
|
19
|
-
"stylelint": "^15.2
|
|
19
|
+
"stylelint": "^15.6.2"
|
|
20
20
|
},
|
|
21
21
|
"description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@stripe/stripe-js": "^1.
|
|
23
|
+
"@stripe/stripe-js": "^1.53.0",
|
|
24
24
|
"classnames": "^2.3.2",
|
|
25
25
|
"lodash": "^4.17.21",
|
|
26
26
|
"newspack-components": "^2.1.0",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"redux": "^4.2.1",
|
|
29
29
|
"redux-saga": "^1.2.3",
|
|
30
30
|
"regenerator-runtime": "^0.13.11",
|
|
31
|
-
"swiper": "9.3.
|
|
31
|
+
"swiper": "9.3.2"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"cm": "newspack-scripts commit",
|
|
@@ -57,10 +57,7 @@ div.wp-block-columns {
|
|
|
57
57
|
&::after {
|
|
58
58
|
border-right-width: 1px;
|
|
59
59
|
border-top-width: 0;
|
|
60
|
-
|
|
61
|
-
left: auto;
|
|
62
|
-
right: -32px;
|
|
63
|
-
top: 0;
|
|
60
|
+
inset: 0 -32px 0 auto;
|
|
64
61
|
}
|
|
65
62
|
}
|
|
66
63
|
}
|
|
@@ -86,10 +83,7 @@ div.wp-block-columns {
|
|
|
86
83
|
&::after {
|
|
87
84
|
border-right-width: 1px;
|
|
88
85
|
border-top-width: 0;
|
|
89
|
-
|
|
90
|
-
left: auto;
|
|
91
|
-
right: -20px;
|
|
92
|
-
top: 0;
|
|
86
|
+
inset: 0 -20px 0 auto;
|
|
93
87
|
|
|
94
88
|
@include mixins.media( tablet ) {
|
|
95
89
|
right: -32px;
|
|
@@ -20,7 +20,9 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
PanelBody,
|
|
22
22
|
BaseControl,
|
|
23
|
+
CheckboxControl,
|
|
23
24
|
TextControl,
|
|
25
|
+
SelectControl,
|
|
24
26
|
FormTokenField,
|
|
25
27
|
Button,
|
|
26
28
|
Spinner,
|
|
@@ -33,6 +35,23 @@ import apiFetch from '@wordpress/api-fetch';
|
|
|
33
35
|
*/
|
|
34
36
|
import './edit.scss';
|
|
35
37
|
|
|
38
|
+
function getVariationName( variation ) {
|
|
39
|
+
const attributes = [];
|
|
40
|
+
for ( const attribute of variation.attributes ) {
|
|
41
|
+
attributes.push( attribute.name + ': ' + attribute.option );
|
|
42
|
+
}
|
|
43
|
+
return attributes.join( ', ' );
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function getNYP( product ) {
|
|
47
|
+
return {
|
|
48
|
+
isNYP: product?.meta_data?.some( meta => meta.key === '_nyp' && meta.value === 'yes' ),
|
|
49
|
+
suggestedPrice: product?.meta_data?.find( meta => meta.key === '_suggested_price' )?.value,
|
|
50
|
+
minPrice: product?.meta_data?.find( meta => meta.key === '_min_price' )?.value,
|
|
51
|
+
maxPrice: product?.meta_data?.find( meta => meta.key === '_maximum_price' )?.value,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
36
55
|
function ProductControl( props ) {
|
|
37
56
|
const [ inFlight, setInFlight ] = useState( false );
|
|
38
57
|
const [ suggestions, setSuggestions ] = useState( {} );
|
|
@@ -106,6 +125,7 @@ function ProductControl( props ) {
|
|
|
106
125
|
{ selected.name }
|
|
107
126
|
</Button>
|
|
108
127
|
</BaseControl>
|
|
128
|
+
{ props.children }
|
|
109
129
|
</>
|
|
110
130
|
) : (
|
|
111
131
|
<>
|
|
@@ -135,22 +155,48 @@ function ProductControl( props ) {
|
|
|
135
155
|
|
|
136
156
|
function CheckoutButtonEdit( props ) {
|
|
137
157
|
const { attributes, setAttributes, className } = props;
|
|
138
|
-
const { placeholder, style, text, product, price } = attributes;
|
|
158
|
+
const { placeholder, style, text, product, price, variation } = attributes;
|
|
139
159
|
|
|
160
|
+
const [ productData, setProductData ] = useState( {} );
|
|
161
|
+
const [ variations, setVariations ] = useState( [] );
|
|
140
162
|
const [ nyp, setNYP ] = useState( false );
|
|
163
|
+
|
|
141
164
|
function handleProduct( data ) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
165
|
+
setProductData( data );
|
|
166
|
+
|
|
167
|
+
// Handle product variation data.
|
|
168
|
+
if ( data?.variations?.length ) {
|
|
169
|
+
setAttributes( { is_variable: true } );
|
|
170
|
+
apiFetch( { path: `/wc/v2/products/${ data.id }/variations` } )
|
|
171
|
+
.then( res => setVariations( res ) )
|
|
172
|
+
.catch( () => setVariations( [] ) );
|
|
173
|
+
} else {
|
|
174
|
+
setAttributes( { is_variable: false } );
|
|
175
|
+
setVariations( [] );
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Handle NYP data.
|
|
179
|
+
if ( ! variation ) {
|
|
180
|
+
setNYP( getNYP( data ) );
|
|
151
181
|
}
|
|
152
182
|
}
|
|
153
183
|
|
|
184
|
+
useEffect( () => {
|
|
185
|
+
if ( variation ) {
|
|
186
|
+
apiFetch( { path: `/wc/v2/products/${ product }/variations/${ variation }` } )
|
|
187
|
+
.then( res => setNYP( getNYP( res ) ) )
|
|
188
|
+
.catch( () => setNYP( {} ) );
|
|
189
|
+
} else {
|
|
190
|
+
setNYP( getNYP( productData ) );
|
|
191
|
+
}
|
|
192
|
+
}, [ variation ] );
|
|
193
|
+
|
|
194
|
+
useEffect( () => {
|
|
195
|
+
if ( ! price && nyp?.suggestedPrice ) {
|
|
196
|
+
setAttributes( { price: nyp.suggestedPrice } );
|
|
197
|
+
}
|
|
198
|
+
}, [ nyp ] );
|
|
199
|
+
|
|
154
200
|
function setButtonText( newText ) {
|
|
155
201
|
// Remove anchor tags from button text content.
|
|
156
202
|
setAttributes( { text: newText.replace( /<\/?a[^>]*>/g, '' ) } );
|
|
@@ -200,9 +246,50 @@ function CheckoutButtonEdit( props ) {
|
|
|
200
246
|
<ProductControl
|
|
201
247
|
value={ product }
|
|
202
248
|
price={ price }
|
|
203
|
-
onChange={ value => setAttributes( { product: value } ) }
|
|
249
|
+
onChange={ value => setAttributes( { product: value, variation: '', price: '' } ) }
|
|
204
250
|
onProduct={ handleProduct }
|
|
205
|
-
|
|
251
|
+
>
|
|
252
|
+
{ productData?.variations?.length > 0 && (
|
|
253
|
+
<>
|
|
254
|
+
<CheckboxControl
|
|
255
|
+
label={ __(
|
|
256
|
+
'Allow the reader to select the variation before checkout.',
|
|
257
|
+
'newspack-blocks'
|
|
258
|
+
) }
|
|
259
|
+
checked={ ! variation }
|
|
260
|
+
onChange={ value =>
|
|
261
|
+
setAttributes( {
|
|
262
|
+
variation: value ? '' : variations[ 0 ].id.toString(),
|
|
263
|
+
price: '',
|
|
264
|
+
} )
|
|
265
|
+
}
|
|
266
|
+
/>
|
|
267
|
+
{ variations.length ? (
|
|
268
|
+
<SelectControl
|
|
269
|
+
label={ __( 'Variation', 'newspack-blocks' ) }
|
|
270
|
+
help={ __(
|
|
271
|
+
'Select the product variation to be added to cart.',
|
|
272
|
+
'newspack-blocks'
|
|
273
|
+
) }
|
|
274
|
+
value={ variation }
|
|
275
|
+
disabled={ ! variation }
|
|
276
|
+
options={ [
|
|
277
|
+
{ label: '--', value: '' },
|
|
278
|
+
...variations.map( item => ( {
|
|
279
|
+
label: getVariationName( item ),
|
|
280
|
+
value: item.id,
|
|
281
|
+
} ) ),
|
|
282
|
+
] }
|
|
283
|
+
onChange={ value =>
|
|
284
|
+
setAttributes( { variation: value.toString(), price: '' } )
|
|
285
|
+
}
|
|
286
|
+
/>
|
|
287
|
+
) : (
|
|
288
|
+
<Spinner />
|
|
289
|
+
) }
|
|
290
|
+
</>
|
|
291
|
+
) }
|
|
292
|
+
</ProductControl>
|
|
206
293
|
</PanelBody>
|
|
207
294
|
{ nyp?.isNYP && (
|
|
208
295
|
<PanelBody title={ __( 'Name Your Price', 'newspack-blocks' ) }>
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '@wordpress/block-editor';
|
|
17
17
|
|
|
18
18
|
export default function save( { attributes, className } ) {
|
|
19
|
-
const { textAlign, fontSize, style, text, product, price } = attributes;
|
|
19
|
+
const { textAlign, fontSize, style, text, product, price, variation, is_variable } = attributes;
|
|
20
20
|
|
|
21
21
|
if ( ! text || ! product ) {
|
|
22
22
|
return null;
|
|
@@ -58,6 +58,8 @@ export default function save( { attributes, className } ) {
|
|
|
58
58
|
<input type="hidden" name="product_id" value={ product } />
|
|
59
59
|
<input type="hidden" name="newspack_checkout" value="1" />
|
|
60
60
|
{ price && <input type="hidden" name="price" value={ price } /> }
|
|
61
|
+
{ variation && <input type="hidden" name="variation_id" value={ variation } /> }
|
|
62
|
+
{ is_variable && <input type="hidden" name="is_variable" value="1" /> }
|
|
61
63
|
</form>
|
|
62
64
|
</div>
|
|
63
65
|
);
|
|
@@ -29,7 +29,14 @@ add_action( 'init', __NAMESPACE__ . '\\register_block' );
|
|
|
29
29
|
* @return string
|
|
30
30
|
*/
|
|
31
31
|
function render_callback( $attributes, $content ) {
|
|
32
|
-
|
|
32
|
+
if ( empty( $attributes['product'] ) ) {
|
|
33
|
+
return '';
|
|
34
|
+
}
|
|
35
|
+
$product_id = $attributes['product'];
|
|
36
|
+
if ( $attributes['is_variable'] && ! empty( $attributes['variation'] ) ) {
|
|
37
|
+
$product_id = $attributes['variation'];
|
|
38
|
+
}
|
|
39
|
+
\Newspack_Blocks\Modal_Checkout::enqueue_modal( $product_id );
|
|
33
40
|
\Newspack_Blocks::enqueue_view_assets( 'checkout-button' );
|
|
34
41
|
return $content;
|
|
35
42
|
}
|
|
@@ -115,13 +115,10 @@
|
|
|
115
115
|
+ .freq-label {
|
|
116
116
|
&::after {
|
|
117
117
|
box-sizing: content-box;
|
|
118
|
-
bottom: 0.19rem;
|
|
119
118
|
content: '';
|
|
120
119
|
display: block;
|
|
121
|
-
|
|
120
|
+
inset: 0.19rem;
|
|
122
121
|
position: absolute;
|
|
123
|
-
right: 0.19rem;
|
|
124
|
-
top: 0.19rem;
|
|
125
122
|
z-index: -1;
|
|
126
123
|
}
|
|
127
124
|
&:hover {
|
|
@@ -307,13 +307,10 @@
|
|
|
307
307
|
position: relative;
|
|
308
308
|
|
|
309
309
|
.post-thumbnail {
|
|
310
|
-
|
|
311
|
-
left: 0;
|
|
310
|
+
inset: 0;
|
|
312
311
|
margin: 0;
|
|
313
312
|
overflow: hidden;
|
|
314
313
|
position: absolute;
|
|
315
|
-
right: 0;
|
|
316
|
-
top: 0;
|
|
317
314
|
|
|
318
315
|
img {
|
|
319
316
|
height: 100% !important;
|
|
@@ -325,12 +322,9 @@
|
|
|
325
322
|
|
|
326
323
|
&::after {
|
|
327
324
|
background: rgba( 0, 0, 0, 0.5 );
|
|
328
|
-
bottom: 0;
|
|
329
325
|
content: '';
|
|
330
|
-
|
|
326
|
+
inset: 0;
|
|
331
327
|
position: absolute;
|
|
332
|
-
right: 0;
|
|
333
|
-
top: 0;
|
|
334
328
|
z-index: 1;
|
|
335
329
|
}
|
|
336
330
|
}
|