Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
c00638fe
Commit
c00638fe
authored
Jan 30, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Thymeleaf's layout dialect from its starter and update samples
Closes gh-7557
parent
9a7e5cae
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
138 additions
and
162 deletions
+138
-162
hello.html
...t-sample-devtools/src/main/resources/templates/hello.html
+21
-22
layout.html
...-sample-devtools/src/main/resources/templates/layout.html
+0
-12
fragments.html
...sample-web-ui/src/main/resources/templates/fragments.html
+20
-0
layout.html
...ot-sample-web-ui/src/main/resources/templates/layout.html
+0
-25
form.html
...le-web-ui/src/main/resources/templates/messages/form.html
+31
-32
list.html
...le-web-ui/src/main/resources/templates/messages/list.html
+35
-34
view.html
...le-web-ui/src/main/resources/templates/messages/view.html
+31
-33
pom.xml
spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml
+0
-4
No files found.
spring-boot-samples/spring-boot-sample-devtools/src/main/resources/templates/hello.html
View file @
c00638fe
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
<head>
<title>
Hello
</title>
</head>
<body>
<h1
layout:fragment=
"header"
th:text=
"${message}"
>
Header
</h1>
<div
layout:fragment=
"content"
>
<h2
th:text=
"${sessionVar}"
>
Session Var
</h2>
Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Cras ut fringilla augue, quis dictum
turpis. Sed tincidunt mi vel euismod viverra. Nulla facilisi.
Suspendisse mauris dolor, egestas ac leo at, porttitor ullamcorper
leo. Suspendisse consequat, justo ut rutrum interdum, nibh massa
semper dui, id sagittis tellus lectus at nibh. Etiam at scelerisque
nisi. Quisque vel eros tempor, fermentum sapien sed, gravida neque.
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>
</body>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head>
<title>
Hello
</title>
</head>
<body>
<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
turpis. Sed tincidunt mi vel euismod viverra. Nulla facilisi.
Suspendisse mauris dolor, egestas ac leo at, porttitor ullamcorper
leo. Suspendisse consequat, justo ut rutrum interdum, nibh massa
semper dui, id sagittis tellus lectus at nibh. Etiam at scelerisque
nisi. Quisque vel eros tempor, fermentum sapien sed, gravida neque.
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>
</body>
</html>
spring-boot-samples/spring-boot-sample-devtools/src/main/resources/templates/layout.html
deleted
100644 → 0
View file @
9a7e5cae
<!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>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/fragments.html
0 → 100644
View file @
c00638fe
<!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>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/layout.html
deleted
100644 → 0
View file @
9a7e5cae
<!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>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/form.html
View file @
c00638fe
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
<head>
<title>
Messages : Create
</title>
</head>
<body>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<div
layout:fragment=
"content"
class=
"container"
>
<form
id=
"messageForm"
th:action=
"@{/(form)}"
th:object=
"${message}"
action=
"#"
method=
"post"
>
<div
th:if=
"${#fields.hasErrors('*')}"
class=
"alert alert-error"
>
<p
th:each=
"error : ${#fields.errors('*')}"
th:text=
"${error}"
>
Validation error
</p>
</div>
<div
class=
"pull-right"
>
<a
th:href=
"@{/}"
href=
"messages.html"
>
Messages
</a>
</div>
<input
type=
"hidden"
th:field=
"*{id}"
th:class=
"${#fields.hasErrors('id')} ? 'field-error'"
/>
<label
for=
"summary"
>
Summary
</label>
<input
type=
"text"
th:field=
"*{summary}"
th:class=
"${#fields.hasErrors('summary')} ? 'field-error'"
/>
<label
for=
"text"
>
Message
</label>
<textarea
th:field=
"*{text}"
th:class=
"${#fields.hasErrors('text')} ? 'field-error'"
></textarea>
<div
class=
"form-actions"
>
<input
type=
"submit"
value=
"Save"
/>
</div>
</form>
</div>
</body>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head
th:replace=
"fragments :: head(title='Messages : Create')"
>
<title>
Messages : Create
</title>
</head>
<body>
<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"
>
<p
th:each=
"error : ${#fields.errors('*')}"
th:text=
"${error}"
>
Validation error
</p>
</div>
<div
class=
"pull-right"
>
<a
th:href=
"@{/}"
href=
"messages.html"
>
Messages
</a>
</div>
<input
type=
"hidden"
th:field=
"*{id}"
th:class=
"${#fields.hasErrors('id')} ? 'field-error'"
/>
<label
for=
"summary"
>
Summary
</label>
<input
type=
"text"
th:field=
"*{summary}"
th:class=
"${#fields.hasErrors('summary')} ? 'field-error'"
/>
<label
for=
"text"
>
Message
</label>
<textarea
th:field=
"*{text}"
th:class=
"${#fields.hasErrors('text')} ? 'field-error'"
></textarea>
<div
class=
"form-actions"
>
<input
type=
"submit"
value=
"Save"
/>
</div>
</form>
</div>
</body>
</html>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/list.html
View file @
c00638fe
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
<head>
<title>
Messages : View all
</title>
</head>
<body>
<h1
layout:fragment=
"header"
>
Messages : View all
</h1>
<div
layout:fragment=
"content"
class=
"container"
>
<div
class=
"pull-right"
>
<a
href=
"form.html"
th:href=
"@{/(form)}"
>
Create Message
</a>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head
th:replace=
"fragments :: head(title='Messages : View all')"
>
<title>
Messages : View all
</title>
</head>
<body>
<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>
<table
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td>
ID
</td>
<td>
Created
</td>
<td>
Summary
</td>
</tr>
</thead>
<tbody>
<tr
th:if=
"${messages.empty}"
>
<td
colspan=
"3"
>
No messages
</td>
</tr>
<tr
th:each=
"message : ${messages}"
>
<td
th:text=
"${message.id}"
>
1
</td>
<td
th:text=
"${#calendars.format(message.created)}"
>
July 11,
2012 2:17:16 PM CDT
</td>
<td><a
href=
"view.html"
th:href=
"@{'/' + ${message.id}}"
th:text=
"${message.summary}"
>
The summary
</a></td>
</tr>
</tbody>
</table>
</div>
</div>
<table
class=
"table table-bordered table-striped"
>
<thead>
<tr>
<td>
ID
</td>
<td>
Created
</td>
<td>
Summary
</td>
</tr>
</thead>
<tbody>
<tr
th:if=
"${messages.empty}"
>
<td
colspan=
"3"
>
No messages
</td>
</tr>
<tr
th:each=
"message : ${messages}"
>
<td
th:text=
"${message.id}"
>
1
</td>
<td
th:text=
"${#calendars.format(message.created)}"
>
July 11,
2012 2:17:16 PM CDT
</td>
<td><a
href=
"view.html"
th:href=
"@{'/' + ${message.id}}"
th:text=
"${message.summary}"
>
The summary
</a></td>
</tr>
</tbody>
</table>
</div>
</body>
</body>
</html>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/view.html
View file @
c00638fe
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
<head>
<title>
Messages : View
</title>
</head>
<body>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<div
layout:fragment=
"content"
class=
"container"
>
<div
class=
"alert alert-success"
th:if=
"${globalMessage}"
th:text=
"${globalMessage}"
>
Some Success message
</div>
<div
class=
"pull-right"
>
<a
th:href=
"@{/}"
href=
"list.html"
>
Messages
</a>
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<head
th:replace=
"fragments :: head(title='Messages : View')"
>
<title>
Messages : View
</title>
</head>
<body>
<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"
>
<a
th:href=
"@{/}"
href=
"list.html"
>
Messages
</a>
</div>
<dl>
<dt>
ID
</dt>
<dd
id=
"id"
th:text=
"${message.id}"
>
123
</dd>
<dt>
Date
</dt>
<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>
<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>
</div>
</div>
<dl>
<dt>
ID
</dt>
<dd
id=
"id"
th:text=
"${message.id}"
>
123
</dd>
<dt>
Date
</dt>
<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>
<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>
</div>
</div>
</body>
</body>
</html>
spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml
View file @
c00638fe
...
...
@@ -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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment