diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-02-13 00:08:27 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2022-02-13 00:20:24 +0100 |
| commit | 8c50411480ff73f347aa9977c814db0557f5ed79 (patch) | |
| tree | 3307f56be964f07e351ae349904acc7d1d9aee7e | |
| parent | 2720a02f7858adc2870bbfe1e4891e616245ecc9 (diff) | |
| download | quatuorbellefeuille.com-8c50411480ff73f347aa9977c814db0557f5ed79.tar.xz | |
Self-host fonts
https://rewis.io/urteile/urteil/lhm-20-01-2022-3-o-1749320/
| -rw-r--r-- | Makefile | 11 | ||||
| -rw-r--r-- | en/template.html | 4 | ||||
| -rw-r--r-- | fonts/Cormorant500i.ttf | bin | 0 -> 247492 bytes | |||
| -rw-r--r-- | fonts/OpenSans400.ttf | bin | 0 -> 122108 bytes | |||
| -rw-r--r-- | fonts/OpenSans600.ttf | bin | 0 -> 122036 bytes | |||
| -rw-r--r-- | fonts/OpenSans700.ttf | bin | 0 -> 122092 bytes | |||
| -rw-r--r-- | stylesheets/fonts.css | 31 | ||||
| -rw-r--r-- | template.html | 4 |
8 files changed, 40 insertions, 10 deletions
@@ -26,6 +26,9 @@ images_folders = $(call dirnames,$(images)) stylesheets = $(foreach img,$(shell find stylesheets -type f),$(OUTDIR)/$(img)) stylesheets_folders = $(call dirnames,$(stylesheets)) +fonts = $(foreach font,$(shell find fonts -type f),$(OUTDIR)/$(font)) +fonts_folders = $(call dirnames,$(fonts)) + scripts = $(foreach img,$(shell find scripts -type f),$(OUTDIR)/$(img)) scripts_folders = $(call dirnames,$(scripts)) @@ -39,9 +42,9 @@ upload: site clean: -rm -r $(OUTDIR) -site: $(pages) $(members_pages) $(feeds) $(images) $(stylesheets) $(scripts) +site: $(pages) $(members_pages) $(feeds) $(images) $(stylesheets) $(fonts) $(scripts) -$(images) $(stylesheets) $(scripts): $(OUTDIR)/%: % +$(images) $(stylesheets) $(fonts) $(scripts): $(OUTDIR)/%: % cp $< $@ $(feeds): $(OUTDIR)/%: % @@ -78,7 +81,7 @@ $(OUTDIR)/en/sitemap.html: en/sitemap.md # Our lists of target directories are created from the lists of leaf # resources; some intermediate directories that only hold subdirs do # not appear in these lists. Work around that with -p. -$(OUTDIR) $(languages_folders) $(images_folders) $(stylesheets_folders) $(scripts_folders): +$(OUTDIR) $(languages_folders) $(images_folders) $(stylesheets_folders) $(fonts_folders) $(scripts_folders): mkdir -p $@ -$(feeds) $(images) $(stylesheets) $(scripts) $(pages) $(members_pages): | $$(@D) +$(feeds) $(images) $(stylesheets) $(fonts) $(scripts) $(pages) $(members_pages): | $$(@D) diff --git a/en/template.html b/en/template.html index 5ecfcc3..02408a7 100644 --- a/en/template.html +++ b/en/template.html @@ -16,10 +16,8 @@ <!-- Favicon, stylesheets, fonts --> <link rel="icon" href="../images/favicon.svg"> <link rel="stylesheet" href="../stylesheets/commun.css"> + <link rel="stylesheet" href="../stylesheets/fonts.css"> {STYLESHEETS} - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet"> - <link href="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@1,500&display=swap" rel="stylesheet"> <link rel="alternate" type="application/rss+xml" href="feed.xml"> </head> <body> diff --git a/fonts/Cormorant500i.ttf b/fonts/Cormorant500i.ttf Binary files differnew file mode 100644 index 0000000..b0646d0 --- /dev/null +++ b/fonts/Cormorant500i.ttf diff --git a/fonts/OpenSans400.ttf b/fonts/OpenSans400.ttf Binary files differnew file mode 100644 index 0000000..172c056 --- /dev/null +++ b/fonts/OpenSans400.ttf diff --git a/fonts/OpenSans600.ttf b/fonts/OpenSans600.ttf Binary files differnew file mode 100644 index 0000000..f9c9c61 --- /dev/null +++ b/fonts/OpenSans600.ttf diff --git a/fonts/OpenSans700.ttf b/fonts/OpenSans700.ttf Binary files differnew file mode 100644 index 0000000..fa1c11b --- /dev/null +++ b/fonts/OpenSans700.ttf diff --git a/stylesheets/fonts.css b/stylesheets/fonts.css new file mode 100644 index 0000000..bb79bbf --- /dev/null +++ b/stylesheets/fonts.css @@ -0,0 +1,31 @@ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + font-stretch: normal; + font-display: swap; + src: url(../fonts/OpenSans400.ttf) format('truetype'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + font-stretch: normal; + font-display: swap; + src: url(../fonts/OpenSans600.ttf) format('truetype'); +} +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 700; + font-stretch: normal; + font-display: swap; + src: url(../fonts/OpenSans700.ttf) format('truetype'); +} +@font-face { + font-family: 'Cormorant'; + font-style: italic; + font-weight: 500; + font-display: swap; + src: url(../fonts/Cormorant500i.ttf) format('truetype'); +} diff --git a/template.html b/template.html index 69695f0..bb112b0 100644 --- a/template.html +++ b/template.html @@ -16,10 +16,8 @@ <!-- Favicon, stylesheets, fonts --> <link rel="icon" href="images/favicon.svg"> <link rel="stylesheet" href="stylesheets/commun.css"> + <link rel="stylesheet" href="stylesheets/fonts.css"> {STYLESHEETS} - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap" rel="stylesheet"> - <link href="https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@1,500&display=swap" rel="stylesheet"> <link rel="alternate" type="application/rss+xml" href="feed.xml"> </head> <body> |
