diff --git a/app.py b/app.py index 0ddd595..1180478 100644 --- a/app.py +++ b/app.py @@ -67,7 +67,7 @@ def main(): return render_template('main.html', name=prof, website=website, data=tb, times=times, profs=profs, dept=dept, error=False) else: tb_predefined, times_predefined = get_predefined() - return render_template('main.html', profs=profs, times=times_predefined, data=tb_predefined) + return render_template('main.html', profs=profs, times=times_predefined, data=tb_predefined) @app.route('/ics_helper') def ics_helper(): @@ -77,6 +77,11 @@ def ics_helper(): def func(): return download_ics_file(my_events) +@app.route('/landing', methods=['GET']) +def landing(): + return render_template('landing.html') + + if __name__ == '__main__': port = int(os.environ.get("PORT", 5000)) diff --git a/static/favicon.ico b/static/favicon.ico index 5764f0c..4e7c853 100644 Binary files a/static/favicon.ico and b/static/favicon.ico differ diff --git a/static/favicon.jpeg b/static/favicon.jpeg new file mode 100644 index 0000000..1daa75a Binary files /dev/null and b/static/favicon.jpeg differ diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index 1d62433..0000000 Binary files a/static/logo.png and /dev/null differ diff --git a/static/mainScript.js b/static/mainScript.js index 32c1021..03663a5 100644 --- a/static/mainScript.js +++ b/static/mainScript.js @@ -7,12 +7,14 @@ function clearTT() { $('#' + i.toString() + j.toString()).removeClass('table-danger'); $('#' + i.toString() + j.toString()).removeClass('table-clash'); $('#' + i.toString() + j.toString()).html(''); + $('#9' + i.toString() + j.toString()).html(":"); } } clearSelected(); $('#details-div').html(""); } + function getTimeTable(){ var timetable = []; var todaysDate = new Date(); @@ -80,7 +82,7 @@ function addToCalendar(){ type: 'post', contentType: 'application/json', dataType: 'text', - data: timetable + data: timetable }).done(function(result){ console.log(result); var url = '/download_helper'; @@ -88,10 +90,10 @@ function addToCalendar(){ }).fail(function(jqXHR, textStatus, errorThrown){ console.log(timetable) console.warn(jqXHR.responseText) - console.log("fail: ", textStatus, errorThrown); - }); + console.log("fail: ", textStatus, errorThrown); + }); -}; +}; function sdCallback(data, id, course, clear_var) { if(clear_var == 0){ @@ -113,7 +115,7 @@ function sdCallback(data, id, course, clear_var) { $('#' + courseData['Slot'][slot]).removeClass('table-danger'); $('#' + courseData['Slot'][slot]).addClass('table-clash'); } - var temp_list = ($('#' + '9' + courseData['Slot'][slot]).html().split(":")); + var temp_list = ($('#' + '9' + courseData['Slot'][slot]).html().split(":")); var cnt = parseInt(temp_list[0]); cnt = cnt + 1 temp_list[0] = cnt @@ -182,13 +184,13 @@ function sdCallback(data, id, course, clear_var) { if($('#' + courseData['Slot'][slot]).hasClass('table-danger')){ if((data['Name'].split(':')[0].toString().localeCompare($('#' + courseData['Slot'][slot]).html().toString())) == 0) { $('#' + courseData['Slot'][slot]).removeClass('table-danger'); - $('#' + courseData['Slot'][slot]).removeClass('border border-danger'); + $('#' + courseData['Slot'][slot]).removeClass('border border-danger'); $('#' + courseData['Slot'][slot]).html("") $('#9' + courseData['Slot'][slot]).html(":") } } else if($('#' + courseData['Slot'][slot]).hasClass('table-clash')){ - var temp_list = ($('#' + '9' + courseData['Slot'][slot]).html().split(":")); + var temp_list = ($('#' + '9' + courseData['Slot'][slot]).html().split(":")); var cnt = parseInt(temp_list[0]); cnt = cnt - 1; console.log(cnt) @@ -201,13 +203,13 @@ function sdCallback(data, id, course, clear_var) { temp_list[0] = cnt if(cnt == 1){ $('#' + courseData['Slot'][slot]).removeClass('table-clash'); - $('#' + courseData['Slot'][slot]).addClass('table-danger'); + $('#' + courseData['Slot'][slot]).addClass('table-danger'); } $('#' + courseData['Slot'][slot]).html(temp_list[1]) $('#9' + courseData['Slot'][slot]).html(temp_list.join(":")) } } - $('#details-div').html(""); + $('#details-div').html(""); } else { $('#details-div').html(""); @@ -389,4 +391,4 @@ function readICS() { reader.readAsText(file); } -} \ No newline at end of file +} diff --git a/templates/home.html b/templates/home.html index 09e08bc..73bea6e 100644 --- a/templates/home.html +++ b/templates/home.html @@ -2,9 +2,10 @@ - what-slot-iiitb + IIIT-B Time Table - + + @@ -32,6 +33,7 @@ + @@ -44,11 +46,22 @@ IIIT-B -