Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ public String spaMenu(@RequestParam String name, @RequestParam String skintype,
appropriateFacials.add(facials.get(i));
}
}

model.addAttribute("name" , name);
model.addAttribute("skintype", skintype);
model.addAttribute("facials", facials);
model.addAttribute("appropriateFacials", appropriateFacials);
model.addAttribute("manipedi", manipedi);
return "menu";
}
}
46 changes: 44 additions & 2 deletions src/main/resources/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ body {
background-color: pink;
}

div {
div:not(.grid):not(.cell) {
margin: auto;
width: 50%;
padding: 10px;
Expand All @@ -23,4 +23,46 @@ table {
width: 50%;
padding: 10px;
text-align: center;
}
}

.container {
display: grid;
place-items: center;
}

.grid {
display: grid;
grid-template-columns: repeat(6, 80px);
grid-template-rows: repeat(1, 80px);
position:absolute;
bottom:0;
}

.cell {
justify-content: center;
align-items: center;
display: flex;
}

div#\31 {
background: #D9BCF2;
}
div#\32 {
background: #AED8F2;
}
div#\33 {
background: #F2DEA2;
}
div#\34 {
background: #F2CDC4;
}
div#\35 {
background: #A9B5D9;
}
div#\36 {
background: #F2A477;
}




37 changes: 36 additions & 1 deletion src/main/resources/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,48 @@
<head>
<meta charset="UTF-8" />
<title>Spa Menu</title>
<link href="../static/css/styles.css" th:href="@{/css/styles.css}" rel="stylesheet" />
<!-- <link href="../static/css/styles.css" th:href="@{/css/styles.css}" rel="stylesheet" />-->
<link href="../static/styles.css" th:href="@{/styles.css}" rel="stylesheet" />
</head>
<body>
<h1>My Super Fancy Spa</h1>
<div id = "clientProfile">
<h2>My Profile</h2>
<p th:text = "${name}"></p>
<p th:text = "${skintype}"></p>
<p th:text = "${manipedi}"></p>
</div>
<div id = "servicesMenu">
<h2>Menu of Available Services</h2>
<h3>Facial Treatments</h3>
<p>The facial treatments below are recommended by our aestheticians for your given skin type.</p>
<table>
<th:block th:each="facial : ${appropriateFacials}">
<tr>
<td th:text="${facial}">...</td>
</tr>
</th:block>
</table>
<div th:if = "${manipedi.equals('manicure')}">
<h2>Manicure</h2>
<h3 th:replace = "~{fragments :: manicureDescription}"></h3>
</div>
<div th:if = "${manipedi.equals('pedicure')}">
<h2>Pedicure</h2>
<h3 th:replace = "~{fragments :: pedicureDescription}"></h3>
</div>
</div>
</body>
<footer>
<div class="container">
<div class="grid">
<div class="cell" id="1"></div>
<div class="cell" id="2"></div>
<div class="cell" id="3"></div>
<div class="cell" id="4"></div>
<div class="cell" id="5"></div>
<div class="cell" id="6"></div>
</div>
</div>
</footer>
</html>