Browse Source

Cosetes

master
Cristobal Bernal Mayordomo 2 years ago
parent
commit
f8a2b547b4
5 changed files with 91 additions and 15 deletions
  1. +10
    -1
      src/main/java/com/cristobalbernal/foro/controlador/Controlador.java
  2. +0
    -0
      src/main/resources/static/css/css/Estilos.css
  3. +0
    -0
      src/main/resources/static/css/img/logo.png
  4. +73
    -0
      src/main/resources/templates/backend/login.html
  5. +8
    -14
      src/main/resources/templates/index.html

+ 10
- 1
src/main/java/com/cristobalbernal/foro/controlador/Controlador.java View File

@ -3,8 +3,17 @@ package com.cristobalbernal.foro.controlador;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.net.MalformedURLException;
@Controller @Controller
public class Controlador { public class Controlador {
@GetMapping({"/entrar/{usuario}","/entrar","/usuario/{usuario}","/usuario"})
public String login(@PathVariable(name="usuario", required = false) String usuario,
Model model) throws MalformedURLException {
model.addAttribute("titulo","Panel de control");
model.addAttribute("usuario",usuario);
return "backend/login";
}
} }

src/main/resources/static/css/Estilos.css → src/main/resources/static/css/css/Estilos.css View File


src/main/resources/img/Starbucks_Coffee_Logo.svg.png → src/main/resources/static/css/img/logo.png View File


+ 73
- 0
src/main/resources/templates/backend/login.html View File

@ -0,0 +1,73 @@
<!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>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title th:text="${titulo}">Título de la página</title>
<meta name="description" content="">
<link href="/webjars/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="/webjars/font-awesome/css/all.css" rel="stylesheet">
<link href="/css/login.css" rel="stylesheet">
</head>
<body >
<section class="login-block">
<section class="vh-100">
<div class="container py-5 h-100">
<div class="row d-flex align-items-center justify-content-center h-100">
<div class="col-md-8 col-lg-7 col-xl-6">
<img src="https://mdbcdn.b-cdn.net/img/Photos/new-templates/bootstrap-login-form/draw2.svg"
class="img-fluid" alt="Phone image">
</div>
<div class="col-md-7 col-lg-5 col-xl-5 offset-xl-1">
<form>
<!-- Email input -->
<div class="form-outline mb-4">
<input type="email" id="form1Example13" class="form-control form-control-lg" />
<label class="form-label" for="form1Example13">Email address</label>
</div>
<!-- Password input -->
<div class="form-outline mb-4">
<input type="password" id="form1Example23" class="form-control form-control-lg" />
<label class="form-label" for="form1Example23">Password</label>
</div>
<div class="d-flex justify-content-around align-items-center mb-4">
<!-- Checkbox -->
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="form1Example3" checked />
<label class="form-check-label" for="form1Example3"> Remember me </label>
</div>
<a href="#!">Forgot password?</a>
</div>
<!-- Submit button -->
<button type="submit" class="btn btn-primary btn-lg btn-block">Sign in</button>
<div class="divider d-flex align-items-center my-4">
<p class="text-center fw-bold mx-3 mb-0 text-muted">OR</p>
</div>
<a class="btn btn-primary btn-lg btn-block" style="background-color: #3b5998" href="#!"
role="button">
<i class="fab fa-facebook-f me-2"></i>Continue with Facebook
</a>
<a class="btn btn-primary btn-lg btn-block" style="background-color: #55acee" href="#!"
role="button">
<i class="fab fa-twitter me-2"></i>Continue with Twitter</a>
</form>
</div>
</div>
</div>
</section>
</section>
<script src="webjars/jsquery/jquery.min.js"></script>
<script src="webjars/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>

+ 8
- 14
src/main/resources/templates/index.html View File

@ -3,38 +3,32 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Foro</title> <title>Foro</title>
<link rel="stylesheet" th:href="@{/css/Estilos.css}">
<link rel="stylesheet" th:href="@{/css/css/Estilos.css}">
</head> </head>
<body> <body>
<header class="encabezado"> <header class="encabezado">
<nav> <nav>
<div><img th:href="@{../img/Starbucks_Coffee_Logo.svg.png}"> </div>
<img src="/static/css/img/logo.png" alt="..">
<ul> <ul>
<li><a href="#">Inicio</a></li>
<li><a href="#">Servicio</a></li>
<li>
<a href="#">Nosotros</a>
<li><a href="#">Home</a></li>
<li><a href="#">Novedades</a>
<ul> <ul>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
</ul> </ul>
</li> </li>
<li><a href="#">Acerca de</a>
<li>
<a href="#">Recursos</a>
<ul> <ul>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li> <li><a href="#">SubItem</a></li>
</ul> </ul>
</li> </li>
<li><a href="#">Contacto</a>
<ul>
<li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li>
<li><a href="#">SubItem</a></li>
</ul>
<li><a href="/entrar">Acceder</a></li>
<li><a href="#">Registrarse</a></li>
</li>
</ul> </ul>
</nav> </nav>


Loading…
Cancel
Save