From 091f17252122fcf801c8786e410cf54c1246df3b Mon Sep 17 00:00:00 2001 From: Swordsteel Date: Tue, 14 Jan 2025 18:39:26 +0100 Subject: [PATCH] make simple test landing pages - add HomeController - add index.html - add layout.html - add management.js - add management.css - add css js and html to .editorconfig --- .editorconfig | 2 +- .../ltd/hlaeja/controller/HomeController.kt | 13 +++++++++++++ src/main/resources/static/css/management.css | 0 src/main/resources/static/js/management.js | 0 src/main/resources/templates/home/index.html | 15 +++++++++++++++ src/main/resources/templates/layout.html | 12 ++++++++++++ 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/main/kotlin/ltd/hlaeja/controller/HomeController.kt create mode 100644 src/main/resources/static/css/management.css create mode 100644 src/main/resources/static/js/management.js create mode 100644 src/main/resources/templates/home/index.html create mode 100644 src/main/resources/templates/layout.html diff --git a/.editorconfig b/.editorconfig index cf8a52e..96b4507 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ insert_final_newline = true max_line_length = 120 tab_width = 4 -[*.{md,sh,xml,xsd,yaml,yml}] +[*.{css,html,js,md,sh,xml,xsd,yaml,yml}] max_line_length = 1024 indent_size = 2 tab_width = 2 diff --git a/src/main/kotlin/ltd/hlaeja/controller/HomeController.kt b/src/main/kotlin/ltd/hlaeja/controller/HomeController.kt new file mode 100644 index 0000000..676026b --- /dev/null +++ b/src/main/kotlin/ltd/hlaeja/controller/HomeController.kt @@ -0,0 +1,13 @@ +package ltd.hlaeja.controller + +import org.springframework.stereotype.Controller +import org.springframework.ui.Model +import org.springframework.web.bind.annotation.GetMapping + +@Controller +class HomeController { + + @Suppress("UnusedParameter", "FunctionOnlyReturningConstant") + @GetMapping("/") + fun home(model: Model): String = "home/index" +} diff --git a/src/main/resources/static/css/management.css b/src/main/resources/static/css/management.css new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/static/js/management.js b/src/main/resources/static/js/management.js new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/templates/home/index.html b/src/main/resources/templates/home/index.html new file mode 100644 index 0000000..55922f2 --- /dev/null +++ b/src/main/resources/templates/home/index.html @@ -0,0 +1,15 @@ + + + + Home Pages + + + +
+

Test

+
+

This is a index page!

+
+ + + diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html new file mode 100644 index 0000000..b4d4734 --- /dev/null +++ b/src/main/resources/templates/layout.html @@ -0,0 +1,12 @@ + + + + + + + +
+ +
+ +