brouillon3
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| brouillon3 [2026/04/21 17:10] – nanaki | brouillon3 [2026/04/21 17:22] (Version actuelle) – nanaki | ||
|---|---|---|---|
| Ligne 154: | Ligne 154: | ||
| </ | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | table { width:100%; border-collapse: | ||
| + | th, td { border:1px solid #ccc; padding: | ||
| + | |||
| + | tr[data-effect=" | ||
| + | tr[data-effect=" | ||
| + | tr[data-effect=" | ||
| + | |||
| + | th { background:# | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | <tr> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | <!-- 🔥 OFFENSIF --> | ||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <td>6 PM</ | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | <!-- 🛡 DÉFENSIF --> | ||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <td>5 PM</ | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | <!-- ☠️ MALÉDICTION --> | ||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | <td>6 PM</ | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | body { font-family: | ||
| + | |||
| + | .controls { display: | ||
| + | |||
| + | #pointsBox { font-weight: | ||
| + | |||
| + | table { width:100%; border-collapse: | ||
| + | th, td { border:1px solid #ccc; padding: | ||
| + | th { background:# | ||
| + | tr: | ||
| + | |||
| + | .offensif { background:# | ||
| + | .defensif { background:# | ||
| + | .utilitaire { background:# | ||
| + | .malediction { background:# | ||
| + | |||
| + | .lvl { padding:2px 6px; border-radius: | ||
| + | .lvl-1 { background:# | ||
| + | .lvl-2 { background:# | ||
| + | |||
| + | </ | ||
| + | |||
| + | <div id=" | ||
| + | Points utilisés : <span id=" | ||
| + | </ | ||
| + | |||
| + | <div class=" | ||
| + | |||
| + | <select id=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | </ | ||
| + | |||
| + | <select id=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | </ | ||
| + | |||
| + | <select id=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | <option value=" | ||
| + | </ | ||
| + | |||
| + | <input type=" | ||
| + | |||
| + | </ | ||
| + | |||
| + | <table id=" | ||
| + | < | ||
| + | <tr> | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | |||
| + | <!-- SORTS AJOUTES --> | ||
| + | |||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | <tr class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </tr> | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | const maxPoints = 15; | ||
| + | |||
| + | const raceFilter = document.getElementById(" | ||
| + | const typeFilter = document.getElementById(" | ||
| + | const effectFilter = document.getElementById(" | ||
| + | const search = document.getElementById(" | ||
| + | const rows = document.querySelectorAll("# | ||
| + | const checkboxes = document.querySelectorAll(" | ||
| + | const pointsDisplay = document.getElementById(" | ||
| + | |||
| + | function updatePoints(e){ | ||
| + | let total = 0; | ||
| + | |||
| + | checkboxes.forEach(cb => { | ||
| + | if(cb.checked) total++; | ||
| + | }); | ||
| + | |||
| + | if(total > maxPoints){ | ||
| + | e.target.checked = false; | ||
| + | return; | ||
| + | } | ||
| + | |||
| + | pointsDisplay.textContent = total; | ||
| + | |||
| + | if(total >= maxPoints){ | ||
| + | checkboxes.forEach(cb => { | ||
| + | if(!cb.checked) cb.disabled = true; | ||
| + | }); | ||
| + | } else { | ||
| + | checkboxes.forEach(cb => cb.disabled = false); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | checkboxes.forEach(cb => cb.addEventListener(" | ||
| + | |||
| + | function filter(){ | ||
| + | const term = search.value.toLowerCase(); | ||
| + | |||
| + | rows.forEach(row=> | ||
| + | |||
| + | const raceOk = raceFilter.value===" | ||
| + | const typeOk = typeFilter.value===" | ||
| + | const effectOk = effectFilter.value===" | ||
| + | const textOk = row.innerText.toLowerCase().includes(term); | ||
| + | |||
| + | row.style.display = (raceOk && typeOk && effectOk && textOk) ? "" | ||
| + | }); | ||
| + | } | ||
| + | |||
| + | raceFilter.onchange = filter; | ||
| + | typeFilter.onchange = filter; | ||
| + | effectFilter.onchange = filter; | ||
| + | search.oninput = filter; | ||
| + | |||
| + | function sortTable(col){ | ||
| + | const tbody = document.querySelector("# | ||
| + | const rowsArr = Array.from(tbody.rows); | ||
| + | |||
| + | rowsArr.sort((a, | ||
| + | |||
| + | rowsArr.forEach(r=> | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
brouillon3.1776784223.txt.gz · Dernière modification : 2026/04/21 17:10 de nanaki
