Refactor user registration and management UI with improved structure and styling
This commit is contained in:
parent
4f86df1ca1
commit
2bea3dfc4c
|
|
@ -18,19 +18,11 @@ p {
|
|||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.register_form{
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container1{
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
background-color: rgba(255,255,255,0.4);
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ html{
|
|||
height: 100%;
|
||||
background: linear-gradient(45deg, #f1faee, #a8dadc);
|
||||
}
|
||||
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -10,6 +11,7 @@ body{
|
|||
font-weight: 100;
|
||||
color: #1d3557;
|
||||
}
|
||||
|
||||
.contenido {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -29,22 +31,26 @@ th, td {
|
|||
th {
|
||||
background-color: #a8dadc;
|
||||
}
|
||||
|
||||
td {
|
||||
max-width: 200px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.table-container {
|
||||
height: fit-content;
|
||||
overflow: auto;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.table1 thead {
|
||||
position: sticky;
|
||||
top: 0%;
|
||||
|
|
@ -53,6 +59,7 @@ table{
|
|||
.celda-acciones {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.celda-acciones button {
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
border: none;
|
||||
|
|
@ -65,10 +72,12 @@ table{
|
|||
.celda-acciones button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.botones {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.botones button {
|
||||
margin: 10px 30px;
|
||||
padding: 10px;
|
||||
|
|
@ -79,9 +88,11 @@ table{
|
|||
cursor: pointer;
|
||||
box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.botones .button_salir {
|
||||
background-color: #ff5050;
|
||||
}
|
||||
|
||||
.botones button:hover {
|
||||
filter: brightness(0.8); /* Reduce el brillo al 80% */
|
||||
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
|
||||
|
|
|
|||
|
|
@ -6,28 +6,29 @@
|
|||
</head>
|
||||
<body>
|
||||
<h2>Registro</h2>
|
||||
<div class="register_form">
|
||||
<div class="container1">
|
||||
<form th:action="@{/register}" method="post">
|
||||
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
|
||||
|
||||
<div class="input-group">
|
||||
<label>Usuario:</label>
|
||||
<input type="text" name="username" required>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Contraseña:</label>
|
||||
<input type="password" name="password" required>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Mail:</label>
|
||||
<input type="text" name="mail" required>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<label>Rol:</label>
|
||||
<select name="role">
|
||||
<option value="USER">Usuario</option>
|
||||
<option value="ADMIN">Administrador</option>
|
||||
</select>
|
||||
<br>
|
||||
<br>
|
||||
</div>
|
||||
<button type="submit">Registrar</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,10 @@
|
|||
<button th:title="Editar">✏️</button>
|
||||
<form th:action="@{/delete_user}" method="get" style="display:inline;">
|
||||
<input type="hidden" th:name="id" th:value="${user.id}"/>
|
||||
<button type="submit" th:title="Borrar" formaction="#" onclick="if(confirm('¿Estás seguro de que deseas borrar este usuario?')) { this.form.action = this.form.getAttribute('th:action'); } else { return false; }">🗑️</button>
|
||||
<button type="submit" th:title="Borrar" formaction="#"
|
||||
onclick="if(confirm('¿Estás seguro de que deseas borrar este usuario?')) { this.form.action = this.form.getAttribute('th:action'); } else { return false; }">
|
||||
🗑️
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue