Commit 2fd50e41 authored by Sanjit Singh Chouhan's avatar Sanjit Singh Chouhan

Links

parent 87929368
var banner = document.createElement("div");
// Welcome Message
var message = document.createTextNode("Welcome to Summer of Data");
banner.appendChild(message);
/**
* Timers
* */
......@@ -17,13 +12,32 @@ function timeDifferene(t1, t2) {
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
return days ? (days + "d ") : hours ? hours + "h " : '' + minutes ? minutes + "m " : '' + seconds + "s ";
return days ? (days + "days ") : hours ? hours + "hours " : '' + minutes ? minutes + "minues " : '' + seconds + "seconds ";
}
var timers = document.createElement('div');
timers.style.cssFloat = 'left';
timers.style.padding = '5px';
timers.style.display = 'inline';
banner.appendChild(timers);
var current_time = document.createElement('div');
timers.appendChild(current_time);
current_time.style.paddingLeft = '10px';
setInterval(function () {
while (current_time.firstChild) {
current_time.removeChild(current_time.firstChild);
}
var time_text = new Date().toLocaleString('In');
current_time.appendChild(document.createTextNode('Time: ' + time_text));
}, 1000);
var time_completed = document.createElement('span');
banner.appendChild(time_completed);
timers.appendChild(time_completed);
time_completed.style.paddingLeft = '10px';
var startTime = new Date("May 27, 2018 09:00:00").getTime();
......@@ -38,7 +52,7 @@ setInterval(function () {
}, 1000);
var time_remaining = document.createElement('span');
banner.appendChild(time_remaining);
timers.appendChild(time_remaining);
time_remaining.style.paddingLeft = '10px';
var endTime = new Date("June 25, 2018 09:00:00").getTime();
......@@ -53,6 +67,15 @@ setInterval(function () {
}, 1000);
/**
* logo
* */
// var logo = document.createElement('img');
// logo.style.display = 'inline';
// logo.src = browser.extension.getURL('logo_large.png');
// banner.appendChild(logo);
/**
* Schedule Button
* */
......@@ -60,6 +83,7 @@ var schedule_btn = document.createElement("button");
schedule_btn.id = 'schedule_btn';
schedule_btn.appendChild(document.createTextNode("View Schedule"));
schedule_btn.style.cssFloat = 'right';
// schedule_btn.style.top = '0';
schedule_btn.style.fontSize = '0.5em';
schedule_btn.style.height = '30px';
schedule_btn.style.lineHeight = '0';
......@@ -68,7 +92,7 @@ banner.appendChild(schedule_btn);
banner.style.background = 'white';
banner.style.height = '50px';
banner.style.height = '55px';
banner.style.color = 'black';
banner.style.fontSize = '2em';
banner.style.padding = '5px';
......@@ -81,6 +105,16 @@ var url = browser.extension.getURL('schedule.html');
document.body.insertBefore(schedule, document.body.firstChild);
var message_div = document.createElement('div');
message_div.className = 'summer-of-data';
message_div.style.backgroundColor = 'black';
message_div.style.color = 'white !important';
message_div.style.fontSize = '1.5em';
message_div.style.height = '25px';
message_div.style.width = '100%';
document.body.insertBefore(message_div, document.body.firstChild);
document.body.insertBefore(banner, document.body.firstChild);
......@@ -91,6 +125,7 @@ schedule_btn.addEventListener("click", evt => {
}
document.getElementsByClassName('summer-of-data').item(0).style.display = 'block';
document.getElementsByClassName('summer-of-data').item(1).style.display = 'block';
document.getElementsByClassName('summer-of-data').item(2).style.display = 'block';
schedule.style.width = '100%';
......@@ -163,7 +198,7 @@ schedule_btn.addEventListener("click", evt => {
var day = document.createElement("td");
day.appendChild(document.createTextNode(tarr.Day));
row.appendChild(day);
var tech = document.createElement("td");
tech.appendChild(document.createTextNode(tarr.Tech));
row.appendChild(tech);
......@@ -178,4 +213,34 @@ schedule_btn.addEventListener("click", evt => {
}
}
});
\ No newline at end of file
});
// message div
var instructions = document.createElement('a');
instructions.style.margin = '50px';
var instruction_text = document.createElement('h6');
instruction_text.appendChild(document.createTextNode('Instructions'));
instructions.appendChild(instruction_text);
instruction_text.style.display = 'inline';
instructions.href = 'https://code.swecha.org/sodata/meta/blob/master/instructions.md';
message_div.appendChild(instructions);
var todo = document.createElement('a');
todo.style.margin = '50px';
var todo_text = document.createElement('h6');
todo_text.appendChild(document.createTextNode('Todo'));
todo.appendChild(todo_text);
todo_text.style.display = 'inline';
todo.href = 'https://code.swecha.org/sodata/meta/blob/master/TO-DO.md';
message_div.appendChild(todo);
var contacts = document.createElement('a');
contacts.style.margin = '50px';
var contacts_text = document.createElement('h6');
contacts_text.appendChild(document.createTextNode('Contacts'));
contacts.appendChild(contacts_text);
contacts_text.style.display = 'inline';
contacts.href = 'https://code.swecha.org/sodata/meta/blob/master/contacts.md';
message_div.appendChild(contacts);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment