forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
social-share.amp.html
66 lines (62 loc) · 3.15 KB
/
social-share.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
<!doctype html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<title>Social Sharing with amp-social-share</title>
<link rel="canonical" href="http://example.ampproject.org/article-metadata.html" />
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"headline": "Open-source framework for publishing content",
"datePublished": "2015-10-07T12:02:41Z",
"image": [
"logo.jpg"
]
}
</script>
<script custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js" async></script>
<style amp-custom>
.social-box {
max-width: 300px;
}
amp-social-share[type="baidu"] {
background-color: black;
color: #fff;
font-size: 32px;
text-align: center;
}
amp-social-share[type="whatsapp"] {
background: #25d366;
text-align: center;
color: #0e5829;
font-size: 18px;
padding: 10px;
}
</style>
<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>
<body>
<h1>Social Share</h1>
<div class="social-box">
<amp-social-share type="email" data-param-subject="Hello World" data-param-body="What's up?"></amp-social-share>
<amp-social-share type="facebook"
data-param-text="Hello world"
data-param-href="https://example.com/?ref=URL"
data-param-app_id="145634995501895"></amp-social-share>
<amp-social-share type="twitter"></amp-social-share>
<amp-social-share type="linkedin" width="108" height="44" layout="fixed"></amp-social-share>
<amp-social-share layout="responsive" width="40" height="40" type="baidu"
data-share-endpoint="http://cang.baidu.com/do/add"
data-param-iu="CANONICAL_URL"
data-param-it="TITLE">B</amp-social-share>
<amp-social-share layout="responsive" width="40" height="40" type="whatsapp"
layout="container"
data-share-endpoint="whatsapp://send"
data-param-text="Check out this article: TITLE - CANONICAL_URL">
Share on Whatsapp</amp-social-share>
</div>
</body>
</html>