mirror of
https://github.com/vinta/awesome-python.git
synced 2026-07-11 18:23:46 +00: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
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue