summaryrefslogtreecommitdiff
path: root/spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout
diff options
context:
space:
mode:
authorKamal Wickramanayake <kamal@inbox.lk>2026-06-13 21:03:31 +0530
committerKamal Wickramanayake <kamal@inbox.lk>2026-06-13 21:03:31 +0530
commitf0001c5c8d8a33729b93d8d6e10d3af40bfabed6 (patch)
tree6042e5bfdd48671daa95baf29c5041e526f5b62e /spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout
parent6ae21cd4e51756ea14b43b82a9d500bca9fb8032 (diff)
Added sample application 09-spring-security-db-authentication
Diffstat (limited to 'spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout')
-rw-r--r--spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout/main.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout/main.html b/spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout/main.html
new file mode 100644
index 0000000..5f988d0
--- /dev/null
+++ b/spring-boot/09-spring-security-db-authentication/src/main/resources/templates/layout/main.html
@@ -0,0 +1,35 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org"
+ xmlns:sec="http://thymeleaf.org/extras/spring-security"
+ th:fragment="layout(title, content)">
+
+<head>
+ <title th:text="|${title} - ABC App|">Base title not shown</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" th:href="@{/css/main.css}" />
+</head>
+
+<body>
+ <header>
+ <h1>ABC App</h1>
+ </header>
+
+ <nav class="main-nav">
+ <ul>
+ <li><a th:href="@{/}">Home</a></li>
+ <li><a th:href="@{/contact}">Contact Us</a></li>
+ <li><a th:href="@{/profile/{name}(name=${#authentication.name})}" sec:authorize="isAuthenticated()">Profile</a></li>
+ <li><a th:href="@{/logout}" sec:authorize="isAuthenticated()">Logout</a></li>
+ </ul>
+ </nav>
+
+ <h3 th:text="|${title}|">Page content area title</h3>
+
+ <th:block th:replace="${content}" />
+
+ <footer>
+ Copyright &copy; 2026 Example Company. All rights reserved.
+ </footer>
+</body>
+
+</html> \ No newline at end of file