diff --git a/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleJornalista.java b/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleJornalista.java index 55943f8..1f712d9 100644 --- a/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleJornalista.java +++ b/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleJornalista.java @@ -17,7 +17,7 @@ public class controleJornalista { @Autowired private JornalistaServico jornalistaServico; - @GetMapping("/jornalista") + @GetMapping("/paineldecontrole") public String exibirPaginaCadastrarJornalista(@RequestParam(required = false) String idJornalista, Model model) { Jornalista jornalista = null; if (idJornalista != null) { @@ -31,7 +31,7 @@ public String exibirPaginaCadastrarJornalista(@RequestParam(required = false) St jornalista = new Jornalista(null, ""); } model.addAttribute("jornalista", jornalista); - return "jornalista"; + return "paineldecontrole"; } @PostMapping(value = "/jornalista") @@ -55,4 +55,6 @@ public String removerJornalista(@RequestParam String idJornalista) { jornalistaServico.remover(idJornalista); return "redirect:/jornalista"; } + + } diff --git a/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleReportagem.java b/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleReportagem.java index 119438a..81522e6 100644 --- a/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleReportagem.java +++ b/src/main/java/com/br/td/utfpr/edu/tsi/news/controle/controleReportagem.java @@ -89,7 +89,13 @@ public String exibirPaginaListarReportagem(Model model) { @GetMapping(value = "/removerReportagem") public String removerDocumentos(@RequestParam String idReportagem) { reportagemServico.remover(idReportagem); - return "index"; + return "reportagens"; + } + @GetMapping("/reportagensPublic") + public String exibirPaginaListarReportagemPublic(Model model) { + List reportagem = reportagemServico.listarTodos(); + model.addAttribute("reportagens", reportagem); + return "reportagensPublic"; } } diff --git a/src/main/java/com/br/td/utfpr/edu/tsi/news/servico/serviceImp/ReportagemServicoImp.java b/src/main/java/com/br/td/utfpr/edu/tsi/news/servico/serviceImp/ReportagemServicoImp.java index eda0c33..152aa06 100644 --- a/src/main/java/com/br/td/utfpr/edu/tsi/news/servico/serviceImp/ReportagemServicoImp.java +++ b/src/main/java/com/br/td/utfpr/edu/tsi/news/servico/serviceImp/ReportagemServicoImp.java @@ -14,6 +14,7 @@ public class ReportagemServicoImp implements ReportagemServico { @Override public void cadastrar(Reportagem reportagem) { + reportagemRepository.save(reportagem); } diff --git a/src/main/resources/static/styles/background.css b/src/main/resources/static/styles/background.css new file mode 100644 index 0000000..2bcf135 --- /dev/null +++ b/src/main/resources/static/styles/background.css @@ -0,0 +1,15 @@ +body { + min-height: 100vh; + background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); + position: relative; + z-index: 1; +} + +body::before { + content: ""; + position: fixed; + top: 0; left: 0; right: 0; bottom: 0; + background: linear-gradient(120deg, rgba(59,130,246,0.15) 0%, rgba(16,185,129,0.15) 100%); + z-index: -1; + pointer-events: none; +} \ No newline at end of file diff --git a/src/main/resources/static/styles/form.css b/src/main/resources/static/styles/form.css new file mode 100644 index 0000000..71dc982 --- /dev/null +++ b/src/main/resources/static/styles/form.css @@ -0,0 +1,66 @@ +form { + background: #f5f5c6; + border: 3px solid #000080; + padding: 24px 32px; + width: 350px; + margin: 40px auto; + font-family: 'Comic Sans MS', 'Arial', sans-serif; + box-shadow: 6px 6px 0 #ff00cc; +} + +label { + color: #000080; + font-weight: bold; + font-size: 1.1em; + + margin-bottom: 6px; + display: block; +} + +input[type="text"], input[type="email"] { + width: 90%; + padding: 8px; + margin-bottom: 18px; + border: 2px inset #008000; + background: #fff; + color: #000; + font-size: 1em; + font-family: 'Courier New', monospace; + box-shadow: 2px 2px 0 #00ffff; +} + +input[type="submit"] { + background: #ffcc00; + color: #000080; + border: 3px outset #008000; + font-size: 1.1em; + font-family: 'Comic Sans MS', 'Arial', sans-serif; + padding: 10px 28px; + cursor: pointer; + box-shadow: 3px 3px 0 #ff00cc; + transition: background 0.2s; +} + +input[type="submit"]:hover { + background: #00ffff; + color: #ff00cc; +} +select { + width: 92%; + padding: 8px; + margin-bottom: 18px; + border: 2px inset #008000; + background: #ffcc00; + color: #000080; + font-size: 1em; + font-family: 'Comic Sans MS', 'Arial', sans-serif; + box-shadow: 2px 2px 0 #ff00cc; + border-radius: 4px; + outline: none; +} + +option { + background: #ffcc00; + color: #000080; + font-family: 'Comic Sans MS', 'Arial', sans-serif; +} \ No newline at end of file diff --git a/src/main/resources/static/styles/images/logo.png b/src/main/resources/static/styles/images/logo.png new file mode 100644 index 0000000..a16f4fa Binary files /dev/null and b/src/main/resources/static/styles/images/logo.png differ diff --git a/src/main/resources/static/styles/images/logo.svg b/src/main/resources/static/styles/images/logo.svg new file mode 100644 index 0000000..9823bf9 --- /dev/null +++ b/src/main/resources/static/styles/images/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/main/resources/static/styles/lists.css b/src/main/resources/static/styles/lists.css new file mode 100644 index 0000000..c1e5e09 --- /dev/null +++ b/src/main/resources/static/styles/lists.css @@ -0,0 +1,57 @@ +/* Nav bar container */ +#nav-bar { + background: #f5f5c6; + border: 3px solid #000080; + box-shadow: 4px 4px 0 #ff00cc; + padding: 10px 0; + margin-bottom: 24px; +} + +/* Nav list inline */ +.nav-bar-list { + list-style: none; + padding: 0; + margin: 0; + display: flex; + justify-content: center; + align-items: center; + gap: 18px; +} + +/* Nav list items */ +.nav-bar-list-item { + display: inline-block; + background: #ffcc00; + border: 2px outset #008000; + padding: 8px 18px; + margin: 0 4px ; + margin-right: 10px; + font-family: 'Comic Sans MS', 'Arial', sans-serif; + font-size: 1.05em; + color: #000080; + box-shadow: 2px 2px 0 #00ffff; + transition: background 0.2s, color 0.2s; +} + +.nav-bar-list-item a { + color: #000080; + text-decoration: none; + font-weight: bold; + +} + +.nav-bar-list-item:hover, .nav-bar-list-item:focus { + background: #00ffff; + color: #ff00cc; + cursor: pointer; +} + +.nav-bar-list-item:hover a, .nav-bar-list-item:focus a { + color: #ff00cc; +} +.nav-bar-logo { + margin-right: auto; + margin-left: 20px; + border-radius: 50%; + box-shadow: none; +} \ No newline at end of file diff --git a/src/main/resources/static/styles/reportagem.css b/src/main/resources/static/styles/reportagem.css new file mode 100644 index 0000000..82d0bb2 --- /dev/null +++ b/src/main/resources/static/styles/reportagem.css @@ -0,0 +1,80 @@ +.news-list { + width: 90%; + margin: 32px auto; + display: flex; + flex-direction: column; + gap: 28px; +} + +.news-card { + background: #f7e6b2; + border-radius: 12px; + box-shadow: 0 2px 12px #c7a3c7; + padding: 18px 24px; + display: flex; + flex-direction: column; + gap: 10px; + text-align: center; + +} + +.news-title { + font-size: 1.25em; + font-weight: 700; + ; + color: black; + background: #b2e6e6; + border-radius: 8px 8px 0 0; + padding: 8px 12px; + text-shadow: 1px 1px 0 #fff, 2px 2px 0 #c7a3c7; +} + +.news-content { + color: #2d3250; + font-size: 1em; + margin-bottom: 6px; + text-align: justify; + display: flex; + align-items: center; + min-height: 80px; + max-width: 70%; /* text block is 70% of container */ + margin-left: auto; /* center the text block */ + margin-right: auto; +} + +.news-meta { + font-size: 0.95em; + color: #4b568f; + + text-align: center; + gap: 12px; + margin-bottom: 8px; +} + +.news-actions { + display: flex; + gap: 16px; + justify-content: center; +} + +.btn-edit, .btn-delete { + text-decoration: none; + padding: 6px 14px; + border-radius: 6px; + font-weight: 600; + color: #fff; + background: #4b568f; + transition: background 0.2s; +} + +.btn-delete { + background: #c77dbb; +} + +.btn-edit:hover { + background: #6b8f6b; +} + +.btn-delete:hover { + background: #a05d99; +} \ No newline at end of file diff --git a/src/main/resources/static/styles/table.css b/src/main/resources/static/styles/table.css new file mode 100644 index 0000000..11e898d --- /dev/null +++ b/src/main/resources/static/styles/table.css @@ -0,0 +1,54 @@ +table { + width: 90%; + margin: 32px auto; + border-collapse: separate; + + background: transparent; + font-family: 'Arial', 'Verdana', sans-serif; + font-size: 1.15em; + letter-spacing: 0.02em; +} + +th, td { + + padding: 18px 28px; + font-size: 1em; + color: #2d3250; + background: #f7e6b2; + text-align: left; + font-family: 'Arial', 'Verdana', sans-serif; + font-weight: 500; +} + + +th { + background: #b2e6e6; + color: #a05d99; + text-shadow: 1px 1px 0 #fff, 2px 2px 0 #c7a3c7; + font-weight: 700; + font-size: 1.08em; + border-radius: 12px 12px 0 0; + border-bottom: 2px solid #c7a3c7; +} + +tbody tr { + box-shadow: 0 2px 12px #c7a3c7; + border-radius: 0 0 12px 12px; + overflow: hidden; + background: #f7e6b2; +} + +tr:nth-child(even) td { + background: #f9f9f9; +} + +tr:hover td { + background: #b2e6e6; + color: #a05d99; + cursor: pointer; + transition: background 0.2s, color 0.2s; +} + +td { + border-radius: 0 0 12px 12px; +} \ No newline at end of file diff --git a/src/main/resources/templates/assunto.html b/src/main/resources/templates/assunto.html index 3b3a3f6..6066421 100644 --- a/src/main/resources/templates/assunto.html +++ b/src/main/resources/templates/assunto.html @@ -2,46 +2,61 @@ - Title + + + + + + Cadastrar Assunto -
+ + + + + + + +
+ -
- -
-
- -
+
+ +
+
+ +
- - \ No newline at end of file + + \ No newline at end of file diff --git a/src/main/resources/templates/assuntos.html b/src/main/resources/templates/assuntos.html index c2a62b4..8026d78 100644 --- a/src/main/resources/templates/assuntos.html +++ b/src/main/resources/templates/assuntos.html @@ -2,6 +2,11 @@ + + + + + Assuntos @@ -9,22 +14,14 @@ @@ -33,6 +30,7 @@ ID Título + Ações diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 457df11..4d8744d 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -2,7 +2,12 @@ - Title + + + + + + Página Inicial @@ -10,34 +15,75 @@ -
- + + +
+
+ +

+ Cinco News Press is an independent global news organization dedicated to factual reporting. Founded in 1846, 5NP today remains the most trusted source of fast, accurate, unbiased news in all formats and the essential provider of the technology and services vital to the news business. More than half the world’s population sees 5NP journalism every day. +

+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/templates/jornalistas.html b/src/main/resources/templates/jornalistas.html index 6502091..404d7b0 100644 --- a/src/main/resources/templates/jornalistas.html +++ b/src/main/resources/templates/jornalistas.html @@ -2,6 +2,11 @@ + + + + + Jornalistas @@ -9,21 +14,14 @@