Browse Source

menu

master
Juanjo 1 year ago
parent
commit
e372b9487b
10 changed files with 172 additions and 19 deletions
  1. +6
    -0
      src/main/java/es/fp/edu/conecta2/controladores/WebControlador.java
  2. +2
    -1
      src/main/resources/templates/buscar.html
  3. +2
    -1
      src/main/resources/templates/editar_usuario.html
  4. +5
    -0
      src/main/resources/templates/head/head.html
  5. +147
    -3
      src/main/resources/templates/inicio.html
  6. +2
    -10
      src/main/resources/templates/menu/m1.html
  7. +2
    -1
      src/main/resources/templates/nuevo_usuario.html
  8. +2
    -1
      src/main/resources/templates/opcionales.html
  9. +2
    -1
      src/main/resources/templates/parametros.html
  10. +2
    -1
      src/main/resources/templates/usuarios.html

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

@ -13,7 +13,13 @@ public class WebControlador {
@Autowired @Autowired
private UserService servicioUser; private UserService servicioUser;
@GetMapping ("/") @GetMapping ("/")
public String inicio(Model modelo){
return "inicio";
}
@GetMapping ("/listado")
public String listarUser(Model modelo){ public String listarUser(Model modelo){
modelo.addAttribute("user",servicioUser.listarUser()); modelo.addAttribute("user",servicioUser.listarUser());
return "usuarios"; return "usuarios";


+ 2
- 1
src/main/resources/templates/buscar.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="head/head :: mihead"></head> <head th:replace="head/head :: mihead"></head>
<body> <body>


+ 2
- 1
src/main/resources/templates/editar_usuario.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="~{head/head :: mihead}"></head> <head th:replace="~{head/head :: mihead}"></head>
<body class="d-flex flex-column h-100"> <body class="d-flex flex-column h-100">


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

@ -6,6 +6,8 @@
<meta name="description" content=""> <meta name="description" content="">
<link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/webjars/font-awesome/css/all.css" rel="stylesheet"> <link href="/webjars/font-awesome/css/all.css" rel="stylesheet">
<style> <style>
body { body {
padding-bottom: 20px; padding-bottom: 20px;
@ -13,6 +15,9 @@
.navbar { .navbar {
margin-bottom: 20px; margin-bottom: 20px;
} }
#espaciado {
padding: 30px;
}
</style> </style>
</head> </head>

+ 147
- 3
src/main/resources/templates/inicio.html View File

@ -1,11 +1,155 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="head/head :: mihead"></head> <head th:replace="head/head :: mihead"></head>
<body> <body>
Hola mundo
<img src="img/que-significa-sonar-que-muerde-perro_98.avif">
<header th:replace="~{menu/m1 :: usuarios}"></header>
<div id="espaciado">
</div>
<main class="my-4">
<div class="container">
<!--Section: Content-->
<section class="text-center">
<h4 class="mb-4"><strong>Pricing</strong></h4>
<div class="btn-group mb-4" role="group" aria-label="Basic example">
<button type="button" class="btn btn-primary active">Monthly billing</button>
<button type="button" class="btn btn-primary">
Annual billign <small>(2 months FREE)</small>
</button>
</div>
<div class="row">
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4">
<!-- Card -->
<div class="card">
<div class="card-header bg-white py-3">
<p class="text-uppercase small mb-2"><strong>Free</strong></p>
<h5 class="mb-0">Free</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
</ul>
</div>
<div class="card-footer bg-white py-3">
<button type="button" class="btn btn-success btn-sm">Get it</button>
</div>
</div>
<!-- Card -->
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4">
<!-- Card -->
<div class="card border border-primary">
<div class="card-header bg-white py-3">
<p class="text-uppercase small mb-2"><strong>Essential</strong></p>
<h5 class="mb-0">$19/month</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
</ul>
</div>
<div class="card-footer bg-white py-3">
<button type="button" class="btn btn-primary btn-sm">Buy now</button>
</div>
</div>
<!-- Card -->
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4">
<!-- Card -->
<div class="card">
<div class="card-header bg-white py-3">
<p class="text-uppercase small mb-2"><strong>Advanced</strong></p>
<h5 class="mb-0">$49/month</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
</ul>
</div>
<div class="card-footer bg-white py-3">
<button type="button" class="btn btn-info btn-sm">Buy now</button>
</div>
</div>
<!-- Card -->
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-lg-3 col-md-6 mb-4">
<!-- Card -->
<div class="card">
<div class="card-header bg-white py-3">
<p class="text-uppercase small mb-2"><strong>Enterprise</strong></p>
<h5 class="mb-0">$189/month</h5>
</div>
<div class="card-body">
<ul class="list-group list-group-flush">
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
<li class="list-group-item">Feature</li>
</ul>
</div>
<div class="card-footer bg-white py-3">
<button type="button" class="btn btn-info btn-sm">Buy now</button>
</div>
</div>
<!-- Card -->
</div>
<!--Grid column-->
</div>
</section>
<!--Section: Content-->
</div>
</main>
<footer th:replace="foot/pie :: pie"></footer> <footer th:replace="foot/pie :: pie"></footer>
</body> </body>
</html> </html>

+ 2
- 10
src/main/resources/templates/menu/m1.html View File

@ -1,10 +1,3 @@
<!DOCTYPE html>
<html lang="es"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<meta charset="UTF-8">
</head>
<body>
<nav th:fragment="usuarios" class="navbar navbar-expand-lg bg-dark navbar-dark fixed-top" <nav th:fragment="usuarios" class="navbar navbar-expand-lg bg-dark navbar-dark fixed-top"
style="--bs-bg-opacity: .8;"> style="--bs-bg-opacity: .8;">
<div class="container-fluid"> <div class="container-fluid">
@ -17,7 +10,7 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> <ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Listado</a>
<a class="nav-link active" aria-current="page" href="/listado">Listado</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="buscar">Buscar</a> <a class="nav-link" href="buscar">Buscar</a>
@ -116,5 +109,4 @@
<!-- Right elements --> <!-- Right elements -->
</div> </div>
</nav> </nav>
</body>
</html>

+ 2
- 1
src/main/resources/templates/nuevo_usuario.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="~{head/head :: mihead}"></head> <head th:replace="~{head/head :: mihead}"></head>
<body class="d-flex flex-column h-100"> <body class="d-flex flex-column h-100">


+ 2
- 1
src/main/resources/templates/opcionales.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="head/head :: mihead"></head> <head th:replace="head/head :: mihead"></head>
<body> <body>
Parámetros opcionales: Parámetros opcionales:


+ 2
- 1
src/main/resources/templates/parametros.html View File

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="head/head :: mihead"></head> <head th:replace="head/head :: mihead"></head>
<body> <body>
Parámetros: Parámetros:


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

@ -1,7 +1,8 @@
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd"> <!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html lang="es" <html lang="es"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org">
xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:replace="~{head/head :: mihead}"></head> <head th:replace="~{head/head :: mihead}"></head>


Loading…
Cancel
Save