aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views/fileview.rocker.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/views/fileview.rocker.html')
-rw-r--r--src/main/resources/views/fileview.rocker.html19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/main/resources/views/fileview.rocker.html b/src/main/resources/views/fileview.rocker.html
index 03a7418..1029b9b 100644
--- a/src/main/resources/views/fileview.rocker.html
+++ b/src/main/resources/views/fileview.rocker.html
@@ -1,5 +1,18 @@
-@args (String content, String filename)
+@args (String content, String filename, String extension)
-@layout.template("File " + filename) -> {
-@content
+@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>
}