refactor: reorder head and use non-blocking font loading
This commit is contained in:
@@ -3,19 +3,20 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>MyAnimeList: {{template "title" .}}</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap">
|
||||
{{/* page title injected from child template */}}
|
||||
<title>MyAnimeList: {{template "title" .}}</title>
|
||||
<link rel="manifest" href="/static/assets/manifest.json">
|
||||
<link rel="icon" type="image/svg+xml" href="/static/assets/favicon.svg">
|
||||
<script>
|
||||
const preferredTheme = window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
document.documentElement.dataset.theme = preferredTheme;
|
||||
document.documentElement.style.colorScheme = preferredTheme;
|
||||
</script>
|
||||
<link rel="manifest" href="/static/assets/manifest.json">
|
||||
<link rel="icon" type="image/svg+xml" href="/static/assets/favicon.svg">
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap"></noscript>
|
||||
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap" as="style" onload="this.onload=null;this.rel='stylesheet'">
|
||||
<noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,600&display=swap"></noscript>
|
||||
<link rel="stylesheet" href="/dist/tailwind.css">
|
||||
<style>
|
||||
/* Prevent transition on load */
|
||||
|
||||
Reference in New Issue
Block a user