Added infinite scrolling to companies

This commit is contained in:
2018-03-13 23:06:16 +01:00
parent 3e2594ab9f
commit 40e2c43a8d
12 changed files with 64 additions and 63 deletions

View File

@ -1,11 +1,17 @@
component PopularCompanies(companies []*arn.Company, popularity map[string]int, user *arn.User)
component PopularCompanies(companies []*arn.Company, nextIndex int, user *arn.User)
CompaniesTabs(user)
h1.page-title Popular companies
.companies
ol
each company in companies
li.mountable
a.ajax(href=company.Link())= company.Name.English
span= " (" + strconv.Itoa(popularity[company.ID]) + ")"
ol#load-more-target.companies
PopularCompaniesScrollable(companies, user)
if nextIndex != -1
.buttons
LoadMore(nextIndex)
component PopularCompaniesScrollable(companies []*arn.Company, user *arn.User)
each company in companies
li.company.mountable
a.ajax(href=company.Link())= company.Name.English
//- span= " (" + strconv.Itoa(popularity[company.ID]) + ")"