Added the list of quotes sorted by last and best with a correct design.

The design has been verified to be responsive and compatible with the dark theme
This commit is contained in:
Scott
2018-01-17 23:30:55 +01:00
parent 9eb4d1a234
commit c51cb4743b
11 changed files with 268 additions and 12 deletions

View File

@ -1,6 +1,8 @@
component Quotes(quotes []*arn.Quote, user *arn.User)
component Quotes(quotes []*arn.Quote, quotesPerPage int, user *arn.User)
h1.page-title Quotes
QuotesTabs
.corner-buttons
if user != nil
if user.DraftIndex().QuoteID == ""
@ -12,6 +14,18 @@ component Quotes(quotes []*arn.Quote, user *arn.User)
Icon("pencil")
span Edit draft
ul
each quote in quotes
li= quote.Description
#load-more-target.quotes
QuotesScrollable(quotes, user)
if len(quotes) == quotesPerPage
.buttons
LoadMore(quotesPerPage)
component QuotesScrollable(quotes []*arn.Quote, user *arn.User)
each quote in quotes
Quote(quote)
component QuotesTabs
.tabs
Tab("Latest", "quote-left", "/quotes")
Tab("Best", "heart", "/quotes/best")