diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2020-03-25 23:02:04 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2020-03-25 23:02:14 +1000 |
| commit | bcd79ba2c55de3202f1e9b4b9b6070b36cfdb7db (patch) | |
| tree | 13e63cbea825dcb941ed801d05aa524dcf5684ce /templates | |
| parent | af07f1aaa96184f4ac74762cb9668ad06da0796f (diff) | |
Refactor UX of Trending vs. Recent video sorting
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 1 | ||||
| -rw-r--r-- | templates/index.html | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html index d6e67b9..a156f3b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,7 +15,6 @@ <body>
<nav>
<a href="/">Tube</a>
- <a href="/?trending=1">Trending</a>
<a class="centered" style="text-indent: 0;" href="/upload">Upload</a>
</nav>
<main>
diff --git a/templates/index.html b/templates/index.html index ede6aa7..32ed16b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -11,6 +11,12 @@ {{ end }}
</div>
<div id="playlist">
+ <div class="nav">
+ <ul>
+ <li><a {{ if eq $.Sort "views" }}class="active"{{ end }}href="?sort=views">Trending</a></li>
+ <li><a {{ if eq $.Sort "timestamp" }}class="active"{{ end }}href="?sort=timestamp">Recent</a></li>
+ </ul>
+ </div>
{{ range $m := .Playlist }}
{{ if eq $m.ID $playing.ID }}
<a href="/v/{{ $m.ID }}" class="playing">
|
