From ca59efb2fca2ceacfb0e75c4646fb0c9db80e5d0 Mon Sep 17 00:00:00 2001 From: Patrick Kollitsch Date: Tue, 13 Aug 2024 19:15:51 +0700 Subject: [PATCH] theme(fix): proper font for code --- assets/scss/01-settings/_fonts.scss | 31 ++++++++----------- assets/scss/01-settings/_theme.scss | 3 +- .../index.md | 2 +- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/assets/scss/01-settings/_fonts.scss b/assets/scss/01-settings/_fonts.scss index ea88ec41..8c19601f 100644 --- a/assets/scss/01-settings/_fonts.scss +++ b/assets/scss/01-settings/_fonts.scss @@ -3,10 +3,9 @@ $fontdir: "/assets/webfonts"; @font-face { - font-family: "Exo Font Number 2"; - src: - url("#{$fontdir}/exo/normal.woff2") format("woff2") tech("variations"), - url("#{$fontdir}/exo/normal.woff2") format("woff2-variations"); + font-family: "Exo2"; + src: url("#{$fontdir}/exo/normal.woff2") format("woff2") tech("variations"), + url("#{$fontdir}/exo/normal.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -14,10 +13,9 @@ $fontdir: "/assets/webfonts"; } @font-face { - font-family: "Exo Font Number 2"; - src: - url("#{$fontdir}/exo/italic.woff2") format("woff2") tech("variations"), - url("#{$fontdir}/exo/italic.woff2") format("woff2-variations"); + font-family: "Exo2"; + src: url("#{$fontdir}/exo/italic.woff2") format("woff2") tech("variations"), + url("#{$fontdir}/exo/italic.woff2") format("woff2-variations"); font-weight: 100 900; font-style: italic; font-display: swap; @@ -26,9 +24,8 @@ $fontdir: "/assets/webfonts"; @font-face { font-family: JetBrainsMono; - src: - url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2") tech("variations"), - url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2-variations"); + src: url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2") tech("variations"), + url("#{$fontdir}/jetbrainsmono/jetbrainsmonoi.woff2") format("woff2-variations"); font-weight: 100 800; font-style: italic; font-display: swap; @@ -37,9 +34,8 @@ $fontdir: "/assets/webfonts"; @font-face { font-family: JetBrainsMono; - src: - url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2") tech("variations"), - url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2-variations"); + src: url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2") tech("variations"), + url("#{$fontdir}/jetbrainsmono/jetbrainsmono.woff2") format("woff2-variations"); font-weight: 100 800; font-style: normal; font-display: swap; @@ -48,10 +44,9 @@ $fontdir: "/assets/webfonts"; @font-face { font-family: BahnPro; - src: - url("#{$fontdir}/bahn/bahnpro_regular-webfont.woff2") format("woff2"), - url("#{$fontdir}/bahnpro_regular-webfont.woff") format("woff"), - url("#{$fontdir}/bahnpro_regular-webfont.ttf") format("truetype"); + src: url("#{$fontdir}/bahn/bahnpro_regular-webfont.woff2") format("woff2"), + url("#{$fontdir}/bahnpro_regular-webfont.woff") format("woff"), + url("#{$fontdir}/bahnpro_regular-webfont.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; diff --git a/assets/scss/01-settings/_theme.scss b/assets/scss/01-settings/_theme.scss index c06d8a1e..b611f53a 100644 --- a/assets/scss/01-settings/_theme.scss +++ b/assets/scss/01-settings/_theme.scss @@ -36,7 +36,8 @@ $body-bg: $arctic-powder; /// typography /// $font-size-root: 16px; $font-size-base: 1.2rem; -$font-family-sans-serif: "Exo Font Number 2"; +$font-family-sans-serif: Exo2, sans-serif; +$font-family-monospace: JetBrainsMono, monospace; /// font sizes $font-weight-lighter: 100; diff --git a/content/blog/2024/how-to-fix-dirname-not-defined-in-es-module-scope/index.md b/content/blog/2024/how-to-fix-dirname-not-defined-in-es-module-scope/index.md index cebce3e0..4e315def 100644 --- a/content/blog/2024/how-to-fix-dirname-not-defined-in-es-module-scope/index.md +++ b/content/blog/2024/how-to-fix-dirname-not-defined-in-es-module-scope/index.md @@ -54,4 +54,4 @@ And so we have our `__dirname` and `__filename` back. This is particularly usefu And isn't that what we all want? -[^1]: Those are two underscores in front of the variables `dirname` and `filename`. Sadly the style of my code-ing font on this website seems to think that a wide underscore is enough to envision that. I don't, so bear with me while I fix the font. Just know it's two underscores, as in `_ _ d i r n a m e`. +[^1]: ~~Those are two underscores in front of the variables `dirname` and `filename`. Sadly the style of my code-ing font on this website seems to think that a wide underscore is enough to envision that. I don't, so bear with me while I fix the font. Just know it's two underscores, as in `_ _ d i r n a m e`.~~