Skip to content

Commit

Permalink
Update amp-story examples with v1 requirements (#16093)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjsanj authored and newmuis committed Jul 1, 2018
1 parent 1d291f7 commit f49f3cb
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 11 deletions.
3 changes: 2 additions & 1 deletion examples/amp-story/ampconf.html
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ <h1 grid-area="middle-third" class="bold">Join the worldwide AMP Roadshow</h1>
</amp-story-cta-layer>
</amp-story-page>

<amp-story-bookend src="./json/bookend.json" layout="nodisplay"></amp-story-bookend>
<amp-story-bookend src="./bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
11 changes: 10 additions & 1 deletion examples/amp-story/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
</head>

<body>
<amp-story standalone bookend-config-src="bookend.json">
<amp-story
title="Analytics amp-story example"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-analytics id="analytics1">
<script type="application/json">
Expand Down Expand Up @@ -95,6 +102,8 @@ <h1>Page Four</h1>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
10 changes: 9 additions & 1 deletion examples/amp-story/animations-presets.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,15 @@
</head>

<body>
<amp-story standalone>
<amp-story
title="Animations-presets amp-story examples"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-page id="pulse-page">
<amp-story-grid-layer template="vertical">
<h1>pulse</h1>
Expand Down
12 changes: 11 additions & 1 deletion examples/amp-story/bookend.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,23 @@
</head>

<body>
<amp-story standalone bookend-config-src="bookend.json">
<amp-story
title="Bookend amp-story example"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-page id="cover">
<amp-story-grid-layer template="vertical">
<h1>Advance to see the bookend!</h1>
</amp-story-grid-layer>
</amp-story-page>
</amp-story>

<amp-story-bookend src="./bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</body>
</html>
12 changes: 11 additions & 1 deletion examples/amp-story/desktop-backgrounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
</head>

<body>
<amp-story standalone bookend-config-src="bookend.json">
<amp-story
title="Desktop-backgrounds amp-story example"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-page id="cover">
<amp-story-grid-layer template="fill">
Expand Down Expand Up @@ -61,6 +68,9 @@ <h1>Third Page</h1>
<p>This is the third page of this story.</p>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="./bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>
12 changes: 11 additions & 1 deletion examples/amp-story/helloworld-bookend.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
</head>

<body>
<amp-story standalone bookend-config-src="bookend.json">
<amp-story
title="Helloworld-bookend amp-story example"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-page id="cover">
<amp-story-grid-layer template="vertical">
Expand All @@ -47,6 +54,9 @@ <h1>Page 1 - auto advance after 3s</h1>
<h1>Page 2 - manual advance</h1>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="./bookendv1.json" layout=nodisplay>
</amp-story-bookend>
</amp-story>
</body>
</html>
12 changes: 11 additions & 1 deletion examples/amp-story/progress-bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
</head>

<body>
<amp-story standalone bookend-config-src="bookend.json">
<amp-story
title="Progress-bar amp-story example"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-page id="cover">
<amp-story-grid-layer template="vertical">
Expand Down Expand Up @@ -94,6 +101,9 @@ <h1>Fifth Page</h1>
<p>This is the fifth page of this story.</p>
</amp-story-grid-layer>
</amp-story-page>

<amp-story-bookend src="./bookendv1.json" layout=nodisplay>
</amp-story-bookend>
</amp-story>
</body>
</html>
2 changes: 1 addition & 1 deletion extensions/amp-story/0.1/amp-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* Example:
* <code>
* <amp-story standalone bookend-config-src="bookend.json">
* <amp-story standalone>
* [...]
* </amp-story>
* </code>
Expand Down
16 changes: 13 additions & 3 deletions test/manual/amp-story-doubleclick.amp.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@
</head>

<body>
<amp-story standalone bookend-config-src="../../examples/amp-story/bookend.json">
<amp-story
title="Amp-story-doubleclick"
publisher="The AMP Team"
publisher-logo-src="https://example.com/logo/1x1.png"
poster-portrait-src="https://example.com/my-story/poster/3x4.jpg"
poster-square-src="https://example.com/my-story/poster/1x1.jpg"
poster-landscape-src="https://example.com/my-story/poster/4x3.jpg"
standalone>

<amp-story-auto-ads>
<script type="application/json">
{
Expand Down Expand Up @@ -127,8 +135,10 @@ <h1>Eighth Page</h1>
<amp-story-grid-layer template="vertical">
<h1>Ninth Page</h1>
</amp-story-grid-layer>
</amp-story-page>
</amp-story-page>

<amp-story-bookend src="../../examples/amp-story/bookendv1.json" layout="nodisplay">
</amp-story-bookend>
</amp-story>
</body>
</html>

0 comments on commit f49f3cb

Please sign in to comment.