From 5f596831b5988caa6ce82cf7f259663fc4d7b9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Varga?= Date: Mon, 2 Dec 2024 21:45:31 +0100 Subject: [PATCH] fix: Optimize fonts and asset handling in SCSS and templates (#68) - Commented out unused Poppins font definitions in `_poppins.scss` for efficiency. - Updated preload links in `404.ejs` and `index.ejs` to include consistent `crossorigin` attributes. - Applied eager loading to the profile image in `index.ejs` for faster above-the-fold rendering. - Enhanced Webpack module rules to use case-insensitive regex for image, EJS, and SCSS files. --- src/scss/_poppins.scss | 4 ++-- src/views/404.ejs | 4 ++-- src/views/index.ejs | 11 +++++------ webpack.config.js | 6 +++--- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/scss/_poppins.scss b/src/scss/_poppins.scss index 61ca428..3e652e8 100644 --- a/src/scss/_poppins.scss +++ b/src/scss/_poppins.scss @@ -16,13 +16,13 @@ } /* latin-ext */ - @include font-face('Poppins', normal, 400, '../assets/fonts/Poppins-Regular-latin-ext.woff2', 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF'); + // @include font-face('Poppins', normal, 400, '../assets/fonts/Poppins-Regular-latin-ext.woff2', 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF'); /* latin */ @include font-face('Poppins', normal, 400, '../assets/fonts/Poppins-Regular-latin.woff2', 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD'); /* latin-ext */ - @include font-face('Poppins', normal, 700, '../assets/fonts/Poppins-Bold-latin-ext.woff2', 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF'); + // @include font-face('Poppins', normal, 700, '../assets/fonts/Poppins-Bold-latin-ext.woff2', 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF'); /* latin */ @include font-face('Poppins', normal, 700, '../assets/fonts/Poppins-Bold-latin.woff2', 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD'); \ No newline at end of file diff --git a/src/views/404.ejs b/src/views/404.ejs index efab638..67b5766 100644 --- a/src/views/404.ejs +++ b/src/views/404.ejs @@ -5,8 +5,8 @@ 404 - Page not found - Oops! - - + + diff --git a/src/views/index.ejs b/src/views/index.ejs index 9029b11..ae93e29 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -15,12 +15,11 @@ + + + + - - - - -