-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (86 loc) · 3 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
<!-- This is a tool to calculate simple individual dynamic model solutions. It plots a time series and a phase space trajectory after pushing
the blue button. Next developments should contain:
- further examples for models of different problems and issues.
- debugging of applicants.
- review and improvements of plotly-code to decrease datastorage and to enable more calculation steps
Writer: Fabian Wachsmann
Built on Bootstrap, Jquery and Plotly packages-->
<!DOCTYPE html>
<html>
<head>
<title>Adventskalender </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> -->
<link rel="stylesheet" href="./bootstrap.min.css">
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> -->
<script src="./jquery-1.12.0.min.js"> </script>
<!-- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> -->
<script src="./bootstrap.min.js"></script>
<!-- <script type=”text/javascript” src=”http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.js”></script> -->
<script type="text/javascript" src="./jquery.tmpl.js"> </script>
<style type="text/css">
</style>
</head>
<body>
<div class="container-fluid" id="calendar">
<div class="row"> <h2 class="text-center"> Cocos Adventskalender </h2> </div>
</div>
<script id="zanf" type="text/x-jQuery-tmpl">
<div class="row">
</script>
<script id="zend" type="text/x-jQuery-tmpl">
</div>
</script>
<script id="tagbox" type="text/x-jQuery-tmpl">
<div class="col-md-2">
<div class="thumbnail">
<h3> ${day} </h3>
<img id="schlossTuer${dayind}" src="door-clipart-7865showing.png" style="width:60%">
<a class="hidden" id="offenTuer${dayind}" href="door-clipart-pull-open-door-clipart-2.jpg">
<img src="door-clipart-pull-open-door-clipart-2.jpg" style="width:100%">
</a>
</div>
</div>
</script>
<script type="text/javascript" >
var alldecdays = [];
for (var i = 0; i<24; i++){
alldecdays.push(i);
};
alldecdays = randomize(alldecdays,24);
function randomize(myArray,nb_picks)
{
for (i = myArray.length-1; i > 1 ; i--)
{
var r = Math.floor(Math.random()*i);
var t = myArray[i];
myArray[i] = myArray[r];
myArray[r] = t;
}
return myArray.slice(0,nb_picks);
}
//Use Template
for (var i=0; i<4; i++) {
$('#zanf').tmpl().appendTo(("#calendar"));
for (var j=0; j<6; j++) {
var dayind = "" + alldecdays[i*6 + j];
var day = alldecdays[i*6 + j] + 1;
$('#tagbox').tmpl(dayind,day).appendTo(("#calendar"));
};
$('#zend').tmpl().appendTo(("#calendar"));
};
$(function(){
var date = new Date();
var decday = date.getDate();
decday = 7;
// if ( decday < 24 ) {
for ( var i = 0; i < decday; i++ ) {
$(("#schlossTuer"+i)).addClass('hidden');
$(("#offenTuer"+i)).removeClass('hidden');
}
// }
});
</script>
</body>
</html>