feat(frontend): self host fonts

This commit is contained in:
Sam 2023-03-27 15:40:03 +02:00
parent 83e38bb320
commit 99ab8b6864
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
4 changed files with 39 additions and 1 deletions

View File

@ -10,6 +10,8 @@ git clone https://codeberg.org/u1f320/pronouns.cc.git pronouns
cd pronouns cd pronouns
make all make all
# if required fonts have not been downloaded yet
./download-fonts.sh
# if running for the first time # if running for the first time
./pronouns database migrate ./pronouns database migrate
``` ```

3
download-fonts.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
curl "https://free.bboxtype.com/embedfonts/fonts.php?family=FiraGO&weight=400" -o frontend/static/fonts/FiraGO-400.woff "https://free.bboxtype.com/embedfonts/fonts.php?family=FiraGO&weight=400i" -o frontend/static/fonts/FiraGO-400i.woff "https://free.bboxtype.com/embedfonts/fonts.php?family=FiraGO&weight=700" -o frontend/static/fonts/FiraGO-700.woff "https://free.bboxtype.com/embedfonts/fonts.php?family=FiraGO&weight=700i" -o frontend/static/fonts/FiraGO-700i.woff

View File

@ -1,4 +1,36 @@
@import url("https://free.bboxtype.com/embedfonts/?family=FiraGO:400,400i,700,700i"); @font-face {
font-family: "FiraGO";
font-display: swap;
font-style: normal;
font-weight: 400;
src: url("/fonts/FiraGO-400.woff") format("woff");
}
@font-face {
font-family: "FiraGO";
font-display: swap;
font-style: normal;
font-weight: 400;
src: url("/fonts/FiraGO-400i.woff") format("woff");
font-style: italic;
}
@font-face {
font-family: "FiraGO";
font-display: swap;
font-style: normal;
font-weight: 700;
src: url("/fonts/FiraGO-700.woff") format("woff");
}
@font-face {
font-family: "FiraGO";
font-display: swap;
font-style: normal;
font-weight: 700;
src: url("/fonts/FiraGO-700i.woff") format("woff");
font-style: italic;
}
body { body {
font-family: "FiraGO", sans-serif; font-family: "FiraGO", sans-serif;

1
frontend/static/fonts/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.woff