This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathindex.html
78 lines (66 loc) · 2.02 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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>twitter-status demos</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://nutmeg.tools/favicon.png">
<script src="./node_modules/@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce.js"></script>
<!-- Use `npm start` to start a development server. -->
<style>
body {
background-color: #fff;
padding: 24px;
}
twitter-status {
margin: 8px;
}
twitter-status.card {
box-shadow: 0 3px 4px 1px rgba(0, 0, 0, .08), 0 1px 1px 1px rgba(0, 0, 0, .05);
border-radius: 2px;
border-width: 0;
}
</style>
</head>
<body>
<twitter-status id="simple"></twitter-status>
<twitter-status id="complex" update-timestamp></twitter-status>
<twitter-status id="image"></twitter-status>
<twitter-status id="script"></twitter-status>
<twitter-status id="gif"></twitter-status>
<twitter-status id="retweet" class="card"></twitter-status>
<script>
fetch('test/simple.json')
.then(res => res.json())
.then(status => {
document.querySelector('#simple').status = status;
});
fetch('test/complex.json')
.then(res => res.json())
.then(status => {
document.querySelector('#complex').status = status;
});
fetch('test/image.json')
.then(res => res.json())
.then(status => {
document.querySelector('#image').status = status;
});
fetch('test/script.json')
.then(res => res.json())
.then(status => {
document.querySelector('#script').status = status;
});
fetch('test/gif.json')
.then(res => res.json())
.then(status => {
document.querySelector('#gif').status = status;
});
fetch('test/retweet.json')
.then(res => res.json())
.then(status => {
document.querySelector('#retweet').status = status;
});
</script>
<!-- In development `twitter-status.bundled.js` will automatically be loaded. -->
</body>
</html>