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:
@@ -9,7 +9,7 @@ insert_final_newline = true
|
|||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
tab_width = 4
|
tab_width = 4
|
||||||
|
|
||||||
[*.{md,sh,xml,xsd,yaml,yml}]
|
[*.{css,html,js,md,sh,xml,xsd,yaml,yml}]
|
||||||
max_line_length = 1024
|
max_line_length = 1024
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
tab_width = 2
|
tab_width = 2
|
||||||
|
|||||||
13
src/main/kotlin/ltd/hlaeja/controller/HomeController.kt
Normal file
13
src/main/kotlin/ltd/hlaeja/controller/HomeController.kt
Normal 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"
|
||||||
|
}
|
||||||
0
src/main/resources/static/css/management.css
Normal file
0
src/main/resources/static/css/management.css
Normal file
0
src/main/resources/static/js/management.js
Normal file
0
src/main/resources/static/js/management.js
Normal file
15
src/main/resources/templates/home/index.html
Normal file
15
src/main/resources/templates/home/index.html
Normal 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>
|
||||||
12
src/main/resources/templates/layout.html
Normal file
12
src/main/resources/templates/layout.html
Normal 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>
|
||||||
Reference in New Issue
Block a user