Started working on company previews
This commit is contained in:
parent
40e2c43a8d
commit
4e8d02616a
@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/animenotifier/notify.moe/utils/infinitescroll"
|
"github.com/animenotifier/notify.moe/utils/infinitescroll"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxPopularCompanies = 50
|
const maxPopularCompanies = 60
|
||||||
|
|
||||||
// Popular renders the best companies.
|
// Popular renders the best companies.
|
||||||
func Popular(ctx *aero.Context) string {
|
func Popular(ctx *aero.Context) string {
|
||||||
|
@ -3,7 +3,7 @@ component PopularCompanies(companies []*arn.Company, nextIndex int, user *arn.Us
|
|||||||
|
|
||||||
h1.page-title Popular companies
|
h1.page-title Popular companies
|
||||||
|
|
||||||
ol#load-more-target.companies
|
ol#load-more-target.popular-companies
|
||||||
PopularCompaniesScrollable(companies, user)
|
PopularCompaniesScrollable(companies, user)
|
||||||
|
|
||||||
if nextIndex != -1
|
if nextIndex != -1
|
||||||
@ -12,6 +12,11 @@ component PopularCompanies(companies []*arn.Company, nextIndex int, user *arn.Us
|
|||||||
|
|
||||||
component PopularCompaniesScrollable(companies []*arn.Company, user *arn.User)
|
component PopularCompaniesScrollable(companies []*arn.Company, user *arn.User)
|
||||||
each company in companies
|
each company in companies
|
||||||
li.company.mountable
|
li.popular-company.mountable
|
||||||
a.ajax(href=company.Link())= company.Name.English
|
a.popular-company-name.ajax(href=company.Link())
|
||||||
|
.popular-company-icon
|
||||||
|
Icon("building")
|
||||||
|
|
||||||
|
span= company.Name.English
|
||||||
|
|
||||||
//- span= " (" + strconv.Itoa(popularity[company.ID]) + ")"
|
//- span= " (" + strconv.Itoa(popularity[company.ID]) + ")"
|
31
pages/companies/popular.scarlet
Normal file
31
pages/companies/popular.scarlet
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
.popular-companies
|
||||||
|
horizontal-wrap
|
||||||
|
justify-content space-evenly
|
||||||
|
|
||||||
|
.popular-company
|
||||||
|
display flex
|
||||||
|
width 100%
|
||||||
|
max-width 500px
|
||||||
|
margin 0
|
||||||
|
margin-bottom calc(content-padding / 4)
|
||||||
|
padding 0.5rem 0.75rem
|
||||||
|
ui-element
|
||||||
|
|
||||||
|
.popular-company-icon
|
||||||
|
//
|
||||||
|
|
||||||
|
.popular-company-name
|
||||||
|
horizontal
|
||||||
|
align-items center
|
||||||
|
clip-long-text
|
||||||
|
|
||||||
|
.popular-company-anime-preview
|
||||||
|
flex 1
|
||||||
|
|
||||||
|
> 900px
|
||||||
|
.popular-company
|
||||||
|
height 50px
|
||||||
|
padding 0.75rem 1rem
|
||||||
|
|
||||||
|
.popular-company-name
|
||||||
|
font-size 1.3rem
|
Loading…
Reference in New Issue
Block a user