Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved the structure of Thymeleaf views. Added Ajax view for signup…
…. New AboutController. Jquery now bundled.
- Loading branch information
Showing
14 changed files
with
132 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/resources/archetype-resources/src/main/java/home/AboutController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package ${package}.home; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.ModelAttribute; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
|
||
@Controller | ||
class AboutController { | ||
|
||
@ModelAttribute("module") | ||
String module() { | ||
return "about"; | ||
} | ||
|
||
@GetMapping("/about") | ||
String about() { | ||
return "home/about"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/main/resources/archetype-resources/src/main/webapp/WEB-INF/views/fragments/alert.html
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...ain/resources/archetype-resources/src/main/webapp/WEB-INF/views/fragments/components.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<link href="../../../resources/css/bootstrap.min.css" rel="stylesheet" media="screen" th:href="@{/resources/css/bootstrap.min.css}"/> | ||
</head> | ||
<body> | ||
<!-- Reusable alert --> | ||
<div th:fragment="alert (type, message)" class="alert alert-dismissable" th:classappend="'alert-' + ${type}"> | ||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | ||
<span th:text="${message}">Test</span> | ||
</div> | ||
<!-- Reusable modal --> | ||
<div th:fragment="modal (id, title)" class="modal fade" th:id="${id}" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> | ||
<h4 class="modal-title" id="modalLabel" th:text="${title}">My modal</h4> | ||
</div> | ||
<div class="modal-body" th:id="${id + '-body'}"></div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | ||
</div> | ||
</div><!-- /.modal-content --> | ||
</div><!-- /.modal-dialog --> | ||
</div><!-- /.modal --> | ||
</body> | ||
</html> |
13 changes: 0 additions & 13 deletions
13
src/main/resources/archetype-resources/src/main/webapp/WEB-INF/views/fragments/footer.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/main/resources/archetype-resources/src/main/webapp/WEB-INF/views/home/about.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org"> | ||
<head> | ||
<title th:text="#{view.index.title}">Welcome!</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | ||
<link href="../../../resources/css/bootstrap.min.css" rel="stylesheet" media="screen" th:href="@{/resources/css/bootstrap.min.css}"/> | ||
<link href="../../../resources/css/core.css" rel="stylesheet" media="screen" th:href="@{/resources/css/core.css}" /> | ||
<script src="../../../resources/js/jquery.min.js" th:src="@{/resources/js/jquery.min.js}"></script> | ||
<script src="../../../resources/js/bootstrap.min.js" th:src="@{/resources/js/bootstrap.min.js}"></script> | ||
</head> | ||
<body> | ||
<div th:replace="fragments/layout :: header"></div> | ||
<div class="container"> | ||
<p class="lead text-center"> | ||
About | ||
</p> | ||
</div> | ||
<div th:replace="fragments/layout :: footer"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/resources/archetype-resources/src/main/webapp/resources/js/jquery.min.js
Large diffs are not rendered by default.
Oops, something went wrong.