blob: c1fdff8dac27b8bfca9f55910002669116f62a98 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
@args (String content, String filename, String extension)
@css => {
<link href="/css/fileview.css" rel="stylesheet">
<link href="/css/markdown.css" rel="stylesheet">
}
@js => {
<script>const extension = "@extension";</script>
<script src="/js/prettify.js"></script>
<script src="/js/markdown.js"></script>
<script src="/js/fileview.js"></script>
}
@layout.template("File " + filename, css, js) -> {
<button class="switch" id="raw">Show raw</button>
<span class="settings" id="settings">
<label for="code">Linecount</label><input id="code" type="checkbox">
<label for="dark">Dark mode</label><input id="dark" type="checkbox">
</span>
<pre class="prettyprint" id="content"><code class="lang-@extension">@content</code></pre>
<textarea class="modify" id="modify"></textarea>
<iframe class="preview" id="preview"></iframe>
}
|