Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html xmlns:th="https://www.thymeleaf.org">
- <head>
- <title>Getting Started: Handling Form Submission</title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <style>
- body, html{
- height: 100%;
- }
- .hero-image{
- height: 25%;
- background-color: darkgray;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- position: relative;
- }
- .hero-text {
- text-align: center;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- color: black;
- }
- .hero-text button{
- padding: 10px;
- margin: 1px;
- font-family: Cambria;
- }
- .contactsBtn:hover{
- color: red;
- background-color: black;
- }
- .container {
- border-radius: 5px;
- background-color: #f2f2f2;
- padding: 20px;
- width: 100%; /* Full width */
- height: 100%;
- padding: 12px; /* Some padding */
- border: 1px solid #ccc; /* Gray border */
- border-radius: 4px; /* Rounded borders */
- box-sizing: border-box; /* Make sure that padding and width stays in place */
- margin-top: 6px; /* Add a top margin */
- margin-bottom: 16px; /* Bottom margin */
- resize: vertical; /* Allow the user to vertically resize the textarea (not horizontally) */
- }
- #contacts {
- font-family: Arial, Helvetica, sans-serif;
- border-collapse: collapse;
- width: 100%;
- }
- #contacts td, #contacts th {
- border: 1px solid #ddd;
- padding: 8px;
- }
- #contacts tr:hover {background-color: #ddd;}
- #contacts th {
- padding-top: 12px;
- padding-bottom: 12px;
- text-align: left;
- background-color: #04AA6D;
- color: white;
- }
- #footer{
- height: 100px;
- width: 400px;
- }
- </style>
- </head>
- <body>
- <div class="hero-image">
- <div class="hero-text">
- <h1>Contact Form</h1>
- <button type="button" onclick="nextPage()" class="contactsBtn">Add new Contacts</button>
- </div>
- </div>
- <div class="container">
- <h1>All Contacts</h1>
- <table id="contacts">
- <tr>
- <th>Name</th>
- <th>E-mail</th>
- <th>Contact Number</th>
- <th>Address</th>
- </tr>
- <tr th:each="greeting : ${contacts}">
- <div class="container2">
- <td th:text= "${greeting.name}"> A</td>
- <td th:text="${greeting.getEmail()}"> B</td>
- <td th:text="${greeting.getEmail()}"> C</td>
- <td th:text="${greeting.getEmail()}"> D</td>
- </div>
- </tr>
- </table>
- </div>
- <div id="footer"></div>
- <script type="text/javascript">
- function nextPage(e){
- window.location="contactsPage.html"
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement