~scrumplex/website

d36d7451040a6e53fd3d74584ef332c0295e989c — Sefa Eyeoglu 2 months ago 9b9f793
fix: actually load custom fonts
5 files changed, 30 insertions(+), 6 deletions(-)

A .editorconfig
M src/index.pug
M src/js/application.js
M src/scss/_typography.scss
M src/scss/_variables.scss
A .editorconfig => .editorconfig +13 -0
@@ 0,0 1,13 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

indent_style = space
indent_size = 4

[package.json]
indent_size = 2


M src/index.pug => src/index.pug +1 -1
@@ 38,7 38,7 @@ html(lang="en")
                        blockquote.text-right
                            | Converting coffee to code...
                            |
                            span.text-spinner#text-spinner(hidden="hidden") |
                            span.text-spinner#text-spinner(hidden) |
                            footer.blockquote-footer
                                | Scrumplex,
                                |

M src/js/application.js => src/js/application.js +0 -4
@@ 17,10 17,6 @@
 *
 */

// Load typefaces before actual css to avoid unnecessary redraw
import "@fontsource/fira-sans";
import "@fontsource/josefin-sans";

import ready from "./_utils";

const mainElem = document.getElementById("main");

M src/scss/_typography.scss => src/scss/_typography.scss +15 -0
@@ 1,5 1,20 @@
@use "@fontsource/fira-sans/scss/mixins" as FiraSans;
@use "@fontsource/josefin-sans/scss/mixins" as JosefinSans;

@import "variables";

@include FiraSans.fontFace(
  $weight: 400,
  $display: fallback,
  $fontDir: "~node_modules/@fontsource/fira-sans/files"  // TODO: make this cleaner
);

@include JosefinSans.fontFace(
  $weight: 400,
  $display: fallback,
  $fontDir: "~node_modules/@fontsource/josefin-sans/files"  // TODO: ditto
);

html {
    font-size: 20px;
}

M src/scss/_variables.scss => src/scss/_variables.scss +1 -1
@@ 35,5 35,5 @@ $responsiveThresholds: (tiny: 576px, smol: 768px, med: 992px, big: 1300px);
}

@mixin alt-font {
    font-family: "Josefin Sans", "Fira Sans", "Helvetica Neue", "Arial", sans-serif;
    font-family: "Josefin SansVariable", "Fira Sans", "Helvetica Neue", "Arial", sans-serif;
}