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

master
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')
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)

View File

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

View File

@ -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 {
}
</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>
<body class="daymode">
<script type="text/javascript" nonce="{{=nonce}}">
document.getElementById('headstyle').addEventListener('load', function() {
/*document.getElementById('headstyle').addEventListener('load', function() {
window.styleloaded = true;
if(this.media!='all') { this.media='all'}
});
});*/
if (localStorage.getItem('nfp_sites_darkmode')) {document.body.className = 'nightmode';}
window.__nfptree = {{=payloadTree}};
window.__nfpdata = {{=payloadData}};