diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_footer.tmpl | 3 | ||||
-rw-r--r-- | templates/_head.tmpl | 9 | ||||
-rw-r--r-- | templates/entry.tmpl | 6 | ||||
-rw-r--r-- | templates/index.tmpl | 10 |
4 files changed, 13 insertions, 15 deletions
diff --git a/templates/_footer.tmpl b/templates/_footer.tmpl index 97a5bf8..b72953b 100644 --- a/templates/_footer.tmpl +++ b/templates/_footer.tmpl @@ -1,6 +1,5 @@ {{ define "_footer" }} </main> - </section> <script> function deleteEntry(id) { fetch("/entries/"+id, { method: 'DELETE' }) @@ -20,7 +19,7 @@ }); } -setInterval(getStatus, 1000); +setInterval(getStatus, 5000); </script> </body> diff --git a/templates/_head.tmpl b/templates/_head.tmpl index b99510f..11a4aa8 100644 --- a/templates/_head.tmpl +++ b/templates/_head.tmpl @@ -3,12 +3,11 @@ <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/assets/bulma.min.css"> + <link rel="stylesheet" href="/assets/style.css"> </head> <body> - <section class="section"> - <div class="container"> - <h1><a href="/"><strong>Home</strong></a></h1> - </div> + <header> + <h1><a href="/">midr</a></h1> + </header> <main class="container"> {{ end }} diff --git a/templates/entry.tmpl b/templates/entry.tmpl index 9f1181f..9edd5cd 100644 --- a/templates/entry.tmpl +++ b/templates/entry.tmpl @@ -1,6 +1,5 @@ {{ define "entry" }} {{ template "_head" }} -<div class="container"> {{ if (eq .ID 0) }} <form action="/entries" method="POST"> {{ else }} @@ -16,11 +15,14 @@ <input class="input" type="text" id="Link" name="Link" value="{{ .Link }}" placeholder="Paste a valid youtube-dl link" required> </div> <div class="field"> + <label for="DateAfter">Date after</label> + <input class="input" type="text" id="DateAfter" name="DateAfter" value="{{ .DateAfter }}" placeholder="Select the start date" required> + </div> + <div class="field"> <label for="output">Output folder</label> <input class="input" type="text" id="OutputFolder" name="OutputFolder" value="{{ .OutputFolder }}" placeholder="Select a ralative folder" required> </div> <button type="submit">Submit</button> </form> - </div> {{ template "_footer" }} {{ end }} diff --git a/templates/index.tmpl b/templates/index.tmpl index ae7f674..14cb420 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -1,14 +1,13 @@ {{ define "index" }} {{ template "_head" }} -<div class="container"> -<table class="table"> +<table> <thead> <tr> <th scope="col">ID</th> <th scope="col">Title</th> <th scope="col">Link</th> <th scope="col">Output</th> - <th scope="col">Status</th> + <th class="fixed" scope="col">Status</th> <th scope="col"></th> </tr> </thead> @@ -19,19 +18,18 @@ <td>{{ .Title }}</td> <td>{{ .Link }}</td> <td>{{ .OutputFolder }}</td> - <td> + <td class="fixed"> <span id="status_{{ .ID }}" class="tag is-primary is-light"></span> </td> <td> <a href="entries/{{ .ID }}" >Edit</a> </span> - <a onclick="deleteEntry({{ .ID }})">Delete</a> + <a href="#delete/{{ .ID }}" onclick="deleteEntry({{ .ID }})">Delete</a> </td> </tr> {{ end }} </tbody> </table> -</div> <a href="/entries/createEntry" class="button">Create</a> {{ template "_footer" }} {{ end }} |