unfuck tableau

This commit is contained in:
Valentin
2023-07-04 02:30:06 +02:00
parent 962568068d
commit 87d982ed34
6 changed files with 50 additions and 27 deletions
+23
View File
@@ -14,6 +14,29 @@
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<script>
document.addEventListener('DOMContentLoaded', function () {
// CLEANER LE TABLEAU
let minHeadTh = document.querySelector("#main table thead tr th:first-of-type");
minHeadTh.style.width = `${100 / 8}%`;
let otherHeadThs = document.querySelectorAll("#main table thead tr th:not(:first-of-type)");
for (let otherHeadTh of otherHeadThs) {
otherHeadTh.style.width = `${100 / 8 * 1.75}%`;
}
let minTableTds = document.querySelectorAll("#main table tbody tr td:first-of-type");
for (let minTableTd of minTableTds) {
minTableTd.style.width = `${100 / 8}%`;
}
let otherTableTds = document.querySelectorAll("#main table tbody tr td:not(:first-of-type)");
for (let otherTableTd of otherTableTds) {
otherTableTd.style.width = `${100 / 8 * 1.75}%`;
}
}, false);
</script>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>