Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.72 KB | None | 0 0
  1. search-index.html
  2. <!DOCTYPE html>
  3. <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
  4. <head>
  5.     <meta charset="UTF-8">
  6.     <link href="../static/css/layout.css" th:href="@{/css/layout.css}" rel="stylesheet"/>
  7.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8.     <title>Index search</title>
  9. </head>
  10. <body>
  11. <header th:insert="fragments/general.html :: header"></header>
  12. <div class="sectionBox">
  13.     <form th:action="@{'http://localhost:8080/search/find'}" method="GET">
  14.         <searchbar th:insert="fragments/general.html :: searchbar"></searchbar>
  15.     </form>
  16.  
  17.     <h2>Results: </h2>
  18.     <!-- <ul th:if="${game != null}" th:each="game : ${games}" > -->
  19.     <ul>
  20.         <li th:each="platform : ${platforms} ">
  21.             <a th:text="${platform.name}">${platform.name}></a>
  22.             <span th:text="${platform.publisher}">${platform.publisher}</span>
  23.         </li>
  24.  
  25.         <li th:each="game : ${games}">
  26.             <a th:text="${game.title}">${game.title}></a>
  27.             <span th:text="${game.genre}">${game.genre}</span>
  28.         </li>
  29.  
  30.         <li th:each="expansion : ${expansions}">
  31.             <a th:text="${expansion.name}">${expansion.name}></a>
  32.         </li>
  33.     </ul>
  34.     <a th:if="lastSearchResult != null" th:href="@{'/search/find?search=' + ${lastSearchResult}}"
  35.       th:text="'Your last search was:' + ${lastSearchResult}">search result</a> <br/>
  36.     <a th:if="search != null" th:href="@{'/search/find?search=' + ${search.getValue()}}"
  37.       th:text="'Your current search was:' + ${search.getValue()}">search result</a>
  38.     <!--span th:if="${#lists.isEmpty(games)}">There are no Games in this list</span-->
  39.     <footer th:insert="fragments/general.html :: footer"></footer>
  40. </div>
  41. </body>
  42. </html>
  43. ---------------------------------------------------------------------------------------------------------------------------------------
  44. fragment
  45. <!DOCTYPE html>
  46. <header xmlns:th="http://www.w3.org/1999/xhtml">
  47.     <!-- fragments replace and insert important -->
  48.     <div class="header">
  49.         <div class="container">
  50.             <h1> Game Collection Manager </h1>
  51.             <nav>
  52.                 <a href="/platform"> Platforms </a> &nbsp; &nbsp;
  53.                 <a href="/logout"> Logout</a>&nbsp; &nbsp;
  54.                 <!--  <a href="/login"> Login </a>
  55.             <a th:href="@{'/game/' + ${uuid} }"> Game </a>-->
  56.  
  57.             </nav>
  58.         </div>
  59.     </div>
  60. </header>
  61.  
  62. <searchbar>
  63.     <input type="submit" value="Search" style="float: right">
  64.     <label>
  65.         <input name="search" type="text" placeholder="Search: " style="float: right">
  66.     </label>
  67. </searchbar>
  68.  
  69. <footer class="footer">
  70.     <p>© Michael Cornelisse, Hidde Altena 2019 </p>
  71. </footer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement