1+ <!DOCTYPE html>
2+ < html xmlns ="http://www.w3.org/1999/xhtml "
3+ xmlns:th ="http://www.thymeleaf.org "
4+ xmlns:sec ="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3 ">
5+ < head >
6+ < meta name ="description " content ="Pagina Inicial da aplicação ">
7+ < meta name ="keywords " content ="pagina-inicial, pagina-home, inicio, home, inicial, index, ... ">
8+ < meta name ="author " content ="Dev Academy ">
9+ < meta name ="revisit-after " content ="60 days ">
10+ < meta name ="ROBOTS " content ="INDEX, FOLLOW ">
11+ < link rel ="icon " th:href ="@{/ico/favicon.ico} ">
12+ < meta charset ="UTF-8 ">
13+ < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no ">
14+ < title > Home | Inicio</ title >
15+ < link rel ="stylesheet " href ="https://www.w3schools.com/w3css/4/w3.css ">
16+ < link href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css " rel ="stylesheet ">
17+ < style >
18+ .body-align {
19+ /* border: 2px solid #000000; */
20+ padding-top : 2% ;
21+ padding-left : 5% ;
22+ padding-right : 5% ;
23+ text-align : center;
24+ }
25+ </ style >
26+ </ head >
27+ < body class ="w3-light-grey ">
28+
29+ < div class ="w3-container w3-blue w3-padding ">
30+ < h2 > Home | Início</ h2 >
31+ </ div >
32+
33+ < div class ="w3-container w3-margin-top " style ="min-height: 400px; ">
34+ <!-- Card principal -->
35+ < div class ="w3-card w3-white w3-padding w3-round-large ">
36+ < h3 class ="w3-text-dark-grey "> Lista de Mensagens</ h3 >
37+
38+ <!-- 🔎 Formulário de pesquisa -->
39+ < form class ="w3-row w3-margin-bottom "
40+ th:action ="@{/home} " method ="get ">
41+ < div class ="w3-col s9 ">
42+ < input class ="w3-input w3-border w3-round "
43+ type ="text "
44+ name ="searchText "
45+ th:value ="${searchText} "
46+ placeholder ="Digite o texto para buscar... "/>
47+ </ div >
48+ < div class ="w3-col s3 ">
49+ < button class ="w3-button w3-blue w3-round w3-block "
50+ type ="submit ">
51+ Buscar
52+ </ button >
53+ </ div >
54+ </ form >
55+
56+ <!-- 📄 Lista de mensagens -->
57+ < ul class ="w3-ul w3-hoverable w3-card-4 w3-round ">
58+ < li class ="w3-padding "
59+ th:each ="msg : ${apiResponse['_embedded']['homeDTOList']} ">
60+ < span class ="w3-text-grey "
61+ th:text ="${msg['message']} ">
62+ </ span >
63+ </ li >
64+ </ ul >
65+
66+ <!-- ⚠ Caso não tenha mensagens -->
67+ < div class ="w3-panel w3-yellow w3-round w3-margin-top "
68+ th:if ="${#lists.isEmpty(apiResponse['_embedded']['homeDTOList'])} ">
69+ Nenhuma mensagem encontrada.
70+ </ div >
71+
72+ <!-- 🔁 Paginação -->
73+ < div class ="w3-center w3-margin-top ">
74+ < a class ="w3-button w3-light-grey w3-round w3-margin-right "
75+ th:if ="${apiResponse['_links']['prev'] != null} "
76+ th:href ="@{/home(page=${apiResponse['_links']['prev']['href'].split('page=')[1].split('&')[0]}, searchText=${searchText})} ">
77+ ◀ Anterior
78+ </ a >
79+
80+ < a class ="w3-button w3-blue w3-round "
81+ th:if ="${apiResponse['_links']['next'] != null} "
82+ th:href ="@{/home(page=${apiResponse['_links']['next']['href'].split('page=')[1].split('&')[0]}, searchText=${searchText})} ">
83+ Próxima ▶
84+ </ a >
85+ </ div >
86+ </ div >
87+ </ div >
88+ </ body >
89+ </ html >
0 commit comments