aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/login.html2
-rw-r--r--templates/media.html8
-rw-r--r--templates/register.html28
3 files changed, 36 insertions, 2 deletions
diff --git a/templates/login.html b/templates/login.html
index f71d9d3..607faa1 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -1,5 +1,5 @@
{{template "layout.html" .}}
-{{define "title"}} Register {{end}}
+{{define "title"}} Login {{end}}
{{define "content"}}
<form action="/login" method="post">
<div class="field">
diff --git a/templates/media.html b/templates/media.html
index 478d8ae..6302a57 100644
--- a/templates/media.html
+++ b/templates/media.html
@@ -5,9 +5,15 @@
{{range .Data.Medias}}
<div class="card">
<div class="card-image">
+ {{ if .IsVideo }}
+ <video controls muted="true" preload="metadata">
+ <source src="/media/image?path_hash={{.PathHash}}" type="{{.MIMEType}}">
+ </video>
+ {{ else }}
<figure class="image is-fit">
- <img src="/media/image?path_hash={{.PathHash}}">
+ <img src="/media/image?path_hash={{.PathHash}}">
</figure>
+ {{ end }}
</div>
</div>
{{end}}
diff --git a/templates/register.html b/templates/register.html
new file mode 100644
index 0000000..b026d33
--- /dev/null
+++ b/templates/register.html
@@ -0,0 +1,28 @@
+{{template "layout.html" .}}
+{{define "title"}} Initial Setup {{end}}
+{{define "content"}}
+<h1>Initial Setup</h1>
+<form action="/initial" method="post">
+ <div class="field">
+ <label class="label">Username</label>
+ <div class="control">
+ <input class="input" name="username" type="text">
+ </div>
+ </div>
+ <div class="field">
+ <label class="label">Password</label>
+ <div class="control">
+ <input class="input" name="password" type="password">
+ </div>
+ </div>
+ <div class="field">
+ <label class="label">Root folder</label>
+ <div class="control">
+ <input class="input" name="path" type="text">
+ </div>
+ </div>
+ <div class="field">
+ <input class="button is-pulled-right" value="Save" type="submit">
+ </div>
+</form>
+{{end}}