nfp_moe: Load css after javascript. Also add helvetica and arial before sans-serif to fix shitty font selection by some browsers.
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded

This commit is contained in:
Jonatan Nilsson 2023-02-08 06:36:52 +00:00
parent 23580dea3f
commit 726a6a8f25
3 changed files with 11 additions and 5 deletions

View file

@ -9,6 +9,12 @@ const SiteArticle = require('./site_article')
const NotFoundView = require('./site_404') const NotFoundView = require('./site_404')
window.m = m 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.setOrig = m.route.set
m.route.set = function(path, data, options){ m.route.set = function(path, data, options){
m.route.setOrig(path, data, options) m.route.setOrig(path, data, options)

View file

@ -1,6 +1,6 @@
{ {
"name": "nfp_moe", "name": "nfp_moe",
"version": "2.1.2", "version": "2.1.3",
"port": 4110, "port": 4110,
"description": "NFP Moe website", "description": "NFP Moe website",
"main": "index.js", "main": "index.js",

View file

@ -120,7 +120,7 @@ body {
text-rendering: optimizeSpeed; text-rendering: optimizeSpeed;
line-height: 1.5; line-height: 1.5;
font-size: 16px; font-size: 16px;
font-family: 'Inter var', sans-serif; font-family: 'Inter var', Helvetica, Arial, sans-serif;
font-variation-settings: "slnt" 0; font-variation-settings: "slnt" 0;
font-feature-settings: "case", "frac", "tnum", "ss02", "calt", "ccmp", "kern"; font-feature-settings: "case", "frac", "tnum", "ss02", "calt", "ccmp", "kern";
background: var(--bg); background: var(--bg);
@ -1096,14 +1096,14 @@ footer a {
} }
</style> </style>
<link id="headstyle" rel="Stylesheet" href="/assets/app.css?v=2" type="text/css" media="none" /> <!--<link id="headstyle" rel="Stylesheet" href="/assets/app.css?v=2" type="text/css" media="none" />-->
</head> </head>
<body class="daymode"> <body class="daymode">
<script type="text/javascript" nonce="{{=nonce}}"> <script type="text/javascript" nonce="{{=nonce}}">
document.getElementById('headstyle').addEventListener('load', function() { /*document.getElementById('headstyle').addEventListener('load', function() {
window.styleloaded = true; window.styleloaded = true;
if(this.media!='all') { this.media='all'} if(this.media!='all') { this.media='all'}
}); });*/
if (localStorage.getItem('nfp_sites_darkmode')) {document.body.className = 'nightmode';} if (localStorage.getItem('nfp_sites_darkmode')) {document.body.className = 'nightmode';}
window.__nfptree = {{=payloadTree}}; window.__nfptree = {{=payloadTree}};
window.__nfpdata = {{=payloadData}}; window.__nfpdata = {{=payloadData}};