From 726a6a8f250b0a312a7b697ad8fed8b332be72dd Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Wed, 8 Feb 2023 06:36:52 +0000 Subject: [PATCH] nfp_moe: Load css after javascript. Also add helvetica and arial before sans-serif to fix shitty font selection by some browsers. --- nfp_moe/app/index.js | 6 ++++++ nfp_moe/package.json | 2 +- nfp_moe/public/index.html | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/nfp_moe/app/index.js b/nfp_moe/app/index.js index f3a45fb..a6711ed 100644 --- a/nfp_moe/app/index.js +++ b/nfp_moe/app/index.js @@ -9,6 +9,12 @@ const SiteArticle = require('./site_article') const NotFoundView = require('./site_404') window.m = m +var fileref = document.createElement("link"); +fileref.setAttribute("rel", "stylesheet"); +fileref.setAttribute("type", "text/css"); +fileref.setAttribute("href", '/assets/app.css?v=2'); +document.head.appendChild(fileref) + m.route.setOrig = m.route.set m.route.set = function(path, data, options){ m.route.setOrig(path, data, options) diff --git a/nfp_moe/package.json b/nfp_moe/package.json index 8ec21d5..c4e61f0 100644 --- a/nfp_moe/package.json +++ b/nfp_moe/package.json @@ -1,6 +1,6 @@ { "name": "nfp_moe", - "version": "2.1.2", + "version": "2.1.3", "port": 4110, "description": "NFP Moe website", "main": "index.js", diff --git a/nfp_moe/public/index.html b/nfp_moe/public/index.html index 1c53ba4..10b7296 100644 --- a/nfp_moe/public/index.html +++ b/nfp_moe/public/index.html @@ -120,7 +120,7 @@ body { text-rendering: optimizeSpeed; line-height: 1.5; font-size: 16px; - font-family: 'Inter var', sans-serif; + font-family: 'Inter var', Helvetica, Arial, sans-serif; font-variation-settings: "slnt" 0; font-feature-settings: "case", "frac", "tnum", "ss02", "calt", "ccmp", "kern"; background: var(--bg); @@ -1096,14 +1096,14 @@ footer a { } - +