Refactor assets loading

* move fonts first
* move CSS and JS along with the rest
* move default auto theme media checks to the HEAD instead of imports

Also, use `script defer`. This makes the JS files non-blocking.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2025-03-08 15:34:29 +02:00
parent 877d5f8cb9
commit 1acb80536b
25 changed files with 100 additions and 103 deletions

View File

@@ -66,7 +66,7 @@ end
</div>
<!-- ./wrapper -->
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
<script defer src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
<div id="advanced-info-data" style="display: none;" data-starttime="<?=starttime?>" data-endtime="<?=mg.time(true)?>" data-client-ip="<?=mg.request_info.remote_addr?>" data-xff="<?=x_forwarded_for?>"></div>
</body>