From c3b7b013af860e49dda45b5a0795fa98de99a9e8 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 9 Apr 2019 19:03:42 +0200 Subject: Added index template --- src/main/kotlin/App.kt | 6 ++++++ src/main/resources/views/index.rocker.html | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 src/main/resources/views/index.rocker.html (limited to 'src') diff --git a/src/main/kotlin/App.kt b/src/main/kotlin/App.kt index e856ade..c8d2bf8 100644 --- a/src/main/kotlin/App.kt +++ b/src/main/kotlin/App.kt @@ -35,6 +35,12 @@ fun main() { databaseController.createUser("melvin", "supersecure", "ADMIN") app.routes { + /** + * Main page + * TODO: Create landing page + */ + get("/", { ctx -> ctx.render("index.rocker.html") }, roles(Roles.GUEST)) + /** * Sends a json object of filenames in [fileHome]s * TODO: Fix possible security issue with "../" diff --git a/src/main/resources/views/index.rocker.html b/src/main/resources/views/index.rocker.html new file mode 100644 index 0000000..3389ba9 --- /dev/null +++ b/src/main/resources/views/index.rocker.html @@ -0,0 +1,3 @@ +@layout.template("Index", RockerContent.NONE, RockerContent.NONE) -> { +