add scaled and controversial sorts

This commit is contained in:
Ryan Stafford 2023-12-16 22:22:54 -05:00
parent d918604d75
commit d30c4d391e
3 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,7 @@
sorted by:
<a {{ if eq .CommentSort "Hot"}}class="selected"{{end}} href="{{ .SortBy "Hot"}}">hot</a>
<a {{ if eq .CommentSort "Top"}}class="selected"{{end}} href="{{ .SortBy "Top"}}">top</a>
<a {{ if eq .CommentSort "Controversial"}}class="selected"{{end}} href="{{ .SortBy "Controversial"}}">controversial</a>
<a {{ if eq .CommentSort "New"}}class="selected"{{end}} href="{{ .SortBy "New"}}">new</a>
<a {{ if eq .CommentSort "Old"}}class="selected"{{end}} href="{{ .SortBy "Old"}}">old</a>
</div>

View file

@ -73,6 +73,8 @@
{{ else }}
<li{{ if eq .Sort "Hot" }} class="selected"{{end}}><a href="{{ .SortBy "Hot" }}">hot</a></li>
<li{{ if eq .Sort "Active" }} class="selected"{{end}}><a href="{{ .SortBy "Active" }}">active</a></li>
<li{{ if eq .Sort "Scaled" }} class="selected"{{end}}><a href="{{ .SortBy "Scaled" }}">scaled</a></li>
<li{{ if eq .Sort "Controversial" }} class="selected"{{end}}><a href="{{ .SortBy "Controversial" }}">controversial</a></li>
<li{{ if eq .Sort "Old" }} class="selected"{{end}}><a href="{{ .SortBy "Old" }}">old</a></li>
<li{{ if eq .Sort "New" }} class="selected"{{end}}><a href="{{ .SortBy "New" }}">new</a></li>
<li{{ if eq .Sort "MostComments" }} class="selected"{{end}}><a href="{{ .SortBy "MostComments" }}">most comments</a></li>

View file

@ -75,6 +75,8 @@
<select name="DefaultSortType">
<option value="Hot"{{ if eq .Sort "Hot"}} selected{{end}}>Hot</option>
<option value="Active"{{ if eq .Sort "Active"}} selected{{end}}>Active</option>
<option value="Scaled"{{ if eq .Sort "Scaled"}} selected{{end}}>Scaled</option>
<option value="Controversial"{{ if eq .Sort "Controversial"}} selected{{end}}>Controversial</option>
<option value="New"{{ if eq .Sort "New"}} selected{{end}}>New</option>
<option value="Old"{{ if eq .Sort "Old"}} selected{{end}}>Old</option>
<option value="MostComments"{{ if eq .Sort "MostComments"}} selected{{end}}>Most Comments</option>
@ -98,6 +100,7 @@
<option value="New"{{ if eq .CommentSort "New"}} selected{{end}}>New</option>
<option value="Old"{{ if eq .CommentSort "Old"}} selected{{end}}>Old</option>
<option value="Top"{{ if eq .CommentSort "Top"}} selected{{end}}>Top</option>
<option value="Controversial"{{ if eq .CommentSort "Controversial"}} selected{{end}}>Controversial</option>
</select>
</div>
<div>