-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.html
59 lines (46 loc) · 1.57 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>Avatar Test</title>
<style>
canvas, img {
border-radius: 100px;
display: inline-block;
margin: 5px;
}
</style>
</head>
<body>
<script src="js/avatar.js"></script>
<script src="js/browser.js"></script>
<script>
(function() {
'use strict';
var size = 90;
// // valid image
// document.body.appendChild(
// avatar.createImage('Thilo Schmalfuß', 'http://www.gravatar.com/avatar/00100a3b8dd5155ea91377844a871888.png?s=10?d=http%3A%2F%2Fbla.de', size)
// );
//
// // invalid image
// document.body.appendChild(
// avatar.createImage('Thilo Schmalfuß', 'http://www.gravatar.com/avatar/XXXXa3b8dd5155ea91377844a871888.png?s=10?d=http%3A%2F%2Fbla.de', size)
// );
// inception image
document.body.appendChild(
avatar.createImage('Anton Netzkante', 'https://d35va0jwnexy3a.cloudfront.net/?s=64&t=patr.rudolph%2Btest%40gmail.com&u=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F82e58d1d00138a7bf3fc066afb1802b5.png%3Fs%3D64', size)
);
// with email
document.body.appendChild(
avatar.createImage('Anton Netzkante', 'http://locahost:8888/?s=48&t=Anton%20Netzkante&h=floeha.volleyball%40googlemail.com', size)
);
// a -z in colors
// for (var i=0; i<avatar.colors.length; i++) {
// var canvas = avatar.createCanvas(size);
// avatar.drawAvatar(canvas, String.fromCharCode(i + 65), avatar.colors[i]);
// document.body.appendChild(canvas);
// }
}());
</script>
</body>
</html>