-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
27 lines (27 loc) · 1020 Bytes
/
index.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Web thermodynamics</title>
<script src="/coolprop.js"></script>
</head>
<body>
<main x-data="app">
<div id="editor" @doc-changed.camel.debounce="calcExpressions"
@selection-changed.camel="getSelection"
></div>
<article id="output" class="markdown-body">
<template x-for="expression in expressions">
<div class="results"
:class="
((expression.from <= currentLineTo) && (expression.to >= currentLineFrom)) ? 'highligted' : ''"
x-html="expression.outputs" x-show="expression.visible"
x-effect="if((expression.from <= currentLineTo) && (expression.to >= currentLineFrom)) $el.scrollIntoView({ block: 'nearest', inline: 'start'})">
</div>
</template>
</article>
</main>
<script type="module" src="/main.js"></script>
</body>
</html>