-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
100 lines (92 loc) · 3.68 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>3D cube</title>
<link rel="stylesheet" type="text/css" href="assets/styles/cube.css">
<link rel="stylesheet" type="text/css" href="assets/styles/doodle2.css">
<link rel="stylesheet" type="text/css" href="assets/styles/certificate2.css">
<!-- compiled & minified cube code -->
<script charset="utf-8" src="assets/scripts/tween.r12.js"></script>
<script charset="utf-8" src="assets/scripts/three.js"></script>
<script charset="utf-8" src="assets/scripts/cuber.min.js"></script>
</head>
<body>
<div style="text-align:center;clear:both;">
</div>
<div id="bg"></div>
<div id="container"></div>
<div id="uipanel" class="fadeTransition">
<div id="movecounter">0</div>
<div id="buttonpanel">
<div id="sharebubble" class="fadeTransition" style="opacity:0">
<input id="shareshortlink" type="text" value="google.com/doodles" readonly/>
<div id="sharegplus" class="bubbleicon SPRITE_google_plus_64_2x"></div>
<div id="sharefacebook" class="bubbleicon SPRITE_facebook_64_2x"></div>
<div id="sharetwitter" class="bubbleicon SPRITE_twitter_64_2x"></div>
<div id="shareemail" class="bubbleicon SPRITE_email_64_2x"></div>
</div>
<div id="uibuttons">
<div id="sharebutton" class="bubbleicon SPRITE_share_64_2x"></div>
<div id="helpbutton" class="bubbleicon SPRITE_help_64_2x"></div>
<div id="searchbutton" class="bubbleicon SPRITE_search_64_2x"></div>
</div>
</div>
<div id="helpbubble" class="bubble" style="display:none">
<span class="pointerup SPRITE_carrot_grey_up_2x"></span>
<div id="helpimage" class="one"></div>
<div id="helptext" class="helptext"></div>
<div id="helpnext" class="helptext"></div>
<span class="pointerdown SPRITE_carrot_down_2x"></span><br>
</div>
</div>
<script charset="utf-8" src="assets/scripts/iecss3d.js"></script>
<script charset="utf-8" src="assets/scripts/ierenderer.js"></script>
<script charset="utf-8" src="assets/scripts/deviceMotion.js"></script>
<script charset="utf-8" src="assets/scripts/locked.js"></script>
<!-- Certificate js -->
<script charset="utf-8" src="assets/scripts/textBox.js"></script>
<script charset="utf-8" src="assets/scripts/ResizeableTextBox.3.js"></script>
<script charset="utf-8" src="assets/scripts/divBox.js"></script>
<script charset="utf-8" src="assets/scripts/frames.js"></script>
<script charset="utf-8" src="assets/scripts/certificate.js"></script>
<script charset="utf-8" src="assets/scripts/main3.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
var PETS = [];
(function () {
const url = 'https://raw.githubusercontent.com/zoo-js/zoo-data/main/json/organizations.json';
axios.get(url)
.then(function (res) {
PETS = res.data.data;
['red', 'white', 'blue', 'green', 'orange', 'yellow'].map(color =>{
if (getUrlParam(color)) {
document.documentElement.style.setProperty('--zoo-'+color, 'url('+getPetUrl(getUrlParam(color)))+')';
}
})
})
.catch(function (err) {
console.log(err);
});
})();
function getPetUrl(name) {
let r = PETS.find(o => o.name === name);
return r ? 'https://avatars0.githubusercontent.com/u/'+ r.code +'?s=200&v=4' : name;
};
(function () {
if (getUrlParam('bg')) {
let bg = getUrlParam('bg')
bg = bg.includes('*') ? bg.replace('*', '#') : bg
document.documentElement.style.setProperty('--zoo-bg', bg);
}
}());
</script>
</body>
</html>