- trop de trucs d'un coup... je vais faire attention ensuite ^^'

This commit is contained in:
Jérémy Guillot
2024-06-10 13:57:50 +02:00
parent 9595831aa3
commit c46e1a0a5c
69 changed files with 4004 additions and 385 deletions

View File

@@ -1,3 +1,6 @@
import './bootstrap.js';
import '@fortawesome/fontawesome-free/js/all.js';
/*
* Welcome to your app's main JavaScript file!
*

View File

@@ -1,4 +1,14 @@
{
"controllers": [],
"controllers": {
"@symfony/ux-live-component": {
"live": {
"enabled": true,
"fetch": "eager",
"autoimport": {
"@symfony/ux-live-component/dist/live.min.css": true
}
}
}
},
"entrypoints": []
}

View File

@@ -0,0 +1,21 @@
import { Controller } from '@hotwired/stimulus';
import { Modal } from 'bootstrap';
/**
* Allows you to dispatch a "modal:close" JavaScript event to close it.
*
* This is useful inside a LiveComponent, where you can emit a browser event
* to open or close the modal.
*
* See templates/components/BootstrapModal.html.twig to see how this is
* attached to Bootstrap modal.
*/
/* stimulusFetch: 'lazy' */
export default class extends Controller {
modal = null;
connect() {
this.modal = Modal.getOrCreateInstance(this.element);
document.addEventListener('modal:close', () => this.modal.hide());
}
}

View File

@@ -0,0 +1,15 @@
import { Controller } from '@hotwired/stimulus';
/*
* The following line makes this controller "lazy": it won't be downloaded until needed
* See https://github.com/symfony/stimulus-bridge#lazy-controllers
*/
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static targets = ['input']
clearSearch() {
this.inputTarget.value = '';
this.inputTarget.focus();
}
}

View File

@@ -0,0 +1,24 @@
import {Controller} from '@hotwired/stimulus';
/*
* The following line makes this controller "lazy": it won't be downloaded until needed
* See https://github.com/symfony/stimulus-bridge#lazy-controllers
*/
/* stimulusFetch: 'lazy' */
export default class extends Controller {
static targets = ['body']
// ...
collapse(event) {
if (this.bodyTarget.style.display === "none") {
this.bodyTarget.style.display = "block";
event.currentTarget.classList.remove('fa-chevron-up');
event.currentTarget.classList.add('fa-chevron-down');
} else {
this.bodyTarget.style.display = "none";
event.currentTarget.classList.remove('fa-chevron-down');
event.currentTarget.classList.add('fa-chevron-up');
}
}
}

View File

@@ -1,3 +1,4 @@
//@import "bootstrap/scss/bootstrap";
@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@@ -6,3 +7,94 @@ body {
background-color: white;
}
.modal {
z-index: 1072!important;
@apply hidden fixed top-0 left-0 w-full h-full outline-none
}
.modal-dialog {
z-index: 1073!important;
}
.modal.show {
@apply block
}
.modal-backdrop {
z-index: 9!important;
width: 100vw;
height: 100vh;
@apply fixed bg-black top-0 left-0
}
.modal-backdrop.fade {
@apply opacity-0
}
.modal-backdrop.show {
@apply opacity-50
}
.modal.fade .modal-dialog {
transition: -webkit-transform .3s ease-out;
transition: transform .3s ease-out;
transition: transform .3s ease-out, -webkit-transform .3s ease-out;
-webkit-transform: translate(0, -50px);
transform: translate(0, -50px);
}
.modal.show .modal-dialog {
-webkit-transform: none;
transform: none;
}
::-webkit-scrollbar {
@apply w-2 h-1;
/* Ajuster la largeur et la hauteur de la scrollbar */
}
::-webkit-scrollbar-thumb {
@apply bg-green-600;
}
::-webkit-scrollbar-thumb:hover {
@apply bg-green-700;
}
::-webkit-scrollbar-track {
@apply bg-white;
}
#searchResults::-webkit-scrollbar {
@apply w-2 h-1;
/* Ajuster la largeur et la hauteur de la scrollbar */
}
#searchResults::-webkit-scrollbar-thumb {
@apply bg-green-600 rounded-r-sm;
}
#searchResults::-webkit-scrollbar-thumb:hover {
@apply bg-green-700;
}
#searchResults::-webkit-scrollbar-track {
@apply bg-gray-700;
}
///* Custom styles for the scrollbar buttons */
//::-webkit-scrollbar-button {
// @apply bg-gray-700;
// height: 10px; /* Adjust the height of the scrollbar buttons */
// width: 10px; /* Adjust the width of the scrollbar buttons */
//}
//
//::-webkit-scrollbar-button:vertical:decrement {
// @apply bg-gray-700;
// background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 8l6 6H6z'/%3E%3C/svg%3E");
//}
//
//::-webkit-scrollbar-button:vertical:increment {
// @apply bg-gray-700;
// background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 16l-6-6h12z'/%3E%3C/svg%3E");
//}