Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- search-index.html
- <!DOCTYPE html>
- <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
- <head>
- <meta charset="UTF-8">
- <link href="../static/css/layout.css" th:href="@{/css/layout.css}" rel="stylesheet"/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Index search</title>
- </head>
- <body>
- <header th:insert="fragments/general.html :: header"></header>
- <div class="sectionBox">
- <form th:action="@{'http://localhost:8080/search/find'}" method="GET">
- <searchbar th:insert="fragments/general.html :: searchbar"></searchbar>
- </form>
- <h2>Results: </h2>
- <!-- <ul th:if="${game != null}" th:each="game : ${games}" > -->
- <ul>
- <li th:each="platform : ${platforms} ">
- <a th:text="${platform.name}">${platform.name}></a>
- <span th:text="${platform.publisher}">${platform.publisher}</span>
- </li>
- <li th:each="game : ${games}">
- <a th:text="${game.title}">${game.title}></a>
- <span th:text="${game.genre}">${game.genre}</span>
- </li>
- <li th:each="expansion : ${expansions}">
- <a th:text="${expansion.name}">${expansion.name}></a>
- </li>
- </ul>
- <a th:if="lastSearchResult != null" th:href="@{'/search/find?search=' + ${lastSearchResult}}"
- th:text="'Your last search was:' + ${lastSearchResult}">search result</a> <br/>
- <a th:if="search != null" th:href="@{'/search/find?search=' + ${search.getValue()}}"
- th:text="'Your current search was:' + ${search.getValue()}">search result</a>
- <!--span th:if="${#lists.isEmpty(games)}">There are no Games in this list</span-->
- <footer th:insert="fragments/general.html :: footer"></footer>
- </div>
- </body>
- </html>
- ---------------------------------------------------------------------------------------------------------------------------------------
- fragment
- <!DOCTYPE html>
- <header xmlns:th="http://www.w3.org/1999/xhtml">
- <!-- fragments replace and insert important -->
- <div class="header">
- <div class="container">
- <h1> Game Collection Manager </h1>
- <nav>
- <a href="/platform"> Platforms </a>
- <a href="/logout"> Logout</a>
- <!-- <a href="/login"> Login </a>
- <a th:href="@{'/game/' + ${uuid} }"> Game </a>-->
- </nav>
- </div>
- </div>
- </header>
- <searchbar>
- <input type="submit" value="Search" style="float: right">
- <label>
- <input name="search" type="text" placeholder="Search: " style="float: right">
- </label>
- </searchbar>
- <footer class="footer">
- <p>© Michael Cornelisse, Hidde Altena 2019 </p>
- </footer>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement