diff options
| author | Julian Hurst <julian.hurst92@gmail.com> | 2020-10-14 18:19:00 +0200 |
|---|---|---|
| committer | Julian Hurst <julian.hurst92@gmail.com> | 2020-10-14 18:19:00 +0200 |
| commit | 8891eea532102b58a23a71a491be2c3f151720b5 (patch) | |
| tree | de9e577df2b2ff9c0072fda07b90d1884088b7c9 /templates/search.html | |
| download | grimtube-8891eea532102b58a23a71a491be2c3f151720b5.tar.gz | |
Initial commit
Diffstat (limited to 'templates/search.html')
| -rw-r--r-- | templates/search.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/search.html b/templates/search.html new file mode 100644 index 0000000..b921eb6 --- /dev/null +++ b/templates/search.html @@ -0,0 +1,23 @@ +{{define "title"}}Search{{end}} +{{define "content"}} + <form action="/search" method="get"> + <input id="term" name="term" type="text" placeholder="search" required> + </form> + <table> + {{range .Items}} + <tr> + <td> + <a href="{{.Url}}"><img width=120 src="{{.Thumb}}"></a> + </td> + <td> + <a href="{{.Url}}"><span>{{.Title}}</span></a> + </td> + <td> + <a href="{{.ChannelUrl}}"><span>{{.ChannelTitle}}</span></a> + </td> + </tr> + {{end}} + </table> + <a href="/search?term={{.Term}}&page={{dec .Page}}">Prev Page</a> | + <a href="/search?term={{.Term}}&page={{inc .Page}}">Next Page</a> +{{end}} |
