Attempt to improve initial page load by adding defer attribute to scripts, will attempt to add defer to inline scripts as well soon
This commit is contained in:
@@ -6,27 +6,32 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Workout Tracker</title>
|
||||
<script src="/static/js/plotly-basic-2.20.0.min.js"></script>
|
||||
<script src="/static/js/plotly-basic-2.20.0.min.js" defer></script>
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900&display=swap" rel="stylesheet" />
|
||||
<link href="/static/css/tw-elements.min.css" rel="stylesheet">
|
||||
<script src="/static/js/tailwindcss@3.2.4.js"></script>
|
||||
<script src="/static/js/tailwindcss@3.2.4.js" defer></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
fontFamily: {
|
||||
sans: ["Roboto", "sans-serif"],
|
||||
body: ["Roboto", "sans-serif"],
|
||||
mono: ["ui-monospace", "monospace"],
|
||||
window.addEventListener('DOMContentLoaded', _ => {
|
||||
tailwind.config = {
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
fontFamily: {
|
||||
sans: ["Roboto", "sans-serif"],
|
||||
body: ["Roboto", "sans-serif"],
|
||||
mono: ["ui-monospace", "monospace"],
|
||||
},
|
||||
},
|
||||
},
|
||||
corePlugins: {
|
||||
preflight: false,
|
||||
},
|
||||
};
|
||||
corePlugins: {
|
||||
preflight: false,
|
||||
},
|
||||
};
|
||||
});
|
||||
</script>
|
||||
<link href="/static/css/style.css" rel="stylesheet">
|
||||
<script src="/static/js/tw-elements.min.js"></script>
|
||||
<script src="/static/js/tw-elements.min.js" defer></script>
|
||||
<script src="/static/js/htmx.min.js" defer></script>
|
||||
<script src="/static/js/hyperscript.min.js" defer></script>
|
||||
<script src="/static/js/sweetalert2@11.js" defer></script>
|
||||
|
||||
<script>
|
||||
function debounce(func, timeout = 300) {
|
||||
@@ -185,9 +190,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="/static/js/htmx.min.js"></script>
|
||||
<script src="/static/js/hyperscript.min.js"></script>
|
||||
<script src="/static/js/sweetalert2@11.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user