create basic frontend

This commit is contained in:
sentriz
2019-04-15 23:59:04 +01:00
parent 87efb3b3c5
commit 64fb0fdf82
17 changed files with 372 additions and 22 deletions

View File

@@ -0,0 +1,12 @@
{{ define "title" }}home{{ end }}
{{ define "user" }}
<div class="padded box mono">
<div>
<span><u>create new user</u></span>
</div>
<div class="right">
<span class="pre">howdy</span><br/>
</div>
</div>
{{ end }}

34
templates/admin/home.tmpl Normal file
View File

@@ -0,0 +1,34 @@
{{ define "title" }}home{{ end }}
{{ define "user" }}
<div class="padded box mono">
<div>
<span><u>stats</u></span>
</div>
<div class="right">
<span class="pre">artists: {{ printf "%7v" .ArtistCount }}</span><br/>
<span class="pre">albums: {{ printf "%7v" .AlbumCount }}</span><br/>
<span class="pre">tracks: {{ printf "%7v" .TrackCount }}</span>
</div>
</div>
<div class="padded box mono">
<div>
<span><u>last.fm</u></span>
</div>
<div class="right">
<span class="pre">unlinked</span><br/>
</div>
</div>
<div class="padded box mono">
<div>
<span><u>users</u></span>
</div>
<div class="right">
{{ range $user := .Users }}
<span class="pre">{{ $user.Name }} <span class="light">created</span> <u>{{ $user.CreatedAt.Format "Jan 02, 2006" }}</u> <a href="/admin/change_password">change password</a></span><br/>
{{ end }}
<br>
<a href="/admin/create_user" class="button">create new</a>
</div>
</div>
{{ end }}

View File

@@ -0,0 +1,12 @@
{{ define "title" }}gonic{{ end }}
{{ define "content" }}
<div class="light">
<span>login</span>
</div>
<form id="login-form" action="/admin/authenticate" method="post">
<input type="text" id="username" name="username" placeholder="username">
<input type="password" id="password" name="password" placeholder="password">
<input type="submit" value="login">
</form>
{{ end }}