Skip to content

Commit f22dfff

Browse files
committed
refactor(site/index.html): use lists instead of independent paragraphs.
It also combines some lines together to make code shorter. No functional changes.
1 parent 3d38e54 commit f22dfff

File tree

1 file changed

+29
-67
lines changed

1 file changed

+29
-67
lines changed

src/main/webapp/WEB-INF/views/site/index.html

Lines changed: 29 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,15 @@
105105
<div class="panel-heading">
106106
<h4 class="panel-title" th:text="#{t_recently_added_collections}">Recently created collections</h4>
107107
</div>
108-
<div class="panel-body" th:remove="all-but-first">
109-
<p th:each="collection : ${recentlyAddedCollections}">
110-
<a href="../collection/info.html" th:href="@{${INFO_COLLECTION_PAGE}(slug=${collection.slug})}" th:text="${collection.name}">John Doe</a>
111-
</p>
112-
<p>
113-
<a href="../collection/info.html">Edith Roberts</a>
114-
</p>
115-
<p>
116-
<a href="../collection/info.html">Tyler Dean</a>
117-
</p>
118-
<p>
119-
<a href="../collection/info.html">Gwen Schultz</a>
120-
</p>
108+
<div class="panel-body">
109+
<ul class="list-unstyled" th:remove="all-but-first">
110+
<li th:each="collection : ${recentlyAddedCollections}">
111+
<a href="../collection/info.html" th:href="@{${INFO_COLLECTION_PAGE}(slug=${collection.slug})}" th:text="${collection.name}">John Doe</a>
112+
</li>
113+
<li><a href="../collection/info.html">Edith Roberts</a></li>
114+
<li><a href="../collection/info.html">Tyler Dean</a></li>
115+
<li><a href="../collection/info.html">Gwen Schultz</a></li>
116+
</ul>
121117
</div>
122118
</div>
123119
<!--/*/
@@ -132,60 +128,26 @@ <h4 class="panel-title" th:text="#{t_recently_added_collections}">Recently creat
132128
<div class="panel-heading">
133129
<h4 class="panel-title" th:text="#{t_recently_added_series}">Recently added series</h4>
134130
</div>
135-
<div class="panel-body" th:remove="all-but-first">
136-
<p th:each="series : ${recentlyAddedSeries}">
137-
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
138-
<span th:remove="tag" th:if="${series.country != null}" th:text="|${series.country}, |">Italy, </span>
139-
<span th:remove="tag" th:if="${series.year != null}" th:text="|${series.year}, |">1999, </span>
140-
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
141-
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
142-
</a>
143-
</p>
144-
<p>
145-
<a href="../series/info.html">
146-
Italy, 1997, 8&nbsp;stamps
147-
</a>
148-
</p>
149-
<p>
150-
<a href="../series/info.html">
151-
Italy, 2009, 10&nbsp;stamps
152-
</a>
153-
</p>
154-
<p>
155-
<a href="../series/info.html">
156-
Italy, 4&nbsp;stamps
157-
</a>
158-
</p>
159-
<p>
160-
<a href="../series/info.html">
161-
Italy, 2002, 12&nbsp;stamps
162-
</a>
163-
</p>
164-
<p>
165-
<a href="../series/info.html">
166-
Italy, 1993, 19&nbsp;stamps
167-
</a>
168-
</p>
169-
<p>
170-
<a href="../series/info.html">
171-
Italy, 4&nbsp;stamps
172-
</a>
173-
</p>
174-
<p>
175-
<a href="../series/info.html">
176-
Italy, 11&nbsp;stamps (without perforation)
177-
</a>
178-
</p>
179-
<p>
180-
<a href="../series/info.html">
181-
Italy, 2014, 1&nbsp;stamp
182-
</a>
183-
</p>
184-
<p>
185-
<a href="../series/info.html">
186-
Italy, 1996, 16&nbsp;stamps (without perforation)
187-
</a>
188-
</p>
131+
<div class="panel-body">
132+
<ul class="list-unstyled" th:remove="all-but-first">
133+
<li th:each="series : ${recentlyAddedSeries}">
134+
<a href="../series/info.html" th:href="@{${INFO_SERIES_PAGE}(id=${series.id})}">
135+
<span th:remove="tag" th:if="${series.country != null}" th:text="|${series.country}, |">Italy, </span>
136+
<span th:remove="tag" th:if="${series.year != null}" th:text="|${series.year}, |">1999, </span>
137+
<span th:remove="tag" th:text="|${series.quantity}&nbsp;${series.quantity != 1 ? '__#{t_stamps}__' : '__#{t_stamp}__'}|">7&nbsp;stamps</span>
138+
<span th:remove="tag" th:if="${not series.perforated}" th:text="|(#{t_wo_perforation_short})|">(without perforation)</span>
139+
</a>
140+
</li>
141+
<li><a href="../series/info.html">Italy, 1997, 8&nbsp;stamps</a></li>
142+
<li><a href="../series/info.html">Italy, 2009, 10&nbsp;stamps</a></li>
143+
<li><a href="../series/info.html">Italy, 4&nbsp;stamps</a></li>
144+
<li><a href="../series/info.html">Italy, 2002, 12&nbsp;stamps</a></li>
145+
<li><a href="../series/info.html">Italy, 1993, 19&nbsp;stamps</a></li>
146+
<li><a href="../series/info.html">Italy, 4&nbsp;stamps</a></li>
147+
<li><a href="../series/info.html">Italy, 11&nbsp;stamps (without perforation)</a></li>
148+
<li><a href="../series/info.html">Italy, 2014, 1&nbsp;stamp</a></li>
149+
<li><a href="../series/info.html">Italy, 1996, 16&nbsp;stamps (without perforation)</a></li>
150+
</ul>
189151
</div>
190152
</div>
191153
<!--/*/

0 commit comments

Comments
 (0)