Don't let fonts block page load

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2023-04-03 22:36:53 +02:00
parent bc9097e9ab
commit 365a181264
+4 -4
View File
@@ -75,10 +75,10 @@ fonts:
url: "assets/fonts/Roboto-BlackItalic.ttf"
---
{% for font in page.fonts %}{% for style in font.styles %}@font-face {
font-display: auto;
font-family: "{{ font.family }}";{% if style.weight %}
font-weight: {{ style.weight }};{% endif %}{% if style.style %}
font-style: {{ style.style}};{% endif %}
font-family: "{{ font.family }}";
src: url("{{ style.url | absolute_url }}"){% if style.format %} format("{{ style.format }}"){% endif %};
{% if style.weight %} font-weight: {{ style.weight }};{% endif %}
{% if style.style %} font-style: {{ style.style}};{% endif %}
font-display: fallback;
}
{% endfor %}{% endfor %}