Add comments

master
Arsen Musayelyan 10 months ago
parent a6e397f50b
commit f45802f372

@ -26,9 +26,11 @@ import (
)
const calcExtraHead = `
<!-- Import KaTeX for math rendering -->
<link rel="stylesheet" href="/static/katex.min.css">
<script defer src="/static/katex.min.js"></script>
<!-- Import Nerdamer for equation evaluator -->
<script src="/static/nerdamer.core.js"></script>
<script src="/static/Algebra.js"></script>
<script src="/static/Calculus.js"></script>
@ -38,7 +40,9 @@ const solveRenderScript = `
<div id="calc-content" class="subtitle mx-2 my-0"></div>
<script>
window.onload = () => {
latex = nerdamer.convertToLaTeX(nerdamer('%s').toString())
// Execute input and get output as LaTeX
latex = nerdamer('%s').latex()
// Use KaTeX to render output to #calc-content div
katex.render(latex, document.getElementById('calc-content'))
}
</script>`

@ -35,6 +35,7 @@ const plotExtraHead = `
const plotScript = `
<div id="plot-content" class="container"></div>
<script>
// Create function to draw plot in #plot-content
plotFn = () => functionPlot({
target: '#plot-content',
grid: true,
@ -43,6 +44,7 @@ plotFn = () => functionPlot({
fn: '%s'
}]
})
// Create resize observer that runs plot function
new ResizeObserver(plotFn).observe(document.getElementById('plot-content'))
</script>`

@ -26,6 +26,8 @@ import (
"net"
"net/http"
"os"
"path"
"path/filepath"
"strconv"
"strings"
"time"

Loading…
Cancel
Save