/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
examples/visual-tests/amp-story/basic.html
106 строк
4 KB
Gabriel Majoulet
Fix and improve Story first page videos. (#29233)
13 июл 2020, 22:57
Не верифицирован
13 июл 2020, 22:57
c462106
Код
Авторство
О чём код?
<!doctype html> <html amp lang="en"> <head> <meta charset="utf-8"> <script async src="https://cdn.ampproject.org/v0.js"></script> <script async custom-element="amp-story" src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script> <title>amp-story rtl visual diff</title> <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"> <link rel="canonical" href="./template-vertical.html"> <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript> <style amp-custom> amp-story-page { background: black; color: white; font-family: sans-serif; } .i-amphtml-story-spinner-container { /* Hide the spinner for loading pages, since this causes flakes */ display: none; } h1.hello-world { color: white; text-shadow: 3px 3px rgba(0, 0, 0, 0.5); } </style> <script> // TODO(#17108): Remove this when getMode().test is set. __AMP_TEST = true; /** * On load, jump to the second page (to test progress bar fill). */ document.addEventListener('ampstory:load', () => { const storyEl = document.querySelector('amp-story'); // Automatically jump to second page. const switchPageEvent = new CustomEvent('ampstory:switchpage', { detail: { targetPageId: 'page-2', } }); storyEl.dispatchEvent(switchPageEvent); }); </script> </head> <body> <amp-story standalone publisher="AMP Team" title="Visual Diff Test" publisher-logo-src="/examples/visual-tests/photos/120.png" poster-portrait-src="/examples/visual-tests/picsum.photos/image981_900x1600.jpg" poster-landscape-src="/examples/visual-tests/picsum.photos/image981_1600x900.jpg" poster-square-src="/examples/visual-tests/picsum.photos/image981_1600x1600.jpg"> <amp-story-page id="cover"> <amp-story-grid-layer template="fill"> <amp-img layout="fill" src="/examples/visual-tests/picsum.photos/image980_1600x900.jpg"> </amp-img> </amp-story-grid-layer> <amp-story-grid-layer template="vertical"> <h1 class="hello-world">Hello world!</h1> <p>Page one of four</p> </amp-story-grid-layer> </amp-story-page> <amp-story-page id="page-2"> <amp-story-grid-layer template="fill"> <amp-img layout="fill" src="/examples/visual-tests/picsum.photos/image981_1600x900.jpg"> </amp-img> </amp-story-grid-layer> <amp-story-grid-layer template="vertical"> <h1 class="hello-world">Hello world!</h1> <p>Page two of four</p> </amp-story-grid-layer> </amp-story-page> <amp-story-page id="page-3"> <amp-story-grid-layer template="fill"> <amp-img autoplay layout="fill" src="/examples/visual-tests/picsum.photos/image982_1600x900.jpg"> </amp-img> </amp-story-grid-layer> <amp-story-grid-layer template="vertical"> <h1 class="hello-world">Hello world!</h1> <p>Page three of four</p> </amp-story-grid-layer> </amp-story-page> <amp-story-page id="page-4"> <amp-story-grid-layer template="fill"> <amp-img layout="fill" src="/examples/visual-tests/picsum.photos/image983_1600x900.jpg"> </amp-img> </amp-story-grid-layer> <amp-story-grid-layer template="vertical"> <h1 class="hello-world">Hello world!</h1> <p>Page four of four</p> </amp-story-grid-layer> </amp-story-page> </amp-story> </body> </html>