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
This commit is contained in:
2025-01-14 18:39:26 +01:00
parent 182508e919
commit 091f172521
6 changed files with 41 additions and 1 deletions

View File

@@ -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

View File

@@ -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"
}

View File

@@ -0,0 +1,15 @@
<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<title>Home Pages</title>
<!--/*/<th:block th:insert="~{layout.html :: documentHead}"/>/*/-->
</head>
<body>
<main>
<h1>Test</h1>
<hr>
<p>This is a index page!</p>
</main>
<!--/*/<th:block th:replace="~{layout.html :: script}"/>/*/-->
</body>
</html>

View File

@@ -0,0 +1,12 @@
<!DOCTYPE HTML>
<html lang="" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="documentHead">
<meta charset="UTF-8">
<link th:href="@{/css/management.css}" rel="stylesheet">
</head>
<body>
<div th:fragment="script">
<script th:src="@{/js/management.js}"></script>
</div>
</body>
</html>