-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (55 loc) · 1.62 KB
/
index.html
File metadata and controls
68 lines (55 loc) · 1.62 KB
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Availability.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: helvetica;
padding: 50px;
}
body, a {
color: #000;
}
</style>
<!-- Dev mode -->
<script>window.__availability_base_url = 'http://my.cushionapp.dev:5000'</script>
<link href="build/availability.css" rel="stylesheet">
<script src="build/availability.js"></script>
</head>
<body>
<h1>Welcome to my awesome freelancing website!</h1>
<p>I'm currently <span class="badge"></span>.</p>
<!-- Show a contextual badge -->
<script>
Availability.badge({
user: 'dfd64545-e7f2-466f-8d5f-f9c2b998f2ef',
container: document.querySelector('.badge')
})
</script>
<p>
<img class="availability-image" width="300px" src="">
<br>
<code>current-availability.gif</code>
</p>
<!-- Example of a custom gif renderer -->
<script>
Availability.custom({
user: 'dfd64545-e7f2-466f-8d5f-f9c2b998f2ef',
render: function () {
var img = document.querySelector('.availability-image')
if (this.isAvailable()) img.src = 'http://i.giphy.com/urhcoANPxB3K8.gif'
if (this.isUnavailable()) img.src = 'http://i.giphy.com/O4caHIyGGVTW.gif'
if (this.isSoon()) img.src = 'http://i.giphy.com/ErLimaUL0blbW.gif'
}
})
</script>
<!-- Add a ribbon to the corner of the page -->
<script>
Availability.ribbon({
user: 'dfd64545-e7f2-466f-8d5f-f9c2b998f2ef'
})
</script>
</body>
</html>