commit e9bf173e1b8ac20a060ef46f762c395f56aa53f9
parent 070759275053b644cd5185379d8684b0c958a05e
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Tue, 22 Dec 2020 01:33:04 +0100
Embed font into CSS file
This avoids the extra request for a file that is very small, removing
the flash of unstyled logo when loading the webpage. On top of that,
after Gzip compression, the new CSS file takes less space than both
files before (even with the base64 encoding!), so no bandwidth is lost
due to this (and the CSS file is cached anyway).
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/assets/css/style.css b/assets/css/style.css
@@ -53,11 +53,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
}
}
-/* Only imports the letters needed for the logo ("BOacdeinorst") */
+/* Only imports the letters needed for the logo ("BOacdeinorst"). The WOFF2 file
+ * is embedded here to avoid the extra HTTP request. */
@font-face {
font-family: 'Libre Baskerville';
font-weight: 700;
- src: local('Libre Baskerville Bold'), local('LibreBaskerville-Bold'), url(/fonts/LibreBaskerville-Bold.8b127675.woff2) format('woff2');
+ src: url('data:application/font-woff2;charset=utf-8;base64,d09GMk9UVE8AAAnUAAsAAAAAD3wAAAmKAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADZEPG4MsHBoGYAB0ATYCJAM0BAYFhVwHIBu4DlEEGwcQNncvxY+EzM0bzQcqVTRRtqxM5XBUP3eEc35qgTwUCQGWkqTM8GIyca0NMqRMxYt269Q6M71sP+Gfl3t27vvhX5BRpkFUIAm1RVkiGZZwW1D5nwzgf62pDZAEGp/Z8TEuNs7dvT36YZLANikAOlI1ph5BxhaMb40zfYpzSue/E8Kci8t0imYQFRV8Tt2Cb+CP9L+GJ22PO+cK9KfEKf5IMVBKmA9SBJUiqpUgDTlJlgoI6a7fntrfT/1KkO428DcJyPISFyrqeNcLKUdao17Rg+8RHG2SX2jOyzP3lw0M+LjcFv0zMdJK184efiAujIo1+mZZauuweULYajjIXjBcVWWb2Sr079Oeh3za3WIrhRB9U7kmGjuL+CTJe8lGo721Ca8b5QHvoI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ubauZraB71X0GjIH71GZi/zlahUHyglrh6Y/AFXrwxMIqKD0fAIxSAqyhilDTEfMFClWpbNXPmgKGhRttMz6KZ6pfUW5LfCKmYwZR7Cy/9ByCjugYuZ39fETJs6TNoQdrTd2oVQshI3R0R1OIPokY5NHqTfw3kq3W1YmYncxj4F6632gv0/6PttyP0f6kUPZP2UfBVOlo0FQ11v4lS3KuavSI+9PKr/sNLrR6ijfPvyHot0/5d+vdHN2c5u8CLqzKXuiele3J0F4Evrk7iO9/R+GQV5pYKfUX8LFRl3CImxf3pJqp2VVqjVVhKxC0CCp+aqCLUGvKFEK0rNWrjjRB1hxBGqdhSpuLVPqY2smNMI3pqMi1+ciI6cvJ6HAoN058sW46BjCJZRTFKkiCxkWKNwNbMLPI42k3kK0T1eRFzciSMDKmdbCJz2iZWDmO7kYxSbdmgNyfy2JGoYvfGVyC1NWI2gMjpDQ1iV2B4cSQzNptlntJfH95CqZRjwjyPw9YEklwaQlUGypHTthvArvyD2dkqDgXyqWVYymc3283JLEwgpbrMyWK5KiIXfl47E7NUl6Nlg234LAdbxPah5WH3WbISxkI3Zg0DNfFKwBoX6ZipfgD6igDdRCYJNacaSv3fZS5XBQA=') format('woff2');
unicode-range: U+0042,U+004F,U+0061,U+0063,U+0064,U+0065,U+0069,U+006E,U+006F,U+0072,U+0073,U+0074;
}
diff --git a/static/fonts/LibreBaskerville-Bold.8b127675.woff2 b/static/fonts/LibreBaskerville-Bold.8b127675.woff2
Binary files differ.