mirror of
https://github.com/vinta/awesome-python.git
synced 2026-04-11 14:21:45 +08: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:
parent
ec5687a8f1
commit
f1799c2a44
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user