]> git.proxmox.com Git - pve-xtermjs.git/commitdiff
add handlebars template
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 21 Jul 2020 09:00:46 +0000 (11:00 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 23 Jul 2020 10:13:31 +0000 (12:13 +0200)
for rust projects, we do not use Perl::Template, but handlebars,
so provide a separate template for that

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
debian/rules
src/www/index.html.hbs.in [new file with mode: 0644]

index 62632182c859ac258c5a7814b1d041f33420a243..2b62edd5bedd70cb0c26ce50ff321b4c139d6a35 100755 (executable)
@@ -6,4 +6,5 @@
 override_dh_auto_build:
        dh_auto_build
        sed -e 's/@VERSION@/${VERSION}/' src/www/index.html.tpl.in > src/www/index.html.tpl
-       rm src/www/index.html.tpl.in
+       sed -e 's/@VERSION@/${VERSION}/' src/www/index.html.hbs.in > src/www/index.html.hbs
+       rm src/www/index.html.tpl.in src/www/index.html.hbs.in
diff --git a/src/www/index.html.hbs.in b/src/www/index.html.hbs.in
new file mode 100644 (file)
index 0000000..ecbea1b
--- /dev/null
@@ -0,0 +1,23 @@
+<!doctype html>
+<html>
+    <head>
+       <title>{{ nodename }} - Proxmox Console</title>
+       <link rel="stylesheet" href="/xtermjs/xterm.css?version=@VERSION@" />
+       <link rel="stylesheet" href="/xtermjs/style.css?version=@VERSION@" />
+       <script src="/xtermjs/xterm.js?version=@VERSION@" ></script>
+       <script src="/xtermjs/xterm-addon-fit.js?version=@VERSION@" ></script>
+       <script src="/xtermjs/util.js?version=@VERSION@" ></script>
+    </head>
+    <body>
+       <div id="status_bar"></div>
+       <div id="wrap">
+       <div id="terminal-container"></div>
+       </div>
+       <script type="text/javascript">
+           if (typeof(PVE) === 'undefined') PVE = {};
+           PVE.UserName = '{{ UserName }}';
+           PVE.CSRFPreventionToken = '{{ CSRFPreventionToken }}';
+       </script>
+       <script src="/xtermjs/main.js?version=@VERSION@" defer ></script>
+    </body>
+</html>