diff --git a/static/css/custom.css b/static/css/custom.css index aaff319..543a66d 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -4,4 +4,8 @@ -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; +} + +.jumbotron { + padding: 2rem 2rem; } \ No newline at end of file diff --git a/static/js/custom.js b/static/js/custom.js new file mode 100644 index 0000000..db788d3 --- /dev/null +++ b/static/js/custom.js @@ -0,0 +1,26 @@ + +function formatDate(date) { + var d = new Date(date), + month = '' + (d.getMonth() + 1), + day = '' + d.getDate(), + year = d.getFullYear(); + hours = d.getHours(); + minutes = d.getMinutes(); + + if (month.length < 2) month = '0' + month; + if (day.length < 2) day = '0' + day; + if (hours.length < 2) hours = '0' + hours; + if (minutes.length < 2) minutes = '0' + minutes; + + return [year, month, day, hours, minutes].join('-'); +} + +$( "#get-data-button" ).on( "click", function() { + var from_date = formatDate($("#datetimepicker_from").datetimepicker('viewDate')._d); + var to_date = formatDate($("#datetimepicker_to").datetimepicker('viewDate')._d); + window.location.replace("/?start_date="+from_date+"&end_date="+to_date); +}); + +$( "#clean-data-button" ).on( "click", function() { + window.location.replace("/"); +}); diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..488116b --- /dev/null +++ b/templates/base.html @@ -0,0 +1,74 @@ +{% load staticfiles %} + + +
+ +This example is a quick exercise to illustrate how the bottom navbar works.
#} -{# View navbar docs »#} -