Files
spring-boot-demo/thymeleaf-htmx/src/main/resources/templates/layout/base.html
T

19 lines
881 B
HTML

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
th:fragment="layout(title, content)">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title th:replace="${title}">Contacts</title>
<!-- htmx 2 swaps 2xx/3xx only. 422 must be allowed to swap, or validation errors never appear. -->
<meta name="htmx-config"
content='{"responseHandling":[{"code":"204","swap":false},{"code":"[23]..","swap":true},{"code":"422","swap":true,"error":false},{"code":"[45]..","swap":false,"error":true},{"code":"...","swap":false}]}'>
<link rel="stylesheet" th:href="@{/css/app.css}">
<script th:src="@{/webjars/htmx.org/dist/htmx.min.js}" defer></script>
</head>
<body>
<header><a th:href="@{/contacts}">Contacts</a></header>
<main th:replace="${content}">page content goes here</main>
</body>
</html>