-
Notifications
You must be signed in to change notification settings - Fork 8
/
index.html
310 lines (298 loc) · 9.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
<!DOCTYPE html>
<html ⚡>
<head>
<meta charset="utf-8" />
<title>Joy of Pets</title>
<link rel="canonical" href="pets.html" />
<meta
name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<!-- Take note of the unique scripts used here. Most, if not all Web Stories will require the first two scripts. -->
<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>
<!-- This script specifically enables any embedded video content to render correctly on a Web Story. -->
<script
async
custom-element="amp-video"
src="https://cdn.ampproject.org/v0/amp-video-0.1.js"
></script>
<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
>
<link
href="https://fonts.googleapis.com/css?family=Oswald:200,300,400"
rel="stylesheet"
/>
<style amp-custom>
amp-story {
font-family: "Oswald", sans-serif;
color: #fff;
}
amp-story-page {
background-color: #000;
}
h1 {
font-weight: bold;
font-size: 2.875em;
font-weight: normal;
line-height: 1.174;
}
p {
font-weight: normal;
font-size: 1.3em;
line-height: 1.5em;
color: #fff;
}
q {
font-weight: 300;
font-size: 1.1em;
}
amp-story-grid-layer.bottom {
align-content: end;
}
amp-story-grid-layer.noedge {
padding: 0px;
}
amp-story-grid-layer.center-text {
align-content: center;
}
.wrapper {
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: 50% 50%;
}
.banner-text {
text-align: center;
background-color: #000;
line-height: 2em;
}
</style>
</head>
<body>
<!-- Everything else is included inside the single child of the body element -- amp-story. -->
<!-- Four attributes are required for stories to be discovered on the web. Title, publisher name, publisher logo, and poster image. -->
<amp-story
standalone
title="Joy of Pets"
publisher="AMP tutorials"
publisher-logo-src="assets/AMP-Brand-White-Icon.svg"
poster-portrait-src="assets/cover.jpg"
>
<!-- These metadata attributes supplement and do not replace any Structured Data (e.g. JSON-LD) on the page. To ensure your Web Stories are discovered across all platforms, you should add Structured Data to all your AMP pages, including AMP stories. -->
<!-- Each amp-story component must have at least one or more amp-story-page children, which serve as the individual screens. -->
<!-- Cover page -->
<amp-story-page id="cover">
<!-- Each amp-story-page component must have at least one or more layer components, which stack upon one another to create visual effects. -->
<amp-story-grid-layer template="fill">
<amp-img
src="assets/cover.jpg"
width="720"
height="1280"
layout="responsive"
>
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h1>The Joy of Pets</h1>
<p>By AMP Tutorials</p>
</amp-story-grid-layer>
</amp-story-page>
<!-- Page 1 (Cat): 1 layer (vertical) -->
<amp-story-page id="page1">
<amp-story-grid-layer template="vertical">
<h1>Cats</h1>
<amp-img
src="assets/cat.jpg"
width="720"
height="1280"
layout="responsive"
>
</amp-img>
<q
>Dogs come when they're called. Cats take a message and get back to
you. --Mary Bly</q
>
</amp-story-grid-layer>
</amp-story-page>
<!-- Page 2 (Dog): 2 layers (fill + thirds) -->
<amp-story-page id="page2">
<amp-story-grid-layer template="fill">
<amp-img
src="assets/dog.jpg"
width="720"
height="1280"
layout="responsive"
>
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="thirds">
<h1 grid-area="upper-third">Dogs</h1>
<p grid-area="lower-third">
Dogs were probably the first tame animals. They have accompanied
humans for some 10,000 years. Some scientists assert that all dogs,
domestic and wild, share a common ancestor in the small South Asian
wolf.
</p>
</amp-story-grid-layer>
</amp-story-page>
<!-- Page 3 (Bird): 3 layers (fill + vertical + vertical) + Audio-->
<amp-story-page id="page3" background-audio="assets/bird-singing.mp3">
<amp-story-grid-layer template="fill">
<amp-img
src="assets/bird.jpg"
width="720"
height="1280"
layout="responsive"
>
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h1>Birds</h1>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical" class="bottom">
<q
>A bird is three things: Feathers, flight and song, And feathers are
the least of these.--Marjorie Allen Seiffert
</q>
</amp-story-grid-layer>
</amp-story-page>
<!-- Page 4 (Rabbit): 3 layers (fill (video) + vertical + vertical) -->
<amp-story-page id="page4">
<amp-story-grid-layer template="fill">
<amp-video
autoplay
loop
width="720"
height="1280"
poster="assets/rabbit.jpg"
layout="responsive"
>
<source src="assets/rabbit.mp4" type="video/mp4" />
</amp-video>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h1>Rabbits</h1>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical" class="bottom">
<p>
Rabbits can learn to follow simple voice commands and come when
called by name, and are curious and playful.
</p>
</amp-story-grid-layer>
</amp-story-page>
<!-- Page 5 (Collage): 2 layers + animations -->
<amp-story-page id="page5">
<amp-story-grid-layer template="vertical" class="noedge">
<div class="wrapper">
<amp-img
src="assets/cat.jpg"
width="720"
height="1280"
layout="responsive"
animate-in="fade-in"
animate-in-delay="0.4s"
>
</amp-img>
<amp-img
src="assets/dog.jpg"
width="720"
height="1280"
layout="responsive"
animate-in="fade-in"
animate-in-delay="0.6s"
>
</amp-img>
<amp-img
src="assets/bird.jpg"
width="720"
height="1280"
layout="responsive"
animate-in="fade-in"
animate-in-delay="0.8s"
>
</amp-img>
<amp-img
src="assets/rabbit.jpg"
width="720"
height="1280"
layout="responsive"
animate-in="fade-in"
animate-in-delay="1.0s"
>
</amp-img>
</div>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical" class="center-text">
<p class="banner-text" animate-in="whoosh-in-right">
Pets can lower your stress levels!
</p>
</amp-story-grid-layer>
</amp-story-page>
<!-- The bookend is the correct way to properly bring a clean, shareable end to the Web Story. -->
<!-- Bookend -->
<amp-story-bookend src="bookend.json" layout="nodisplay">
<!-- View the associated json file to understand the linking here. -->
</amp-story-bookend>
</amp-story>
</body>
</html>