blob: 1029b9bc85547c60539b33afdb55d0d0bbce6cda (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
@args (String content, String filename, String extension)
@css => {
<link href="/css/fileview.css" rel="stylesheet">
}
@js => {
<script>const extension = "@extension";</script>
<script src="/js/prettify.js"></script>
<script src="/js/marked.js"></script>
<script src="/js/fileview.js"></script>
}
@layout.template("File " + filename, css, js) -> {
<button class="switch" id="switch">Show raw</button>
<pre class="prettyprint" id="content"><code class="lang-@extension">@content</code></pre>
<div class="preview" id="preview"></div>
}
|