diff --git a/src/pages/startpage.json b/src/pages/startpage.json new file mode 100644 index 0000000..8c9fb6f --- /dev/null +++ b/src/pages/startpage.json @@ -0,0 +1,7 @@ +{ + "hash": true, + "title": "tlater.net startpage", + "filename": "../startpage.html", + "template": "./src/startpage/startpage.pug", + "chunks": ["startpage"] +} diff --git a/src/startpage/startpage.js b/src/startpage/startpage.js new file mode 100644 index 0000000..1972868 --- /dev/null +++ b/src/startpage/startpage.js @@ -0,0 +1,9 @@ +import "bootstrap"; +import "./startpage.scss"; + +function print_time_recursively (element) { + element.html(new Date().toLocaleString()); + setTimeout(() => print_time_recursively(element), 1000); +} + +$(() => print_time_recursively($("#clock h1"))); diff --git a/src/startpage/startpage.pug b/src/startpage/startpage.pug new file mode 100644 index 0000000..9f2ae0b --- /dev/null +++ b/src/startpage/startpage.pug @@ -0,0 +1,7 @@ +extends ../lib/pug/base + +block content + .container + .row + #clock.col-md-12 + h1 diff --git a/src/startpage/startpage.scss b/src/startpage/startpage.scss new file mode 100644 index 0000000..3e6178b --- /dev/null +++ b/src/startpage/startpage.scss @@ -0,0 +1,6 @@ +@import "../lib/scss/main"; +@import "~bootstrap/scss/bootstrap"; + +#clock { + text-align: center; +}