perf(templates): add defer attribute to main.js script tags

- Add defer attribute to all main.js script includes across 22 template files
- Improves page load performance by allowing HTML parsing to continue without blocking
- Maintains script execution order while enabling parallel resource loading

This optimization reduces page render blocking and improves perceived load times
across all admin and user-facing pages that include the main.js bundle.

Affected pages include: admin dashboard, library management, settings, user
management, analytics, bookshelf, collections, conflicts, custom sections,
devices, documentation, profile, progress tracking, queue, and authentication
pages (login/register).
This commit is contained in:
2026-03-12 09:04:13 -04:00
parent b754f0ddce
commit 96e206b671
21 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -261,5 +261,5 @@ templ Header(user User, currentPath string) {
</div>
</div>
</nav>
<script src="/static/main.js" defer></script>
<script src="/static/main.js" defer defer></script>
}