hugo.soucy.cc

The personnal website source code of Hugo Soucy. Creates from an homebrewed static website generator (Ferron).
Log | Files | Refs

commit 2fc713ca7180d9548ceefba163a80ce5c8ab1c42
parent 8e123f6d7b25240069f23290ebbf11ed8fc3572a
Author: Hugo Soucy <hugo.soucy@equisoft.com>
Date:   Mon, 26 Aug 2019 21:07:28 -0400

Add new fonts in css

Diffstat:
Astatic/src/css/global/abstractions/_font-faces.scss | 11+++++++++++
Astatic/src/css/global/tokens/_fonts.scss | 30++++++++++++++++++++++++++++++
Mstatic/src/css/styles.scss | 2++
3 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/static/src/css/global/abstractions/_font-faces.scss b/static/src/css/global/abstractions/_font-faces.scss @@ -0,0 +1,11 @@ +// Font Faces +@each $fontKey, $fontVal in $fonts { + @each $faceKey, $faceVal in map-get($fontVal, 'faces') { + @font-face { + font-family: map-get($fontVal, 'name'); + font-style: map-get($faceVal, 'style'); + font-weight: map-get($faceVal, 'weight'); + src: map-get($faceVal, 'src'); + } + } +}; diff --git a/static/src/css/global/tokens/_fonts.scss b/static/src/css/global/tokens/_fonts.scss @@ -0,0 +1,30 @@ +// Font Tokens +$fonts: ( + 'iso': ( + 'name': "ISO", + 'fallback': monospace, + 'faces': ( + 'regular': ( + 'src': url("../fonts/iso/ISOv0.5-Regular.woff") format("woff"), + 'style': normal, + 'weight': 400, + ), + 'bold': ( + 'src': url("../fonts/iso/ISOv0.5-Bold.woff") format("woff"), + 'style': normal, + 'weight': 700, + ), + ), +), + 'leitura': ( + 'name': 'Leitura News', + 'fallback': serif, + 'faces': ( + 'regular': ( + 'src': url("../fonts/leitura/leituranews-italic4-webfont.woff") format("woff"), + 'style': normal, + 'weight': 400, + ), + ), + ), +); diff --git a/static/src/css/styles.scss b/static/src/css/styles.scss @@ -1,4 +1,6 @@ /* Globals */ @import "global/tokens/_colors.scss"; +@import "global/tokens/_fonts.scss"; +@import "global/abstractions/_font-faces.scss"; @import "global/abstractions/_root.scss"; @import "global/_base.scss";