unfuck tableau
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user