2017-10-09 16:23:18 +02:00

98 lines
2.4 KiB
Plaintext

component Dashboard(schedule []*arn.UpcomingEpisode, posts []arn.Postable, soundTracks []*arn.SoundTrack, following []*arn.User)
h1.page-title Dashboard
.widgets
.widget.mountable
h3.widget-title Schedule
for i := 0; i <= 4; i++
if i < len(schedule)
.widget-ui-element
.widget-ui-element-text
a.schedule-item-link.ajax(href=schedule[i].Anime.Link())
Icon("calendar-o")
.schedule-item-title= schedule[i].Anime.Title.Canonical
.spacer
.schedule-item-date.utc-airing-date(data-start-date=schedule[i].Episode.AiringDate.Start, data-end-date=schedule[i].Episode.AiringDate.End, data-episode-number=schedule[i].Episode.Number)
else
.widget-ui-element
.widget-ui-element-text
Icon("calendar-o")
span ...
.widget.mountable
h3.widget-title Forums
each post in posts
a.widget-ui-element.ajax(href=post.Thread().Link())
.widget-ui-element-text
Icon(arn.GetForumIcon(post.Thread().Tags[0]))
span= post.Thread().Title
.widget.mountable
h3.widget-title Artworks
for i := 1; i <= 5; i++
.widget-ui-element
.widget-ui-element-text
Icon("paint-brush")
span ...
.widget.mountable
h3.widget-title Soundtracks
for i := 0; i <= 4; i++
if i < len(soundTracks)
a.widget-ui-element.ajax(href=soundTracks[i].Link())
.widget-ui-element-text
Icon("music")
span(title=soundTracks[i].Title)= soundTracks[i].MainAnime().Title.Canonical
else
.widget-ui-element
.widget-ui-element-text
Icon("music")
span ...
.widget.mountable
h3.widget-title AMVs
for i := 1; i <= 5; i++
.widget-ui-element
.widget-ui-element-text
Icon("video-camera")
span ...
.widget.mountable
h3.widget-title Reviews
for i := 1; i <= 5; i++
.widget-ui-element
.widget-ui-element-text
Icon("book")
span ...
.widget.mountable
h3.widget-title Groups
for i := 1; i <= 5; i++
.widget-ui-element
.widget-ui-element-text
Icon("group")
span ...
.widget.mountable
h3.widget-title Contacts
for i := 0; i <= 4; i++
if i < len(following)
a.widget-ui-element.ajax(href="/+" + following[i].Nick)
.widget-ui-element-text
Icon("address-card")
span= following[i].Nick
else
.widget-ui-element
.widget-ui-element-text
Icon("address-card")
span ...
Footer