forked from perladvent/Perl-Advent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (66 loc) · 2.44 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
<html>
<head>
<title>Perl Advent Calendar</title>
<script type="text/javascript"><!--
/* Count Down - Annual Occasions Script
Visit http://rainbow.arch.scriptmania.com/scripts/
for this script and many more */
var today=new Date();
//Enter the occasion's MONTH (1-12) and DAY (1-31):
var theoccasion=new Date(today.getFullYear(), 12, 1);
//Customize text to show before and on occasion. Follow grammer below:
var beforeOccasionText="left until the next Perl Advent Calendar";
var onOccasiontext="The Calendar should be posted shortly.";
var monthtext=new Array("Jan","Feb","Mar","April","May","June","July","Aug","Sep","Oct","Nov","Dec");
theoccasion.setMonth(theoccasion.getMonth()-1); //change to 0-11 month format
//show date of occasion
var showdate="("+monthtext[theoccasion.getMonth()]+". "+theoccasion.getDate()+")";
var one_day=1000*60*60*24;
var calculatediff="";
calculatediff=Math.ceil((theoccasion.getTime()-today.getTime())/(one_day));
if (calculatediff<0) { //if already passed
var nextyeartoday=new Date();
nextyeartoday.setFullYear(today.getFullYear()+1);
calculatediff=Math.ceil((nextyeartoday.getTime()-today.getTime())/(one_day)+calculatediff);
}
//Display message accordingly
var pluraldayornot=(calculatediff==1)? "day" : "days"
var str;
if (calculatediff>0)
str="There are "+calculatediff+" "+pluraldayornot+" "+
beforeOccasionText+" "+showdate;
else if (calculatediff==0)
str=onOccasiontext;
// --></script>
<style type="text/css"><!--
body { background-color: #fff8ef; font-family: sans-serif }
div { margin-left: auto; margin-right: auto; margin-top: 5%; width: 70% }
#main { font-size: x-large; margin-bottom: 5% }
#site-sponsor-js{
float: right;
margin-right: 15%;
position: relative;
top: -50px;
}
#commads{ font-size: 8pt }
#commads ul{ padding: 0px;display: inline; z-index: 24 }
#commads li:after { content: " \00b7\00a0" }
#commads li, #commads a { display: inline }
// -->
</style>
</head>
<body bgcolor="#fff8ef">
<div id="main">
<p>
<script language="javascript">document.write(str)</script>
<noscript>This year's Perl Advent Calendar is still a ways away.</noscript>
</p>
<p>
In the mean time, you might like to check our <a
href="archives.html">archives</a>, or <a href="FAQ-submit.html">help us
create it</a>.
</p>
</div>
<p><a href="contact.html">Contact</a> · <a href="FAQ.html">FAQ</a></p>
</body>
</html>