-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.js
33 lines (27 loc) · 908 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import hljs from "highlight.js/lib/highlight";
import "highlight.js/styles/github.css";
import elm from 'highlight.js/lib/languages/elm';
import './src/tailwind-compiled.css';
// we're just importing the syntaxes we want from hljs
// in order to reduce our JS bundle size
// see https://bjacobel.com/2016/12/04/highlight-bundle-size/
hljs.registerLanguage('elm', elm);
import "./style.css";
// @ts-ignore
window.hljs = hljs;
const { Elm } = require("./src/Main.elm");
const pagesInit = require("elm-pages");
pagesInit({
mainElmModule: Elm.Main
});
window.addEventListener('load', function() {
loadCss('https://use.fontawesome.com/releases/v5.12.1/css/all.css');
});
function loadCss(url) {
var head = document.getElementsByTagName('HEAD')[0];
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = url;
head.appendChild(link);
}