Skip to content

Commit

Permalink
add scaled and controversial sorts
Browse files Browse the repository at this point in the history
  • Loading branch information
rystaf committed Dec 17, 2023
1 parent d918604 commit d30c4d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions templates/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 3 additions & 0 deletions templates/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit d30c4d3

Please sign in to comment.