Functional web interface
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
{{ define "footer" }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ define "base" }}
|
||||
{{ define "header" }}
|
||||
<html>
|
||||
|
||||
<head>
|
||||
@@ -15,6 +15,11 @@
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
.vcenter {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
float: none;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
@@ -46,17 +51,9 @@
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="starter-template">
|
||||
<div class="container-fluid">
|
||||
<h1>Gidbig</h1>
|
||||
<p class="lead">{{ template "content" . }}</p>
|
||||
</div>
|
||||
<p class="lead">{{ template "sessionHandler" . }}</p>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{{ end }}
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{{ define "content" }}
|
||||
{{ define "sessionHandler" }}
|
||||
<a href="/discordLogin">Login with Discord</a>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{ define "content" }}
|
||||
{{ define "sessionHandler" }}
|
||||
<script type="text/javascript">
|
||||
function playSound() {
|
||||
function playSound(cmd, sndnm) {
|
||||
var data = {
|
||||
command: "!bsth",
|
||||
soundname: "unmoeglich"
|
||||
command: cmd,
|
||||
soundname: sndnm
|
||||
};
|
||||
$.post("/playsound", data, function(data, success) {});
|
||||
}
|
||||
</script>
|
||||
<a href="/logout">Logout</a><br/>
|
||||
<a href="javascript:playSound()">Play sound</a> {{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<div class="row">
|
||||
{{ range . }}
|
||||
<div class="col-sm-3 text-center">{{ .Itemtext }}<br/><a class="btn btn-primary" href="javascript:playSound('{{ .Itemcommand }}', '{{ .Itemsoundname }}')" role="button">Play!</a></div>
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user