mirror of
https://github.com/vinta/awesome-python.git
synced 2026-05-08 06:38:26 -05:00
perf(fonts): defer Google Fonts load to avoid render-blocking
Use media='print' + onload swap trick to load the stylesheet non-blocking. Add noscript fallback for JS-disabled browsers. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,13 @@
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Manrope:wght@400;600;700;800&display=swap"
|
||||
rel="stylesheet"
|
||||
media="print"
|
||||
onload="this.media='all'"
|
||||
/>
|
||||
<noscript><link
|
||||
href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600&family=Manrope:wght@400;600;700;800&display=swap"
|
||||
rel="stylesheet"
|
||||
/></noscript>
|
||||
<link rel="stylesheet" href="/static/style.css" />
|
||||
<script
|
||||
async
|
||||
|
||||
Reference in New Issue
Block a user