Browse Source

arreglando menu

master
Juanjo 1 year ago
parent
commit
a384c57645
6 changed files with 69 additions and 9 deletions
  1. +5
    -0
      src/main/java/es/fp/edu/conecta2/controladores/WebControlador.java
  2. +52
    -0
      src/main/resources/templates/buscar.html
  3. +2
    -2
      src/main/resources/templates/foot/javascript.html
  4. +3
    -0
      src/main/resources/templates/head/head.html
  5. +7
    -6
      src/main/resources/templates/menu/m1.html
  6. +0
    -1
      src/main/resources/templates/usuarios.html

+ 5
- 0
src/main/java/es/fp/edu/conecta2/controladores/WebControlador.java View File

@ -51,6 +51,11 @@ public class WebControlador {
return "redirect:/";
}
@GetMapping ("/buscar")
public String buscar(){
return "buscar";
}
@RequestMapping("parametros/{a}/{b}/{c}")
public String parametros( @PathVariable int a,
@PathVariable int b,


+ 52
- 0
src/main/resources/templates/buscar.html View File

@ -0,0 +1,52 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
<head th:replace="head/head :: mihead"></head>
<body>
<header th:replace="~{menu/m1 :: usuarios}"></header>
<header class="masthead">
<div class="container position-relative">
<div class="row justify-content-center">
<div class="col-xl-6">
<div class="text-center text-black-50">
<!-- Page heading-->
<h1 class="mb-5">
<br>
Buscar
<br>
<form class="form-subscribe" id="contactForm" data-sb-form-api-token="API_TOKEN">
<!-- Email address input-->
<div class="row">
<div class="col">
<input class="form-control form-control-lg" id="idnombre" type="text" placeholder="Buscar ..." data-sb-validations="required" />
</div>
<div class="col-auto"><button class="btn btn-primary btn-lg disabled" id="submitButton" type="submit"> B u s c a r</button></div>
</div>
<!-- Submit success message-->
<!---->
<!-- This is what your users will see when the form-->
<!-- has successfully submitted-->
<div class="d-none" id="submitSuccessMessage">
<div class="text-center mb-3">
<div class="fw-bolder">Form submission successful!</div>
<p>To activate this form, sign up at</p>
<a class="text-white" href="https://startbootstrap.com/solution/contact-forms">https://startbootstrap.com/solution/contact-forms</a>
</div>
</div>
<!-- Submit error message-->
<!---->
<!-- This is what your users will see when there is-->
<!-- an error submitting the form-->
<div class="d-none" id="submitErrorMessage"><div class="text-center text-danger mb-3">Error sending message!</div></div>
</form>
</div>
</div>
</div>
</div>
</header>
<footer th:replace="foot/javascript :: javascript"></footer>
</body>
</html>

+ 2
- 2
src/main/resources/templates/foot/javascript.html View File

@ -1,6 +1,6 @@
<footer th:fragment="javascript" class="footer navbar-fixed-bottom mt-auto py-3 bg-light">
<footer th:fragment="javascript" class="footer fixed-bottom mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">Place sticky footer content here.</span>
<span class="text-muted">Pie de página.</span>
</div>
<script src="webjars/jsquery/jquery.min.js"></script>
<script src="webjars/bootstrap/js/bootstrap.bundle.min.js"></script>


+ 3
- 0
src/main/resources/templates/head/head.html View File

@ -6,4 +6,7 @@
<meta name="description" content="">
<link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/webjars/font-awesome/css/all.css" rel="stylesheet">
<style>
body { padding-bottom: 70px;}
</style>
</head>

+ 7
- 6
src/main/resources/templates/menu/m1.html View File

@ -16,7 +16,7 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="user">Listado</a>
<a class="nav-link active" aria-current="page" href="/">Listado</a>
</li>
<li class="nav-item">
<a class="nav-link" href="buscar">Buscar</a>
@ -30,19 +30,20 @@
<li><a class="dropdown-item" href="nuevo">Crear</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown"
aria-expanded="false">
Formularios
API
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/formulario">Formulario básico</a></li>
<li><a class="dropdown-item" href="/formulario-avanzado">Formulario avanzado</a></li>
<li><a class="dropdown-item" href="/api">JSON usuarios</a></li>
<li><a class="dropdown-item" href="/api/insert">Insert</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Registros del formulario</a></li>
<li><a class="dropdown-item" href="#">Envío por email</a></li>
<li><a class="dropdown-item" href="/api/delete">Delete</a></li>
<li><a class="dropdown-item" href="/api/update">Update</a></li>
</ul>
</li>


+ 0
- 1
src/main/resources/templates/usuarios.html View File

@ -43,7 +43,6 @@
</main>
<footer th:replace="~{foot/javascript :: javascript}"></footer>
</body>

Loading…
Cancel
Save