forked from mirrors/pronouns.cc
feat(frontend): self host fonts
This commit is contained in:
parent
83e38bb320
commit
99ab8b6864
4 changed files with 39 additions and 1 deletions
|
@ -10,6 +10,8 @@ git clone https://codeberg.org/u1f320/pronouns.cc.git pronouns
|
|||
cd pronouns
|
||||
make all
|
||||
|
||||
# if required fonts have not been downloaded yet
|
||||
./download-fonts.sh
|
||||
# if running for the first time
|
||||
./pronouns database migrate
|
||||
```
|
||||
|
|
3
download-fonts.sh
Executable file
3
download-fonts.sh
Executable 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
|
|
@ -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 {
|
||||
font-family: "FiraGO", sans-serif;
|
||||
|
|
1
frontend/static/fonts/.gitignore
vendored
Normal file
1
frontend/static/fonts/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.woff
|
Loading…
Reference in a new issue