Skip to content

Commit aa30adb

Browse files
committed
1.5 beginning
1 parent e7d405f commit aa30adb

6 files changed

Lines changed: 31 additions & 7 deletions

File tree

src/main/resources/static/script.js

Whitespace-only changes.

src/main/resources/static/styles.css

Whitespace-only changes.

src/main/resources/templates/events/create.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
<h1>Create Event</h1>
1010

11-
<form method="post" action="/events/create">
12-
<input type="text" name="eventName">
11+
<nav th:replace="fragments :: navigation"></nav>
12+
13+
<form method="post" action="/templates/events/create.html">
14+
<label>
15+
<input type="text" name="eventName">
16+
</label>
1317
<input type="submit" value="Create Event">
1418
</form>
1519
</body>

src/main/resources/templates/events/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
<header th:replace="fragments :: header"></header>
88

9+
<nav th:replace="fragments :: navigation"></nav>
10+
911
<table class="table table-striped">
1012
<thead>
1113
<tr>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
3+
<head>
4+
<meta charset="UTF-8"/> <!-- Note the closing '/' character -->
5+
<title></title>
6+
7+
<script th:src="@{script.js}"></script>
8+
<link th:src="@{styles.css}">
9+
</head>
10+
<body>
11+
12+
<nav th:fragment="navigation">
13+
<ul>
14+
<li><a href="/templates/events">All Events</a></li>
15+
<li><a href="/templates/events/create.html">Create Event</a></li>
16+
</ul>
17+
</nav>
18+
19+
20+
</body>
21+
</html>

src/main/resources/templates/index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@
88

99
<h1>Coding Events</h1>
1010

11-
<nav>
12-
<ul>
13-
<li><a href="/events">All Events</a></li>
14-
</ul>
15-
</nav>
11+
<nav th:replace="fragments :: navigation"></nav>
12+
1613

1714
</body>
1815
</html>

0 commit comments

Comments
 (0)