Remove Thymeleaf's layout dialect from its starter and update samples

Closes gh-7557
pull/7744/merge
Andy Wilkinson 8 years ago
parent 9a7e5caea7
commit c00638fee3

@ -1,13 +1,11 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Hello</title>
</head>
<body>
<h1 layout:fragment="header" th:text="${message}">Header</h1>
<div layout:fragment="content">
<h1 th:text="${message}">Header</h1>
<div class="content">
<h2 th:text="${sessionVar}">Session Var</h2>
Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Cras ut fringilla augue, quis dictum
@ -19,6 +17,7 @@
Fusce interdum sed dolor a semper. Morbi porta mauris a velit laoreet
viverra. Praesent et tellus vehicula, sagittis mi quis, faucibus urna.
Ut diam tortor, vehicula eget aliquam eget, elementum a odio. Fusce at
nisl sapien. Suspendisse potenti.</div>
nisl sapien. Suspendisse potenti.
</div>
</body>
</html>

@ -1,12 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
<title>Layout</title>
<link rel="stylesheet" th:href="@{/css/application.css}" />
</head>
<body>
<h1 layout:fragment="header">Header</h1>
<div layout:fragment="content" class="content">Content</div>
</body>
</html>

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head (title)">
<title th:text="${title}">Fragments</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"
href="../../css/bootstrap.min.css" />
</head>
<body>
<div class="container">
<div th:fragment="navbar" class="navbar">
<div class="navbar-inner">
<a class="brand" href="http://thymeleaf.org">Thymeleaf</a>
<ul class="nav">
<li><a th:href="@{/}" href="messages.html"> Messages </a></li>
</ul>
</div>
</div>
</div>
</body>
</html>

@ -1,25 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
<title>Layout</title>
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"
href="../../css/bootstrap.min.css" />
</head>
<body>
<div class="container">
<div class="navbar">
<div class="navbar-inner">
<a class="brand"
href="https://github.com/ultraq/thymeleaf-layout-dialect">
Thymeleaf - Layout </a>
<ul class="nav">
<li><a th:href="@{/}" href="messages.html"> Messages </a></li>
</ul>
</div>
</div>
<h1 layout:fragment="header">Layout</h1>
<div layout:fragment="content">Fake content</div>
</div>
</body>
</html>

@ -1,13 +1,12 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments :: head(title='Messages : Create')">
<title>Messages : Create</title>
</head>
<body>
<h1 layout:fragment="header">Messages : Create</h1>
<div layout:fragment="content" class="container">
<div class="container">
<div th:replace="fragments :: navbar"></div>
<h1>Messages : Create</h1>
<form id="messageForm" th:action="@{/(form)}" th:object="${message}"
action="#" method="post">
<div th:if="${#fields.hasErrors('*')}" class="alert alert-error">

@ -1,13 +1,13 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments :: head(title='Messages : View all')">
<title>Messages : View all</title>
</head>
<body>
<h1 layout:fragment="header">Messages : View all</h1>
<div layout:fragment="content" class="container">
<div class="container">
<div th:replace="fragments :: navbar"></div>
<h1>Messages : View all</h1>
<div class="container">
<div class="pull-right">
<a href="form.html" th:href="@{/(form)}">Create Message</a>
</div>
@ -33,5 +33,6 @@
</tbody>
</table>
</div>
</div>
</body>
</html>

@ -1,12 +1,12 @@
<html xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator="layout">
<head>
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments :: head(title='Messages : View')">
<title>Messages : View</title>
</head>
<body>
<h1 layout:fragment="header">Messages : Create</h1>
<div layout:fragment="content" class="container">
<div class="container">
<div th:replace="fragments :: navbar"></div>
<h1>Messages : View</h1>
<div class="alert alert-success" th:if="${globalMessage}"
th:text="${globalMessage}">Some Success message</div>
<div class="pull-right">
@ -19,16 +19,14 @@
<dd id="created" th:text="${#calendars.format(message.created)}">
July 11, 2012 2:17:16 PM CDT</dd>
<dt>Summary</dt>
<dd id="summary" th:text="${message.summary}">A short summary...
</dd>
<dd id="summary" th:text="${message.summary}">A short summary...</dd>
<dt>Message</dt>
<dd id="text" th:text="${message.text}">A detailed message that
is longer than the summary.</dd>
</dl>
<div class="pull-left">
<a href="messages" th:href="@{'/delete/' + ${message.id}}">
delete </a> | <a href="form.html"
th:href="@{'/modify/' + ${message.id}}"> modify </a>
<a href="messages" th:href="@{'/delete/' + ${message.id}}">delete </a> |
<a href="form.html" th:href="@{'/modify/' + ${message.id}}"> modify </a>
</div>
</div>
</body>

@ -30,9 +30,5 @@
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring5</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>
</dependencies>
</project>

Loading…
Cancel
Save