Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve story page background media with image srcset, reduced image size, and a11y text #3006

Merged
merged 15 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions assets/src/stories-editor/blocks/amp-story-page/deprecated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
/**
* External dependencies
*/
import PropTypes from 'prop-types';

/**
* WordPress dependencies
*/
import { InnerBlocks } from '@wordpress/block-editor';

/**
* Internal dependencies
*/
import {
addBackgroundColorToOverlay,
} from '../../helpers';
import {
IMAGE_BACKGROUND_TYPE,
VIDEO_BACKGROUND_TYPE,
} from '../../constants';

const blockAttributes = {
anchor: {
source: 'attribute',
selector: 'amp-story-page',
attribute: 'id',
},
mediaAlt: {
type: 'string',
},
mediaId: {
type: 'number',
},
mediaUrl: {
type: 'string',
source: 'attribute',
selector: 'amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',
attribute: 'src',
},
mediaType: {
type: 'string',
},
poster: {
type: 'string',
},
focalPoint: {
type: 'object',
},
autoAdvanceAfter: {
type: 'string',
},
autoAdvanceAfterDuration: {
type: 'number',
},
autoAdvanceAfterMedia: {
type: 'string',
},
backgroundColors: {
default: '[]',
},
overlayOpacity: {
default: 100,
},
};

const SaveV120 = ( { attributes } ) => {
const {
anchor,
focalPoint,
overlayOpacity,
mediaUrl,
mediaType,
poster,
autoAdvanceAfter,
autoAdvanceAfterDuration,
autoAdvanceAfterMedia,
} = attributes;

const backgroundColors = JSON.parse( attributes.backgroundColors );

let advanceAfter;

if ( [ 'auto', 'time' ].includes( autoAdvanceAfter ) && autoAdvanceAfterDuration ) {
advanceAfter = parseInt( autoAdvanceAfterDuration ) + 's';
} else if ( 'media' === autoAdvanceAfter ) {
advanceAfter = autoAdvanceAfterMedia;
}

let overlayStyle = {};
if ( 0 < backgroundColors.length ) {
overlayStyle = addBackgroundColorToOverlay( overlayStyle, backgroundColors );
overlayStyle.opacity = overlayOpacity / 100;
}

const imgStyle = {
objectPosition: IMAGE_BACKGROUND_TYPE === mediaType && focalPoint ? `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%` : 'initial',
};

return (
<amp-story-page style={ { backgroundColor: '#ffffff' } } id={ anchor } auto-advance-after={ advanceAfter }>
{
mediaUrl && (
<amp-story-grid-layer template="fill">
{ IMAGE_BACKGROUND_TYPE === mediaType && (
<amp-img layout="fill" src={ mediaUrl } style={ imgStyle } />
) }
{ VIDEO_BACKGROUND_TYPE === mediaType && (
<amp-video layout="fill" src={ mediaUrl } poster={ poster } muted autoplay loop />
) }
</amp-story-grid-layer>
)
}
<amp-story-grid-layer template="fill" style={ overlayStyle }></amp-story-grid-layer>
<InnerBlocks.Content />
</amp-story-page>
);
};

SaveV120.propTypes = {
attributes: PropTypes.shape( {
anchor: PropTypes.string,
backgroundColors: PropTypes.string,
mediaAlt: PropTypes.string,
mediaId: PropTypes.number,
mediaType: PropTypes.string,
mediaUrl: PropTypes.string,
focalPoint: PropTypes.shape( {
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
} ),
overlayOpacity: PropTypes.number,
poster: PropTypes.string,
autoAdvanceAfter: PropTypes.string,
autoAdvanceAfterDuration: PropTypes.number,
autoAdvanceAfterMedia: PropTypes.string,
} ).isRequired,
};

export default [
{
attributes: {
...blockAttributes,
deprecated: {
default: '1.2.0',
},
},
save: SaveV120,
},
];
5 changes: 4 additions & 1 deletion assets/src/stories-editor/blocks/amp-story-page/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class PageEdit extends Component {
mediaUrl: undefined,
mediaId: undefined,
mediaType: undefined,
mediaAlt: undefined,
poster: undefined,
}
);
Expand Down Expand Up @@ -134,13 +135,15 @@ class PageEdit extends Component {
mediaType = media.type;
}

const mediaUrl = has( media, [ 'sizes', MAX_IMAGE_SIZE_SLUG, 'url' ] ) ? media.sizes[ MAX_IMAGE_SIZE_SLUG ].url : media.url;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kienstra This appears no longer to be necessary when the srcset is present.

Originated in 0bd76bc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that makes sense.

const mediaAlt = media.alt || media.title;
const mediaUrl = media.url;
const poster = VIDEO_BACKGROUND_TYPE === mediaType && media.image && media.image.src !== media.icon ? media.image.src : undefined;

this.props.setAttributes( {
mediaUrl,
mediaId: media.id,
mediaType,
mediaAlt,
poster,
} );
}
Expand Down
8 changes: 7 additions & 1 deletion assets/src/stories-editor/blocks/amp-story-page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createBlock, getBlockAttributes } from '@wordpress/blocks';
/**
* Internal dependencies
*/
import deprecated from './deprecated';
import edit from './edit';
import save from './save';
import blockIcon from '../../../../images/amp-story-page-icon.svg';
Expand All @@ -25,12 +26,15 @@ const schema = {
mediaUrl: {
type: 'string',
source: 'attribute',
selector: 'amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',
selector: 'amp-story-grid-layer[template="fill"] > img, amp-story-grid-layer[template="fill"] > amp-img, amp-story-grid-layer[template="fill"] > amp-video',
attribute: 'src',
},
mediaType: {
type: 'string',
},
mediaAlt: {
type: 'string',
},
poster: {
type: 'string',
},
Expand Down Expand Up @@ -80,6 +84,8 @@ export const settings = {

save,

deprecated,

transforms: {
from: [
{
Expand Down
17 changes: 12 additions & 5 deletions assets/src/stories-editor/blocks/amp-story-page/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ const PageSave = ( { attributes } ) => {
anchor,
focalPoint,
overlayOpacity,
mediaId,
mediaUrl,
mediaType,
mediaAlt,
poster,
autoAdvanceAfter,
autoAdvanceAfterDuration,
Expand All @@ -43,20 +45,24 @@ const PageSave = ( { attributes } ) => {
overlayStyle.opacity = overlayOpacity / 100;
}

const imgStyle = {
objectPosition: IMAGE_BACKGROUND_TYPE === mediaType && focalPoint ? `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%` : 'initial',
};
const objectPosition = IMAGE_BACKGROUND_TYPE === mediaType && focalPoint ? `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%` : 'initial';

return (
<amp-story-page style={ { backgroundColor: '#ffffff' } } id={ anchor } auto-advance-after={ advanceAfter }>
{
mediaUrl && (
<amp-story-grid-layer template="fill">
{ IMAGE_BACKGROUND_TYPE === mediaType && (
<amp-img layout="fill" src={ mediaUrl } style={ imgStyle } />
<img
layout="fill"
src={ mediaUrl }
alt={ mediaAlt }
className={ mediaId ? `wp-image-${ mediaId }` : null }
object-position={ objectPosition }
/>
) }
{ VIDEO_BACKGROUND_TYPE === mediaType && (
<amp-video layout="fill" src={ mediaUrl } poster={ poster } muted autoplay loop />
<amp-video layout="fill" aria-label={ mediaAlt } src={ mediaUrl } poster={ poster } muted autoplay loop />
) }
</amp-story-grid-layer>
)
Expand All @@ -73,6 +79,7 @@ PageSave.propTypes = {
backgroundColors: PropTypes.string,
mediaId: PropTypes.number,
mediaType: PropTypes.string,
mediaAlt: PropTypes.string,
mediaUrl: PropTypes.string,
focalPoint: PropTypes.shape( {
x: PropTypes.number.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion includes/admin/class-amp-story-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AMP_Story_Templates {
*
* @var string
*/
const STORY_TEMPLATES_VERSION = '0.3.5';
const STORY_TEMPLATES_VERSION = '0.3.6';

/**
* Slug for templates' taxonomy.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-amp-story-media.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static function init() {
add_image_size( self::STORY_LANDSCAPE_IMAGE_SIZE, self::STORY_LARGE_IMAGE_DIMENSION, self::STORY_SMALL_IMAGE_DIMENSION, true );

// The default image size for AMP Story image block and background media image.
add_image_size( self::MAX_IMAGE_SIZE_SLUG, 99999, 1440 );
add_image_size( self::MAX_IMAGE_SIZE_SLUG, 99999, 1280 );

// Include additional story image sizes in Schema.org metadata.
add_filter( 'amp_schemaorg_metadata', [ __CLASS__, 'filter_schemaorg_metadata_images' ], 100 );
Expand Down
2 changes: 2 additions & 0 deletions includes/class-amp-story-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ public static function filter_kses_allowed_html( $allowed_tags ) {
'amp-story-cta-layer',
'amp-img',
'amp-video',
'img',
];
foreach ( $story_components as $story_component ) {
$attributes = array_fill_keys( array_keys( AMP_Allowed_Tags_Generated::get_allowed_attributes() ), true );
Expand All @@ -631,6 +632,7 @@ public static function filter_kses_allowed_html( $allowed_tags ) {
$allowed_tag['data-block-name'] = true;
$allowed_tag['data-temp-style-hash'] = true;
$allowed_tag['layout'] = true;
$allowed_tag['object-position'] = true;
}

return $allowed_tags;
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/fandom-cta.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","backgroundColors":"[{}]"} -->
<amp-story-page style="background-color:#ffffff" id="150fd056-a21a-4273-962b-59e2ea7e778c" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-cta.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="opacity:1"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="150fd056-a21a-4273-962b-59e2ea7e778c" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-cta.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="opacity:1"></amp-story-grid-layer>
<!-- wp:amp/amp-story-text {"tagName":"h2","align":"center","customTextColor":"#ffffff","autoFontSize":23,"positionTop":46,"positionLeft":8,"height":94,"width":275} -->
<h2 style="color:#ffffff;text-align:center;display:flex" class="wp-block-amp-amp-story-text has-text-color"><amp-fit-text layout="flex-item" class="amp-text-content">Check your knowledge in Game of Thrones fan-made Trivia!</amp-fit-text></h2>
<!-- /wp:amp/amp-story-text -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/fandom-fact-text.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","autoAdvanceAfterDuration":0,"backgroundColors":"[{\u0022color\u0022:\u0022#363535\u0022},{\u0022color\u0022:\u0022#000000\u0022}]","overlayOpacity":65} -->
<amp-story-page style="background-color:#ffffff" id="97d16098-bfcd-4499-9a85-40fb8076f0a1" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-fact.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #363535, #000000);opacity:0.65"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="97d16098-bfcd-4499-9a85-40fb8076f0a1" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-fact.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #363535, #000000);opacity:0.65"></amp-story-grid-layer>
<!-- wp:amp/amp-story-text {"type":"p","customTextColor":"#ffffff","autoFontSize":10,"positionTop":10,"height":30,"width":40} -->
<p style="color:#ffffff;display:flex" class="wp-block-amp-amp-story-text has-text-color"><amp-fit-text layout="flex-item" class="amp-text-content">FACT</amp-fit-text></p>
<!-- /wp:amp/amp-story-text -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/fandom-fact.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","backgroundColors":"[{}]"} -->
<amp-story-page style="background-color:#ffffff" id="97d16098-bfcd-4499-9a85-40fb8076f0a1" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-fact.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="opacity:1"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="97d16098-bfcd-4499-9a85-40fb8076f0a1" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-fact.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="opacity:1"></amp-story-grid-layer>
<!-- wp:amp/amp-story-text {"type":"p","customTextColor":"#ffffff","autoFontSize":10,"positionTop":10,"height":30,"width":40} -->
<p style="color:#ffffff;display:flex" class="wp-block-amp-amp-story-text has-text-color"><amp-fit-text layout="flex-item" class="amp-text-content">FACT</amp-fit-text></p>
<!-- /wp:amp/amp-story-text -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/fandom-intro.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<!-- wp:amp/amp-story-page {"mediaType":"image"} -->
<amp-story-page style="background-color:#ffffff" id="2b00d8e6-5788-41a1-b7cf-d742b60306bd" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/intro-bg.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="2b00d8e6-5788-41a1-b7cf-d742b60306bd" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/intro-bg.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill"></amp-story-grid-layer>
<!-- wp:image {"width":322,"height":200,"positionTop":63.29,"positionLeft":0.91} -->
<figure class="wp-block-image is-resized"><img src="AMP_STORY_TEMPLATES_URL/got-logo.png" alt="" width="322" height="200"/></figure>
<!-- /wp:image -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/fandom-title.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","backgroundColors":"[{\u0022color\u0022:\u0022#313131\u0022}]","overlayOpacity":55} -->
<amp-story-page style="background-color:#ffffff" id="038df815-5dc9-4105-bbca-77242ca79085" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-title.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-color:#313131;opacity:0.55"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="038df815-5dc9-4105-bbca-77242ca79085" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/fandom-title.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-color:#313131;opacity:0.55"></amp-story-grid-layer>
<!-- wp:amp/amp-story-text {"type":"p","className":"is-style-rounded","customTextColor":"#ffffff","customBackgroundColor":"#e44240","autoFontSize":10,"positionTop":52.26,"positionLeft":6.1,"height":30,"width":111} -->
<p style="background-color:rgba(228, 66, 64, 1);color:#ffffff;display:flex" class="wp-block-amp-amp-story-text is-style-rounded has-text-color has-background is-style-rounded"><amp-fit-text layout="flex-item" class="amp-text-content">SPOILERS ALERT</amp-fit-text></p>
<!-- /wp:amp/amp-story-text -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/quote.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","autoAdvanceAfterDuration":0,"backgroundColors":"[{\u0022color\u0022:\u0022#8c58e3\u0022},{\u0022color\u0022:\u0022#fff9e5\u0022}]"} -->
<amp-story-page style="background-color:#ffffff" id="5da957b0-ee47-4f6c-9eff-79dd82e13f26" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/quote-bg.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #8c58e3, #fff9e5);opacity:1"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="5da957b0-ee47-4f6c-9eff-79dd82e13f26" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/quote-bg.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #8c58e3, #fff9e5);opacity:1"></amp-story-grid-layer>

<!-- wp:image {"width":322,"height":200,"positionTop":63.29,"positionLeft":0.91} -->
<figure class="wp-block-image is-resized"><img src="AMP_STORY_TEMPLATES_URL/quote-image.png" alt="" width="322" height="200"/></figure>
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/title-page.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","autoAdvanceAfterDuration":0,"backgroundColors":"[{},{\u0022color\u0022:\u0022#313a43\u0022}]","overlayOpacity":40} -->
<amp-story-page style="background-color:#ffffff" id="24dd0b58-9125-47ce-ad42-c2a80c2eeb3a" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/title-bg.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, transparent, #313a43);opacity:0.4"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="24dd0b58-9125-47ce-ad42-c2a80c2eeb3a" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/title-bg.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, transparent, #313a43);opacity:0.4"></amp-story-grid-layer>
<!-- wp:amp/amp-story-text {"type":"p","customTextColor":"#ffffff","customBackgroundColor":"#8c58e3","autoFontSize":10,"opacity":80,"positionTop":59,"positionLeft":6,"height":20,"width":111,"className":"is-style-rounded"} -->
<p style="background-color:rgba(140, 88, 227, 0.8);color:#ffffff;display:flex" class="wp-block-amp-amp-story-text has-text-color has-background is-style-rounded"><amp-fit-text layout="flex-item" class="amp-text-content">Travel Tips</amp-fit-text></p>
<!-- /wp:amp/amp-story-text -->
Expand Down
2 changes: 1 addition & 1 deletion includes/templates/story-templates/travel-cta.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:amp/amp-story-page {"mediaType":"image","autoAdvanceAfterDuration":0,"backgroundColors":"[{\u0022color\u0022:\u0022#8c58e3\u0022},{\u0022color\u0022:\u0022#fff9e5\u0022}]"} -->
<amp-story-page style="background-color:#ffffff" id="4c4ad30d-0662-4860-a0d2-765843911c47" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><amp-img layout="fill" src="AMP_STORY_TEMPLATES_URL/cta-bg.jpg" style="object-position:initial"></amp-img></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #8c58e3, #fff9e5);opacity:1"></amp-story-grid-layer>
<amp-story-page style="background-color:#ffffff" id="4c4ad30d-0662-4860-a0d2-765843911c47" class="wp-block-amp-amp-story-page"><amp-story-grid-layer template="fill"><img layout="fill" src="AMP_STORY_TEMPLATES_URL/cta-bg.jpg" object-position="initial"/></amp-story-grid-layer><amp-story-grid-layer template="fill" style="background-image:linear-gradient(to bottom, #8c58e3, #fff9e5);opacity:1"></amp-story-grid-layer>
<!-- wp:image {"width":261,"height":195,"className":"wp-block-image is-resized is-style-rounded","positionTop":38,"positionLeft":12} -->
<figure class="wp-block-image is-resized is-style-rounded"><img src="AMP_STORY_TEMPLATES_URL/cta-image.jpg" alt="" width="261" height="195"/></figure>
<!-- /wp:image -->
Expand Down
Loading