Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -31,16 +31,16 @@ public String exibirPaginaCadastrarJornalista(@RequestParam(required = false) St
jornalista = new Jornalista(null, "");
}
model.addAttribute("jornalista", jornalista);
return "jornalista";
return "paineldecontrole";
}

@PostMapping(value = "/jornalista")
@PostMapping(value = "/paineldecontrole")
public String cadastrarJornalista(Jornalista jornalista) {
if (jornalista.getId() == null || jornalista.getId().isEmpty()) {
jornalista.setId(null);
}
jornalistaServico.cadastrar(jornalista);
return "redirect:/";
return "redirect:/jornalistas";
}

@GetMapping(value = "/jornalistas")
Expand All @@ -53,6 +53,8 @@ public String exibirPaginaListarJornalista(Model model) {
@GetMapping(value = "/removerJornalista")
public String removerJornalista(@RequestParam String idJornalista) {
jornalistaServico.remover(idJornalista);
return "redirect:/jornalista";
return "redirect:/paineldecontrole";
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String cadastrarReportagem(Reportagem reportagem) {
reportagem.setDataCriacao(java.time.LocalDateTime.now());
}
reportagemServico.cadastrar(reportagem);
return "redirect:/";
return "redirect:/reportagem";
}
@GetMapping(value = "/reportagens")
public String exibirPaginaListarReportagem(Model model) {
Expand All @@ -89,7 +89,13 @@ public String exibirPaginaListarReportagem(Model model) {
@GetMapping(value = "/removerReportagem")
public String removerDocumentos(@RequestParam String idReportagem) {
reportagemServico.remover(idReportagem);
return "index";
return "redirect:/reportagensPublic";
}
@GetMapping("/reportagensPublic")
public String exibirPaginaListarReportagemPublic(Model model) {
List<Reportagem> reportagem = reportagemServico.listarTodos();
model.addAttribute("reportagens", reportagem);
return "reportagensPublic";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ReportagemServicoImp implements ReportagemServico {

@Override
public void cadastrar(Reportagem reportagem) {

reportagemRepository.save(reportagem);
}

Expand Down
15 changes: 15 additions & 0 deletions src/main/resources/static/styles/background.css
Original file line number Diff line number Diff line change
@@ -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;
}
66 changes: 66 additions & 0 deletions src/main/resources/static/styles/form.css
Original file line number Diff line number Diff line change
@@ -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;
}
Binary file added src/main/resources/static/styles/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/main/resources/static/styles/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions src/main/resources/static/styles/lists.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* 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;
}
80 changes: 80 additions & 0 deletions src/main/resources/static/styles/reportagem.css
Original file line number Diff line number Diff line change
@@ -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: justify;
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;
}
54 changes: 54 additions & 0 deletions src/main/resources/static/styles/table.css
Original file line number Diff line number Diff line change
@@ -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;
}
Loading