aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/js/app.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 309625f..2cb5df7 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -37,6 +37,10 @@ function date_f(d) {
return new Intl.DateTimeFormat('nb-NO', opts).format(d)
}
+function capitalize(s) {
+ return s.slice(0, 1).toUpperCase() + s.slice(1)
+}
+
function isodate(d) {
return d.getFullYear() + "-" + pad(d.getMonth() + 1) + "-" + pad(d.getDate())
}
@@ -183,7 +187,7 @@ window.addEventListener("load", function() {
console.log("dateobj: " + dateobj)
day.id = "program-" + isodate(dateobj)
- day.innerHTML = '<h2>' + date_f(dateobj) + '</h2>'
+ day.innerHTML = '<h2>' + capitalize(date_f(dateobj)) + '</h2>'
+ '<canvas id="canvas-' + isodate(dateobj) + '" height="' + canvas_height * 2 + '" width="' + width * 2 + '">'
+ '</canvas>'
p.appendChild(day)