añadidor los ficheros que faltaban en el commit anterior

This commit is contained in:
Jaime Jiménez
2025-07-22 11:37:00 +02:00
parent 3a4e80b1d3
commit 14f6633b83
29 changed files with 1218 additions and 0 deletions

View File

@ -0,0 +1,3 @@
body {
background-color: #fffbdd !important;
}

View File

@ -0,0 +1,60 @@
/* === Contenedor de cada opción === */
.image-container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
/* Tamaño adaptable */
width: 100%;
max-width: 200px;
/* Para evitar que la imagen sobresalga al hacer zoom */
overflow: hidden;
/* Borde invisible por defecto para evitar movimiento al seleccionar */
border: 4px solid transparent;
border-radius: 8px;
padding: 8px;
transition: border 0.3s ease;
}
/* === Borde visible cuando está seleccionada === */
.image-container.selected {
border-color: #687cfe;
}
/* === Imagen interna === */
.image-container img {
max-width: 100%;
max-height: 150px;
display: block;
transform-origin: center center;
transition: transform 0.3s ease;
}
/* === Animación de zoom con rebote === */
.image-presupuesto.zoom-anim {
animation: zoomPop 800ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
/* Keyframes para la animación */
@keyframes zoomPop {
0% { transform: scale(1); }
40% { transform: scale(0.85); }
80% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.image-container:hover {
cursor: pointer;
box-shadow: 0 0 10px rgba(104, 124, 254, 0.3);
}
@media (max-width: 576px) {
.image-container {
max-width: 100%;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,23 @@
$(() => {
$('.imagen-container-group').on('click', '.imagen-selector', function () {
const clicked = $(this);
const group = clicked.closest('.imagen-container-group');
// Limpiar selección anterior
group.find('.imagen-selector').removeClass('selected preselected')
.find('.image-presupuesto').removeClass('selected');
// Marcar nuevo seleccionado
clicked.addClass('selected');
const img = clicked.find('.image-presupuesto');
img.addClass('selected');
// Aplicar animación (reset antes para que se repita)
img.removeClass('zoom-anim');
void img[0].offsetWidth; // "reflow" para reiniciar animación
img.addClass('zoom-anim');
// Guardar ID en hidden si lo necesitas
$('#tipoEncuadernacionSeleccionada').val(clicked.attr('id'));
});
});