summaryrefslogtreecommitdiff
path: root/spring-boot/07-thymeleaf-common-theme/src/main/resources/templates/layout/main.html
blob: b91f6f5b957ab8dc77f7ac7dee248917ca96939e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" 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>
        </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>