Skip to content

Commit c63f903

Browse files
authored
Merge pull request #14 from dvd101x/alternate-build
Alternate build
2 parents 0d6ac33 + d638677 commit c63f903

File tree

6 files changed

+394
-242
lines changed

6 files changed

+394
-242
lines changed

index.html

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@
1010
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
1111
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
1212
<link rel="manifest" href="/site.webmanifest">
13-
<script src="https://cdn.plot.ly/plotly-2.31.1.min.js" charset="utf-8"></script>
14-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"
15-
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
16-
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js"
17-
integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg"
18-
crossorigin="anonymous"></script>
19-
<script src="https://cdn.jsdelivr.net/npm/markdown-it@14.1.0/dist/markdown-it.min.js"
20-
integrity="sha256-OMcKHnypGrQOLZ5uYBKYUacX7Rx9Ssu91Bv5UDeRz2g=" crossorigin="anonymous"></script>
21-
<script src="https://cdn.jsdelivr.net/npm/markdown-it-texmath/texmath.min.js"></script>
22-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markdown-it-texmath/css/texmath.min.css">
23-
<link rel="stylesheet"
24-
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.6.1/github-markdown-light.css"
25-
integrity="sha512-tVO0ZLV54CEoiM+i1hvfZGcopGR3rxyyC3L2/P/6NRTVXlrp4OKyTFunluVG1BRNasDLnm6ZRPDKBGM0CkS99Q=="
26-
crossorigin="anonymous" referrerpolicy="no-referrer" />
27-
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.14.6/dist/cdn.min.js" defer></script>
2813
</head>
2914
<script>
3015
const mathWorker = new Worker("mathWorker.js", { type: "classic" });
@@ -33,9 +18,8 @@
3318
<body x-data="{showCode:true, showReport:true}">
3419
<nav class="markdown-body">
3520
<form name="topBar">
36-
<button type='button' x-on:click="showCode = !showCode"
37-
x-text="showCode?'<':'>'"
38-
x-bind:title="showCode?'hide code':'show code'"></button>
21+
<button type='button' x-on:click="showCode = !showCode" x-text="showCode?'<':'>'"
22+
x-bind:title="showCode?'hide code':'show code'"></button>
3923
<fieldset id='tabs'></fieldset>
4024
<span>
4125
<fieldset id="examples" style="float: right;">
@@ -71,13 +55,11 @@
7155
</optgroup>
7256
</select>
7357
<button type="button" id="exampleInsert" name="insertExample">+</button>
74-
<button type="button"
75-
x-on:click="showReport = !showReport"
76-
x-text="showReport ? '>':'<'"
77-
x-bind:title="showReport?'hide report':'show report'"></button>
58+
<button type="button" x-on:click="showReport = !showReport" x-text="showReport ? '>':'<'"
59+
x-bind:title="showReport?'hide report':'show report'"></button>
7860
</fieldset>
7961
</span>
80-
62+
8163
</form>
8264
</nav>
8365

main.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,25 @@ import { EditorView, basicSetup } from "codemirror"
1010

1111
import { mathjs } from './mathjs.js'
1212

13+
import Plotly from 'plotly.js-dist-min'
14+
15+
import katex from 'katex'
16+
import 'katex/dist/katex.min.css'
17+
18+
import texmath from 'markdown-it-texmath'
19+
import markdownit from 'markdown-it'
20+
import 'markdown-it-texmath/css/texmath.css'
21+
22+
import 'github-markdown-css/github-markdown.css'
23+
1324
import { insertExampleFunc } from "./examples.js";
1425

26+
import Alpine from 'alpinejs'
27+
28+
window.Alpine = Alpine
29+
30+
Alpine.start()
31+
1532
const md = markdownit({ html: true })
1633
.use(texmath, {
1734
engine: katex,

0 commit comments

Comments
 (0)