Add rulers to months

This commit is contained in:
Gergely Polonkai 2015-11-19 17:07:47 +01:00
parent d2e1bcccec
commit d56036f36d
2 changed files with 89 additions and 3 deletions

View File

@ -68,7 +68,7 @@
</li> </li>
</ul> </ul>
</nav> </nav>
<div class="holiday" id="day-0-1">dur</div> <div class="holiday" id="day-0-1">ður</div>
<div class="row"> <div class="row">
<div class="month col-md-4 col-sm-1" data-month="1"></div> <div class="month col-md-4 col-sm-1" data-month="1"></div>
<div class="month col-md-4 col-sm-1" data-month="2"></div> <div class="month col-md-4 col-sm-1" data-month="2"></div>

View File

@ -8,20 +8,91 @@ var dayNames = new Array(
); );
var monthNames = new Array( var monthNames = new Array(
'Mebel', 'Mëbel',
'Dirann', 'Dirann',
'Mauþ', 'Mauþ',
'Gerub', 'Gerub',
'Þrei', 'Þrei',
'Dimoc', 'Dimoc',
'Xentor', 'Xentor',
'Meðïr', 'Mëðïr',
'Draþ', 'Draþ',
'Quaden', 'Quaden',
'Ridïmel', 'Ridïmel',
'Rodom' 'Rodom'
); );
var entities = {
"Hëður": {
"entity": "Garquon",
"element": "Meren"
},
"Mëbel": {
"entity": "Þoraðrin",
"element": "Aðun"
},
"Dirann": {
"entity": "Detërien",
"element": "Merðen"
},
"Mauþ": {
"entity": "Elin",
"element": "Fronn"
},
"Rideyy": {
"entity": "Hëriel",
"element": "Enðir"
},
"Gerub": {
"entity": "Iliþon",
"element": "Miþon"
},
"Þrei": {
"entity": "Amenar",
"element": undefined
},
"Dimoc": {
"entity": "Iminiru",
"element": "Sëdur"
},
"Morkh": {
"entity": "Luminar",
"element": "Holar"
},
"Xentor": {
"entity": "Motimor",
"element": "Rort"
},
"Mëðïr": {
"entity": "Mirian",
"element": "Ilšir"
},
"Draþ": {
"entity": "Heloor",
"element": undefined
},
"Khmerd": {
"entity": "Zuþeron",
"element": "Gord"
},
"Quaden": {
"entity": "Umonar",
"element": "Ulquon"
},
"Ridïmel": {
"entity": "Feiriamen",
"element": "Reina"
},
"Rodom": {
"entity": "Nozoru",
"element": "Zima"
},
"Chamog": {
"entity": "Ketirai",
"element": "Loar"
}
};
var newMoonBaseDate = new Date(2005, 4, 8, 3, 48); var newMoonBaseDate = new Date(2005, 4, 8, 3, 48);
Date.prototype.isLeap = function() { Date.prototype.isLeap = function() {
@ -265,6 +336,21 @@ function genMonthTable(div) {
$('<td colspan="6">') $('<td colspan="6">')
.html(month_name))); .html(month_name)));
ruler = entities[month_name].entity;
element = entities[month_name].element;
if (element != undefined) {
ruler += ', ' + element;
}
month_header
.append(
$('<tr>')
.addClass('monthrulers')
.append(
$('<td colspan="6">')
.html(ruler)));
daylist = $('<tr>') daylist = $('<tr>')
.addClass('daynames'); .addClass('daynames');