aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/templates
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web/templates')
-rw-r--r--cmd/web/templates/index.html116
1 files changed, 116 insertions, 0 deletions
diff --git a/cmd/web/templates/index.html b/cmd/web/templates/index.html
new file mode 100644
index 0000000..74f2298
--- /dev/null
+++ b/cmd/web/templates/index.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <link id="maincss" rel="stylesheet" href="/static/style.css" defer>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Steam Game index</title>
+</head>
+<body>
+
+
+<nav>
+ <a href="/">Home</a>
+ {{ if .Local }}
+ <div style="display: block; float: right;">
+ <a href="/quit">Shutdown Server / Quit</a>
+ </div>
+ {{ end }}
+</nav>
+
+{{ if .Local }}
+<script src="/static/main.js"></script>
+<h2>Library: {{.Lib.Folder}}</h2>
+
+<div id="status">
+ <div id="installBar" class="installBar" style="display: none;">0%</div>
+</div>
+
+<pre><code id="message" style="display: none;">
+</code></pre>
+<br />
+
+<h3>About</h3>
+<p>
+The steam exporter is designed to let you export your steam games, either to
+another local hard drive or another computer on the network.
+</p>
+<p>
+It also allows you to import games from across the network as well if you
+provide an HTTP url from which to download the game file as exported
+from this application.
+</p>
+<p>
+<a href="/steam-export-web.exe">
+ You can download this application from this UI as well here.
+</a>
+</p>
+
+<p>
+You can give people this link to view the library remotely and download
+games from your computer:
+<br /><br />
+<a href="http://{{.HostIP}}:{{.Port}}/">http://{{.HostIP}}:{{.Port}}/</a>
+</p>
+{{ else }}
+<h2>Remote Steam library access</h2>
+
+<a href="/steam-export-web.exe">
+ If you need this program to install the games click here.
+</a>
+
+<p>
+Right click and copy the link address to paste into your local machine
+if you do not wish to store the archive or have enough space for it on
+your drive.
+</p>
+{{ end }}
+
+<p>
+Installed games:
+
+Tip: You can right click and save link as to specify a save location, e.g.
+an external hard drive
+</p>
+
+<ul>
+{{ range $key, $val := .Lib.Games }}
+<li>
+<a href="/download/{{$key}}">{{$key}} ({{$val.GetSize}})</a>
+</li>
+{{ end }}
+</ul>
+
+{{ if .Local }}
+Delete a game: ( Type out exact name, case sensitive )
+
+<form action="/delete" method="POST">
+ <input type="text" name="name" />
+ <input type="submit" value="Delete">
+</form>
+
+Install a game from a URL or local file path:
+
+<form action="/install" method="GET">
+ <input type="text" name="uri" />
+ <input type="submit" value="Install">
+</form>
+
+<p>
+Note that You can also give someone a URL to install a game if they're running
+this program, e.g. <br />
+http://127.0.0.1:8899/install?uri=http://my-server-ip-or-hostname/download/My Game
+</p>
+
+
+Change library path
+<form action="/setLib" method="GET">
+ <input type="text" name="path" />
+ <input type="submit" value="Update">
+</form>
+{{ end }}
+
+<h3>Version information</h3>
+<pre><code>{{.Version}}</pre></code>
+
+</body>