From 976a6b4a8c7bcdada5c52acc85f93ece4f91e667 Mon Sep 17 00:00:00 2001 From: James Mills Date: Sat, 21 Mar 2020 20:34:37 +1000 Subject: Added basic upload support --- templates/base.html | 28 ++++++++++++++++++++++ templates/index.html | 66 +++++++++++++++++++++------------------------------ templates/upload.html | 36 ++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 39 deletions(-) create mode 100644 templates/base.html create mode 100644 templates/upload.html (limited to 'templates') diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..2d4fa93 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,28 @@ +{{define "base"}} + + + + + + + + + {{ template "stylesheets" . }} + {{ template "css" . }} + Tube + + + +
+ {{template "content" .}} +
+ +{{ template "scripts" . }} + +{{end}} +{{ define "css" }}{{ end }} +{{ define "scripts" }}{{ end }} +{{ define "stylesheets" }}{{ end }} diff --git a/templates/index.html b/templates/index.html index aa772c6..e756a06 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,40 +1,28 @@ +{{ define "content" }} {{ $playing := .Playing }} - - - Tube - - - - - - - -
-
- {{ if $playing.ID }} - -

{{ $playing.Title }}

-

{{ $playing.Modified }}

-

{{ $playing.Description }}

- {{ else }} - - {{ end }} -
-
- {{ range $m := .Playlist }} - {{ if eq $m.ID $playing.ID }} - - {{ else }} - - {{ end }} - -
-

{{ $m.Title }}

-

{{ $m.Modified }}

-
-
- {{ end }} -
-
- - +
+ {{ if $playing.ID }} + +

{{ $playing.Title }}

+

{{ $playing.Modified }}

+

{{ $playing.Description }}

+ {{ else }} + + {{ end }} +
+
+ {{ range $m := .Playlist }} + {{ if eq $m.ID $playing.ID }} + + {{ else }} + + {{ end }} + +
+

{{ $m.Title }}

+

{{ $m.Modified }}

+
+
+ {{ end }} +
+{{end}} diff --git a/templates/upload.html b/templates/upload.html new file mode 100644 index 0000000..83d8cb3 --- /dev/null +++ b/templates/upload.html @@ -0,0 +1,36 @@ +{{define "content"}} +
+
+
+
+
+
+ +
+ +
+ +
You should select valid image files only!
+
An error occurred while uploading the file
+
The upload has been canceled by the user or the browser dropped the connection
+
Your file is very big. We can't accept it. Please select more small file
+ +
+
+
 
+
+
+
 
+
 
+
 
+
+
+ +
+
+
+
+{{end}} +{{define "scripts"}} + +{{end}} -- cgit v1.2.3