Skip to content

Commit

Permalink
Merge pull request #12 from dvd101x/Alpine
Browse files Browse the repository at this point in the history
Alpine
  • Loading branch information
dvd101x authored Aug 10, 2024
2 parents ac7701e + af80ff4 commit 6d33eec
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 241 deletions.
34 changes: 29 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,33 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<script src="https://cdn.plot.ly/plotly-2.31.1.min.js" charset="utf-8"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/markdown-it.min.js"
integrity="sha256-OMcKHnypGrQOLZ5uYBKYUacX7Rx9Ssu91Bv5UDeRz2g=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/markdown-it-texmath/texmath.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markdown-it-texmath/css/texmath.min.css">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.6.1/github-markdown-light.css"
integrity="sha512-tVO0ZLV54CEoiM+i1hvfZGcopGR3rxyyC3L2/P/6NRTVXlrp4OKyTFunluVG1BRNasDLnm6ZRPDKBGM0CkS99Q=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="//unpkg.com/alpinejs" defer></script>


</head>
<script>
const mathWorker = new Worker("mathWorker.js", {type: "classic"});
const mathWorker = new Worker("mathWorker.js", { type: "classic" });
</script>
<body>

<body x-data="{showCode:true, showReport:true}">
<nav class="markdown-body">
<form name="topBar">
<button type='button' x-on:click="showCode = !showCode"
x-text="showCode?'<':'>'"
x-bind:title="showCode?'hide code':'show code'"></button>
<fieldset id='tabs'></fieldset>
<span>
<fieldset id="examples" style="float: right;">
Expand Down Expand Up @@ -53,15 +73,19 @@
</optgroup>
</select>
<button type="button" id="exampleInsert" name="insertExample">+</button>
<button type="button"
x-on:click="showReport = !showReport"
x-text="showReport ? '>':'<'"
x-bind:title="showReport?'hide report':'show report'"></button>
</fieldset>
</span>

</form>
</nav>

<main>
<div id="INPUT"></div>
<article id="OUTPUT" class="markdown-body">
<div id="INPUT" x-show="showCode"></div>
<article id="OUTPUT" class="markdown-body" x-show="showReport">
</article>
</main>
<script type="module" src="/main.js"> </script>
Expand Down
10 changes: 0 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './style.css'
import 'github-markdown-css/github-markdown-light.css'

import initialState from "./ext/initialState.js"

Expand All @@ -11,17 +10,8 @@ import { EditorView, basicSetup } from "codemirror"

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

import 'katex/dist/katex.min.css'
import 'markdown-it-texmath/css/texmath.css'

import { insertExampleFunc } from "./examples.js";

import markdownit from 'markdown-it'

import texmath from 'markdown-it-texmath'

import katex from 'katex'

const md = markdownit({ html: true })
.use(texmath, {
engine: katex,
Expand Down
221 changes: 1 addition & 220 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"vite": "^5.1.4"
},
"dependencies": {
"codemirror": "^6.0.1",
"github-markdown-css": "^5.5.1",
"katex": "^0.16.9",
"markdown-it": "^14.0.0",
"markdown-it-texmath": "^1.0.0",
"mathjs": "^13.0.2"
"codemirror": "^6.0.1"
}
}

0 comments on commit 6d33eec

Please sign in to comment.