Feature: add filters for newest page
This commit is contained in:
parent
0217563d1e
commit
c1f62a8b81
2 changed files with 14 additions and 1 deletions
13
template/newest.html
Normal file
13
template/newest.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
{{ template "header.html" }}
|
||||
|
||||
<div class="container">
|
||||
<h2>Newest works from all users</h2>
|
||||
<div class="switcher">
|
||||
<span class="switch-title">Filter</span>
|
||||
<a href="/newest" class="switch-button">Safe</a>
|
||||
<a href="/newest?mode=r18" class="switch-button">R-18</a>
|
||||
</div>
|
||||
<div>{{ template "small-tn.html" .Items }}</div>
|
||||
</div>
|
||||
|
||||
{{ template "footer.html" }}
|
|
@ -101,7 +101,7 @@ func newestArtworksPage(c *gin.Context) {
|
|||
|
||||
works, _ := PC.GetNewestArtworks(worktype, r18)
|
||||
|
||||
c.HTML(http.StatusOK, "list.html", gin.H{"Title": "Newest works from all users", "Items": works})
|
||||
c.HTML(http.StatusOK, "newest.html", gin.H{"Items": works})
|
||||
}
|
||||
|
||||
func search_page(c *gin.Context) {
|
||||
|
|
Loading…
Reference in a new issue