<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  layout:decorator="/templates/layout">
  <head>
  	<title>TPC-W</title>
  </head>
<body>
<div layout:fragment="content">
	<div class="jumbotron">
		<h1>TPC Web Commerce Benchmark (TPC-W)</h1>
	</div>
<!-- 	<div th:text="${welcomeMessage}"> -->
<!-- 	</div> -->
	<div class="promotional">
		<div class="pull-left" th:each="item : ${promotional}">
			<a th:href="@{'/product-detail?I_ID=' + ${item.IId} + '' + ${productUrl}}">
				<img th:src="@{ ${imgResourceUrl} + '/' + ${item.IThumbnail}}" src="" width="100" height="100" />
			</a>
		</div>
		<div class="clearfix"></div>
	</div>
	
	<hr />
	
	<div class="categories">
		<div>
			<div class="pull-left" style="width: 340px; text-align: center;">
				<h3>What's new</h3>
			</div>
			<div class="pull-right" style="width: 260px; text-align: center;">
				<h3>Best sellers</h3>
			</div>
			<div class="clearfix"></div>
		</div>
		<div>
			<div class="pull-left left-column">
				<table>
					<tr th:each="category : ${categories}">
						<td>
							<a th:text="${category.left}" th:href="@{'/new-products?SUBJECT=' + ${category.leftUrl}}"></a>
						</td>
						<td>
							<a th:text="${category.right}" th:href="@{'/new-products?SUBJECT=' + ${category.rightUrl}}"></a>
						</td>
					</tr>
				</table>
			</div>
			<div class="pull-right right-column">
				<table>
					<tr th:each="category : ${categories}">
						<td>
							<a th:text="${category.left}" th:href="@{'/best-sellers?SUBJECT=' + ${category.leftUrl}}"></a>
						</td>
						<td>
							<a th:text="${category.right}" th:href="@{'/best-sellers?SUBJECT=' + ${category.rightUrl}}"></a>
						</td>
					</tr>
				</table>
			</div>
			<div class="clearfix"></div>
		</div>		
	</div>
</div>

</body>
</html>
