GithubHelp home page GithubHelp logo

amp-story's Introduction

AMP Story

AMP story is a full-screen visual storytelling experience that conveys information with images, videos, graphics, audio, and more.

amp-story web component

Getting Started

  1. Add amp js library in your web page
    <script async src="https://cdn.ampproject.org/v0.js"></script>
  2. Import amp-story library in your web page
    <script async custom-element="amp-story"
        src="https://cdn.ampproject.org/v0/amp-story-1.0.js"></script>
  3. So your web page look like
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Document</title>
            <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>
        </head>
        <body>
            <p>AMP Story</p>
        </body>
    </html>
  4. <amp-story>, <amp-story-page>, <amp-story-grid-layer> in your story
    <amp-story standalone >
        <amp-story-page id="cover">
            <amp-story-grid-layer template="fill">
                <amp-img src="/assets/a.jpg"
                    width="720" height="1280"
                    layout="responsive">
                </amp-img>
            </amp-story-grid-layer>
            <amp-story-grid-layer template="vertical" style="color:white">
                <h1 animate-in="fly-in-right">Google Developers Group</h1>
                <p animate-in="fade-in">Google Developer Groups (GDGs) are for developers who are interested in Google's developer technology.</p>
            </amp-story-grid-layer>
        </amp-story-page>
    </amp-story>

Resources

  1. AMP Story Docs
  2. Google Developers Code Labs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.