Remove dependency on Google Fonts

Thanks to the deployment of a Google Fonts binary mirror to my own CDN we can stop using Google Fonts.

Closes #3.
This commit is contained in:
Sofía Aritz 2023-04-13 00:19:45 +02:00
parent dbb43e25ba
commit 7422b4d113
2 changed files with 28 additions and 1 deletions

View file

@ -5,10 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico">
<title>{% if title %} {{ title }} - {% endif %}sofi web</title>
<link rel="stylesheet" href="/css/fonts.css" type="text/css">
<link rel="stylesheet" href="/css/app.css" type="text/css">
<link rel="stylesheet" href="/css/navbar.css" type="text/css">
<link rel="stylesheet" href="/css/comments.css" type="text/css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;1,300&family=Rubik:ital,wght@0,400;0,500;1,400;1,500&display=swap" type="text/css">
{% if load_comments_script %}
<script src="/scripts/dompurify.js"></script>
{% endif %}

27
static/css/fonts.css Normal file
View file

@ -0,0 +1,27 @@
@font-face {
font-family: "JetBrains Mono";
src: url("https://cdn.sofiaritz.com/fonts/ofl/jetbrainsmono/JetBrainsMono-Italic[wght].ttf");
font-style: italic;
font-weight: 300;
}
@font-face {
font-family: "JetBrains Mono";
src: url("https://cdn.sofiaritz.com/fonts/ofl/jetbrainsmono/JetBrainsMono[wght].ttf");
font-style: normal;
font-weight: 300;
}
@font-face {
font-family: "Rubik";
src: url("https://cdn.sofiaritz.com/fonts/ofl/rubik/Rubik[wght].ttf");
font-style: normal;
font-weight: 400 500;
}
@font-face {
font-family: "Rubik";
src: url("https://cdn.sofiaritz.com/fonts/ofl/rubik/Rubik-Italic[wght].ttf");
font-style: italic;
font-weight: 400 500;
}