forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackground-blur.html
119 lines (111 loc) · 5.11 KB
/
background-blur.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
<!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>My Story</title>
<meta name="viewport"
content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="canonical" href="helloworld.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>
body {
font-family: 'Roboto', sans-serif;
}
amp-story-page {
background: white;
}
h3 {
color: #fff;
font-weight: normal;
line-height: 1.174;
}
</style>
</head>
<body>
<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">
<amp-img src="https://images.unsplash.com/photo-1484151709479-3996843263cf?dpr=2&auto=format&fit=crop&w=568&h=379&q=60&cs=tinysrgb&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D"
width="900" height="1600">
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h3>Background jpeg shuld be used for blur.</h3>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="page-1">
<amp-story-grid-layer template="fill">
<amp-img src="https://images.unsplash.com/photo-1440658172029-9d9e5cdc127c?dpr=2&auto=format&fit=crop&w=568&h=344&q=60&cs=tinysrgb&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D"
width="900" height="1600">
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h3>Background jpeg shuld be used for blur.</h3>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="no-image-page">
<amp-story-grid-layer template="vertical">
<p>No image page, background should fade to black.</p>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="video-page">
<amp-story-grid-layer template="fill">
<amp-video autoplay loop
width="400"
height="750"
poster="./img/poster2.jpg"
layout="fill">
<source src="./video/p1.mp4" type="video/mp4">
</amp-video>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h3>First frame of video should blur.</h3>
<h3>If slow connection, poster image should blur.</h3>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="transparent-png-and-img-page">
<amp-story-grid-layer template="thirds">
<amp-img grid-area="upper-third" src="img/amplogo.png" width="120" height="120">
</amp-img>
<amp-img grid-area="middle-third" src="https://images.unsplash.com/photo-1440658172029-9d9e5cdc127c?dpr=2&auto=format&fit=crop&w=568&h=344&q=60&cs=tinysrgb&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D"
width="90" height="90">
</amp-img>
<p template="lower-third">
jpeg should blur even though it's smaller than png.
</p>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="transparent-png-only-page">
<amp-story-grid-layer template="thirds">
<amp-img grid-area="upper-third" src="img/amplogo.png" width="120" height="120">
</amp-img>
<p template="lower-third">
png with transparency should not blur. Should fade to black.
</p>
</amp-story-grid-layer>
</amp-story-page>
<amp-story-page id="solid-png-only-page">
<amp-story-grid-layer template="fill">
<amp-img src="img/ad-coffee.png"
width="90" height="90">
</amp-img>
</amp-story-grid-layer>
<amp-story-grid-layer template="vertical">
<h3 template="lower-third">
Solid png (no transparency) should blur.
</h3>
</amp-story-grid-layer>
</amp-story-page>
</amp-story>
</body>
</html>