From 8c881ac397129bfef148499b85d047377a3c332f Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Tue, 2 Jan 2024 17:04:45 +0100 Subject: [PATCH] SONAR-21369 Fix fonts path for sonar.web.context not null --- server/sonar-web/config/esbuild-config.js | 2 +- server/sonar-web/public/fonts/Inter/inter.css | 36 +++++++++---------- .../sonar-web/public/fonts/Ubuntu/Ubuntu.css | 8 ++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/server/sonar-web/config/esbuild-config.js b/server/sonar-web/config/esbuild-config.js index a7eb205fa1f..998598ee4a0 100644 --- a/server/sonar-web/config/esbuild-config.js +++ b/server/sonar-web/config/esbuild-config.js @@ -56,7 +56,7 @@ module.exports = (release) => { return { entryPoints: ['src/main/js/app/index.ts'], tsconfig: './tsconfig.json', - external: ['/images/*', '/fonts/*'], + external: ['/images/*', '../fonts/*'], loader: { '.png': 'dataurl', '.md': 'text', diff --git a/server/sonar-web/public/fonts/Inter/inter.css b/server/sonar-web/public/fonts/Inter/inter.css index 38782bc647c..64008b715ea 100644 --- a/server/sonar-web/public/fonts/Inter/inter.css +++ b/server/sonar-web/public/fonts/Inter/inter.css @@ -3,14 +3,14 @@ font-style: normal; font-weight: 100; font-display: swap; - src: url('/fonts/Inter/Inter-Thin.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Thin.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 100; font-display: swap; - src: url('/fonts/Inter/Inter-ThinItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-ThinItalic.woff2') format('woff2'); } @font-face { @@ -18,14 +18,14 @@ font-style: normal; font-weight: 200; font-display: swap; - src: url('/fonts/Inter/Inter-ExtraLight.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-ExtraLight.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 200; font-display: swap; - src: url('/fonts/Inter/Inter-ExtraLightItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-ExtraLightItalic.woff2') format('woff2'); } @font-face { @@ -33,14 +33,14 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url('/fonts/Inter/Inter-Light.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Light.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 300; font-display: swap; - src: url('/fonts/Inter/Inter-LightItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-LightItalic.woff2') format('woff2'); } @font-face { @@ -48,14 +48,14 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url('/fonts/Inter/Inter-Regular.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Regular.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 400; font-display: swap; - src: url('/fonts/Inter/Inter-Italic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Italic.woff2') format('woff2'); } @font-face { @@ -63,14 +63,14 @@ font-style: normal; font-weight: 500; font-display: swap; - src: url('/fonts/Inter/Inter-Medium.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Medium.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 500; font-display: swap; - src: url('/fonts/Inter/Inter-MediumItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-MediumItalic.woff2') format('woff2'); } @font-face { @@ -78,14 +78,14 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url('/fonts/Inter/Inter-SemiBold.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-SemiBold.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 600; font-display: swap; - src: url('/fonts/Inter/Inter-SemiBoldItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-SemiBoldItalic.woff2') format('woff2'); } @font-face { @@ -93,14 +93,14 @@ font-style: normal; font-weight: 700; font-display: swap; - src: url('/fonts/Inter/Inter-Bold.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Bold.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 700; font-display: swap; - src: url('/fonts/Inter/Inter-BoldItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-BoldItalic.woff2') format('woff2'); } @font-face { @@ -108,14 +108,14 @@ font-style: normal; font-weight: 800; font-display: swap; - src: url('/fonts/Inter/Inter-ExtraBold.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-ExtraBold.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 800; font-display: swap; - src: url('/fonts/Inter/Inter-ExtraBoldItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-ExtraBoldItalic.woff2') format('woff2'); } @font-face { @@ -123,12 +123,12 @@ font-style: normal; font-weight: 900; font-display: swap; - src: url('/fonts/Inter/Inter-Black.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-Black.woff2') format('woff2'); } @font-face { font-family: 'Inter'; font-style: italic; font-weight: 900; font-display: swap; - src: url('/fonts/Inter/Inter-BlackItalic.woff2') format('woff2'); + src: url('../fonts/Inter/Inter-BlackItalic.woff2') format('woff2'); } diff --git a/server/sonar-web/public/fonts/Ubuntu/Ubuntu.css b/server/sonar-web/public/fonts/Ubuntu/Ubuntu.css index 402e48173ac..244fa66a495 100644 --- a/server/sonar-web/public/fonts/Ubuntu/Ubuntu.css +++ b/server/sonar-web/public/fonts/Ubuntu/Ubuntu.css @@ -3,14 +3,14 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url('/fonts/Ubuntu/UbuntuMono-Regular.woff2') format('woff2'); + src: url('../fonts/Ubuntu/UbuntuMono-Regular.woff2') format('woff2'); } @font-face { font-family: 'Ubuntu Mono'; font-style: italic; font-weight: 400; font-display: swap; - src: url('/fonts/Ubuntu/UbuntuMono-Italic.woff2') format('woff2'); + src: url('../fonts/Ubuntu/UbuntuMono-Italic.woff2') format('woff2'); } @font-face { @@ -18,12 +18,12 @@ font-style: normal; font-weight: 700; font-display: swap; - src: url('/fonts/Ubuntu/UbuntuMono-Bold.woff2') format('woff2'); + src: url('../fonts/Ubuntu/UbuntuMono-Bold.woff2') format('woff2'); } @font-face { font-family: 'Ubuntu Mono'; font-style: italic; font-weight: 700; font-display: swap; - src: url('/fonts/Ubuntu/UbuntuMono-BoldItalic.woff2') format('woff2'); + src: url('../fonts/Ubuntu/UbuntuMono-BoldItalic.woff2') format('woff2'); } -- 2.39.5