favicon et mobile 680
This commit is contained in:
BIN
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
@@ -8,6 +8,8 @@ $activePage = $activePage ?? "";
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?= htmlspecialchars($pageTitle) ?></title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?= htmlspecialchars($pageTitle) ?></title>
|
||||||
|
<link rel="icon" type="image/png" href="/favicon.png">
|
||||||
|
<link rel="apple-touch-icon" href="/favicon.png">
|
||||||
<link rel="stylesheet" href="/global.css">
|
<link rel="stylesheet" href="/global.css">
|
||||||
<?php if (!empty($pageCss)): ?>
|
<?php if (!empty($pageCss)): ?>
|
||||||
<link rel="stylesheet" href="<?= htmlspecialchars($pageCss) ?>">
|
<link rel="stylesheet" href="<?= htmlspecialchars($pageCss) ?>">
|
||||||
|
|||||||
+64
-48
@@ -930,73 +930,89 @@ th.col-laia {
|
|||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --- 12. OPTIMISATIONS MOBILES (Responsive) --- */
|
/* --- 12. OPTIMISATIONS MOBILES (Mode Largeur Fixe 680px) --- */
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
/* 1. Header du Budget Prévisionnel : On empile verticalement */
|
/* 1. ON FORCE TOUT LE SITE A FAIRE MINIMUM 680px */
|
||||||
.prev-section-header {
|
/* Cela inclut le Header et le Footer global */
|
||||||
flex-direction: column;
|
html,
|
||||||
align-items: flex-start;
|
body {
|
||||||
gap: 15px;
|
min-width: 680px !important;
|
||||||
|
overflow-x: auto !important; /* Active le scroll horizontal global si besoin */
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* On s'assure que les sous-groupes (Titre + Nav) prennent toute la largeur */
|
/* Si ton header/footer a des classes spécifiques, ajoute-les ici */
|
||||||
.prev-section-header > div {
|
header,
|
||||||
|
footer,
|
||||||
|
.navbar,
|
||||||
|
.site-header,
|
||||||
|
.site-footer {
|
||||||
|
min-width: 680px !important;
|
||||||
|
width: 100% !important;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Le conteneur principal du budget */
|
||||||
|
.budget-view {
|
||||||
|
min-width: 680px !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-between;
|
padding-right: 10px; /* Petite marge de sécurité */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 2. Colonne Fixe (Sticky) : On réduit la largeur pour laisser voir les données */
|
/* 2. TABLEAU REVENUS (Doit s'afficher en entier sans scroll interne) */
|
||||||
.col-sticky {
|
.prev-salary-table {
|
||||||
min-width: 140px !important; /* Réduit de 220px à 140px */
|
min-width: 100%; /* Prend toute la largeur dispo (680px) */
|
||||||
max-width: 140px;
|
width: 100%;
|
||||||
font-size: 0.85rem; /* Texte un peu plus petit */
|
|
||||||
white-space: normal; /* Autorise le retour à la ligne du nom */
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ajustement du petit texte (cible) */
|
/* 3. TABLEAU REPARTITION (Timeline) */
|
||||||
.col-sticky small {
|
/* Lui est très large (> 1000px). On le laisse scroller DANS la page de 680px */
|
||||||
font-size: 0.65rem;
|
.prev-timeline-wrapper {
|
||||||
margin-top: 2px;
|
width: 100%;
|
||||||
|
overflow-x: auto !important; /* Scrollbar interne */
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 3. Actions (Edit/Delete) : Toujours visibles sur mobile */
|
/* 4. ACTIONS (Crayon/Poubelle) */
|
||||||
/* Car pas de "hover" avec le doigt */
|
/* On garde la logique "au clic" car c'est plus sûr sur mobile */
|
||||||
.row-actions {
|
.row-actions {
|
||||||
display: flex !important; /* Force l'affichage */
|
display: none !important;
|
||||||
background: rgba(255, 255, 255, 0.8); /* Fond semi-transparent */
|
position: absolute;
|
||||||
border: 1px solid #e2e8f0;
|
right: 0;
|
||||||
right: 2px;
|
top: 0;
|
||||||
padding: 1px;
|
bottom: 0;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
|
||||||
|
padding: 0 10px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
z-index: 50;
|
||||||
|
border-left: 1px solid #e2e8f0;
|
||||||
|
}
|
||||||
|
.row-actions.show-actions {
|
||||||
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* On ajuste la taille des icônes à cette vue dézoomée */
|
||||||
.btn-icon-action {
|
.btn-icon-action {
|
||||||
width: 28px; /* Zone de touche un peu plus grande */
|
|
||||||
height: 28px;
|
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
|
padding: 5px;
|
||||||
|
width: 34px;
|
||||||
|
height: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 4. Tableau Récapitulatif */
|
/* 5. COLONNE STICKY */
|
||||||
.recap-wrapper {
|
/* Puisque la page est large, on peut laisser une largeur confortable */
|
||||||
padding-top: 10px;
|
.col-sticky {
|
||||||
|
min-width: 180px !important;
|
||||||
|
position: sticky !important;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recap-card {
|
/* 6. HEADER DE SECTION (Alignement) */
|
||||||
border-radius: 8px; /* Coins moins arrondis pour gagner de la place */
|
.prev-section-header {
|
||||||
border-left: none;
|
flex-direction: row; /* On peut garder aligné car on a de la place (680px) */
|
||||||
border-right: none; /* Enlever les bordures latérales sur tout petits écrans */
|
align-items: center;
|
||||||
}
|
|
||||||
|
|
||||||
.recap-table th,
|
|
||||||
.recap-table td {
|
|
||||||
padding: 8px 6px; /* Padding réduit */
|
|
||||||
font-size: 0.85rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 5. Inputs du tableau : Plus facile à toucher */
|
|
||||||
.prev-input {
|
|
||||||
font-size: 16px; /* Évite que l'iPhone zoom quand on clique dessus */
|
|
||||||
padding: 8px 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -573,4 +573,49 @@ function saveData(action, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', recalcAllAllocations);
|
document.addEventListener('DOMContentLoaded', recalcAllAllocations);
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
// Gestion du clic sur mobile pour afficher les actions
|
||||||
|
if (window.innerWidth <= 768) {
|
||||||
|
|
||||||
|
// 1. On écoute les clics sur tout le document
|
||||||
|
document.addEventListener('click', function(e) {
|
||||||
|
|
||||||
|
// On récupère la cellule "sticky" (catégorie) si elle a été cliquée
|
||||||
|
const clickedCell = e.target.closest('.col-sticky');
|
||||||
|
|
||||||
|
// Si on a cliqué sur une cellule de catégorie...
|
||||||
|
if (clickedCell) {
|
||||||
|
const actionsDiv = clickedCell.querySelector('.row-actions');
|
||||||
|
|
||||||
|
// Si on a cliqué DIRECTEMENT sur un bouton d'action (crayon/poubelle), on ne fait rien
|
||||||
|
// (on laisse le bouton faire son travail : ouvrir la modale ou supprimer)
|
||||||
|
if (e.target.closest('.btn-icon-action')) return;
|
||||||
|
|
||||||
|
// Sinon, on Toggle (Affiche/Cache) le menu de CETTE ligne
|
||||||
|
if (actionsDiv) {
|
||||||
|
// Est-ce qu'il est déjà ouvert ?
|
||||||
|
const isOpen = actionsDiv.classList.contains('show-actions');
|
||||||
|
|
||||||
|
// D'abord, on ferme TOUS les autres menus ouverts pour ne pas en avoir partout
|
||||||
|
document.querySelectorAll('.row-actions.show-actions').forEach(el => {
|
||||||
|
el.classList.remove('show-actions');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Si c'était fermé, on l'ouvre
|
||||||
|
if (!isOpen) {
|
||||||
|
actionsDiv.classList.add('show-actions');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Si on a cliqué AILLEURS (pas sur une catéogrie), on ferme tout
|
||||||
|
document.querySelectorAll('.row-actions.show-actions').forEach(el => {
|
||||||
|
el.classList.remove('show-actions');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
Reference in New Issue
Block a user