forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sticky.ads.amp.html
332 lines (292 loc) · 10.8 KB
/
sticky.ads.amp.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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!doctype html>
<html ⚡>
<head>
<meta charset="utf-8">
<title>Sticky Ad Test</title>
<link rel="canonical" href="amps.html" >
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=Georgia|Open+Sans|Roboto' rel='stylesheet' type='text/css'>
<style amp-custom>
body {
margin: 0;
font-family: 'Georgia', Serif;
}
.brand-logo {
font-family: 'Open Sans';
}
.ad-container {
display: flex;
justify-content: center;
}
.content-container p {
line-height: 24px;
}
header,
.article-body {
padding: 15px;
}
.lightbox {
background: #222;
}
.full-bleed {
margin: 0 -15px;
}
.lightbox-content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
}
.lightbox-content p {
color: #fff;
padding: 15px;
}
.lightbox amp-img {
width: 100%;
}
figure {
margin: 0;
}
figcaption {
color: #6f757a;
padding: 15px 0;
font-size: .9em;
}
.author {
display: flex;
align-items: center;
background: #f4f4f4;
padding: 0 15px;
font-size: .8em;
border: solid #dcdcdc;
border-width: 1px 0;
}
.header-time {
color: #a8a3ae;
font-family: 'Roboto';
font-size: 12px;
}
.author p {
margin: 5px;
}
.byline {
font-family: 'Roboto';
display: inline-block;
}
.byline p {
line-height: normal;
}
.byline .brand {
color: #6f757a;
}
.standfirst {
color: #6f757a;
}
.mailto {
text-decoration: none;
}
#author-avatar {
margin: 10px;
border: 5px solid #fff;
width: 50px;
height: 50px;
border-radius: 50%;
}
h1 {
margin: 5px 0;
font-weight: normal;
}
footer {
display: flex;
align-items: center;
justify-content: center;
height: 226px;
background: #f4f4f4;
}
hr {
margin: 0;
}
amp-img {
background-color: #f4f4f4;
}
</style>
<script async custom-element="amp-lightbox" src="https://cdn.ampproject.org/v0/amp-lightbox-0.1.js"></script>
<script async custom-element="amp-sticky-ad" src="https://cdn.ampproject.org/v0/amp-sticky-ad-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>
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<header>
<div class="brand-logo">
PublisherLogo
</div>
</header>
<main role="main">
<amp-sticky-ad layout="nodisplay">
<amp-ad width="320"
height="50"
type="imobile"
data-pid="1847"
data-adtype="banner"
data-asid="813689">
</amp-sticky-ad>
<article>
<figure>
<amp-img
src="img/[email protected]"
srcset="img/[email protected] 1x, img/[email protected] 2x"
layout="responsive" width="360" placeholder
alt="Curabitur convallis, urna quis pulvinar feugiat, purus diam posuere turpis, sit amet tincidunt purus justo et mi."
height="216" on="tap:headline-img-lightbox" role="img" tabindex="0">
</amp-img>
</figure>
<amp-lightbox id="headline-img-lightbox" class="lightbox"
layout="nodisplay">
<div class="lightbox-content">
<amp-img id="floating-headline-img"
src="img/[email protected]"
srcset="[email protected] 1x, img/[email protected] 2x"
placeholder
width="360" height="216" layout="responsive">
</amp-img>
<p>
Fusce pretium tempor justo, vitae consequat dolor maximus eget.
</p>
</div>
</amp-lightbox>
<div class="content-container">
<header>
<h1 itemprop="headline">Lorem Ipsum</h1>
<time class="header-time" itemprop="datePublished"
datetime="2015-09-14 13:00">September 14, 2015</time>
<p class="standfirst">
Fusce pretium tempor justo, vitae consequat dolor maximus eget.
</p>
</header>
<div class="author">
<amp-img src="img/sample.jpg" id="author-avatar" placeholder
height="50" width="50">
</amp-img>
<div class="byline">
<p>
by <span itemscope itemtype="http://schema.org/Person"
itemprop="author"><b>Lorem Ipsum</b>
<a class="mailto" href="mailto:lorem.ipsum@">
lorem.ipsum@</a></span>
</p>
<p class="brand">PublisherName News Reporter<p>
</div>
</div>
<div class="article-body" itemprop="articleBody">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Curabitur ullamcorper turpis vel commodo scelerisque. Phasellus
luctus nunc ut elit cursus, et imperdiet diam vehicula.
Duis et nisi sed urna blandit bibendum et sit amet erat.
Suspendisse potenti. Curabitur consequat volutpat arcu nec
elementum. Etiam a turpis ac libero varius condimentum.
Maecenas sollicitudin felis aliquam tortor vulputate,
ac posuere velit semper.
</p>
<p>
Fusce pretium tempor justo, vitae consequat dolor maximus eget.
Aliquam iaculis tincidunt quam sed maximus. Suspendisse faucibus
ornare sodales. Nullam id dolor vitae arcu consequat ornare a
et lectus. Sed tempus eget enim eget lobortis.
Mauris sem est, accumsan sed tincidunt ut, sagittis vel arcu.
Nullam in libero nisi.
</p>
<div class="ad-container">
<amp-ad width=300 height=250
type="a9"
data-aax_size="300x250"
data-aax_pubname="abc123"
data-aax_src="302">
</amp-ad>
</div>
<p>
Sed pharetra semper fringilla. Nulla fringilla, neque eget
varius suscipit, mi turpis congue odio, quis dignissim nisi
nulla at erat. Duis non nibh vel erat vehicula hendrerit eget
vel velit. Donec congue augue magna, nec eleifend dui porttitor
sed. Cras orci quam, dignissim nec elementum ac, bibendum et purus.
Ut elementum mi eget felis ultrices tempus. Maecenas nec sodales
ex. Phasellus ultrices, purus non egestas ullamcorper, felis
lorem ultrices nibh, in tristique mauris justo sed ante.
Nunc commodo purus feugiat metus bibendum consequat. Duis
finibus urna ut ligula auctor, sed vehicula ex aliquam.
Sed sed augue auctor, porta turpis ultrices, cursus diam.
In venenatis aliquet porta. Sed volutpat fermentum quam,
ac molestie nulla porttitor ac. Donec porta risus ut enim
pellentesque, id placerat elit ornare.
</p>
<p>
Curabitur convallis, urna quis pulvinar feugiat, purus diam
posuere turpis, sit amet tincidunt purus justo et mi. Donec
sapien urna, aliquam ut lacinia quis, varius vitae ex.
Maecenas efficitur iaculis lorem, at imperdiet orci viverra
in. Nullam eu erat eu metus ultrices viverra a sit amet leo.
Pellentesque est felis, pulvinar mollis sollicitudin et,
suscipit eget massa. Nunc bibendum non nunc et consequat.
Quisque auctor est vel leo faucibus, non faucibus magna ultricies.
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices
posuere cubilia Curae; Vestibulum tortor lacus, bibendum et
enim eu, vehicula placerat erat. Nullam gravida rhoncus accumsan.
Integer suscipit iaculis elit nec mollis. Vestibulum eget arcu
nec lectus finibus rutrum vel sed orci.
</p>
<figure>
<amp-img class="full-bleed" placeholder
src="img/[email protected]"
srcset="img/[email protected] 1x, img/[email protected] 2x"
layout="responsive" width="360"
alt="Fusce pretium tempor justo, vitae consequat dolor maximus eget."
height="216">
</amp-img>
<figcaption>
Fusce pretium tempor justo, vitae consequat dolor maximus eget.
</figcaption>
</figure>
<hr>
<p>
Cum sociis natoque penatibus et magnis dis parturient montes,
nascetur ridiculus mus. Nulla et viverra turpis. Fusce
viverra enim eget elit blandit, in finibus enim blandit. Integer
fermentum eleifend felis non posuere. In vulputate et metus at
aliquam. Praesent a varius est. Quisque et tincidunt nisi.
Nam porta urna at turpis lacinia, sit amet mattis eros elementum.
Etiam vel mauris mattis, dignissim tortor in, pulvinar arcu.
In molestie sem elit, tincidunt venenatis tortor aliquet sodales.
Ut elementum velit fermentum felis volutpat sodales in non libero.
Aliquam erat volutpat.
</p>
<div class="ad-container">
<amp-ad width=300 height=200
type="adsense"
data-ad-client="ca-pub-9350112648257122">
</amp-ad>
</div>
<p>
Morbi at velit vitae eros congue congue venenatis non dui.
Sed lacus sem, feugiat sed elementum sed, maximus sed lacus.
Integer accumsan magna in sagittis pharetra. Class aptent taciti
sociosqu ad litora torquent per conubia nostra, per inceptos
himenaeos. Suspendisse ac nisl efficitur ligula aliquam lacinia
eu in magna. Vestibulum non felis odio. Ut consectetur venenatis
felis aliquet maximus. Class aptent taciti sociosqu ad litora
torquent per conubia nostra, per inceptos himenaeos.
</p>
</div>
</div>
</article>
</main>
<footer>
<div class="brand-logo">PublisherLogo</div>
</footer>
</body>
</html>