2017-07-06 22:23:32 +02:00

98 lines
2.7 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-element
.widget-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-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-element
.widget-element-text
Icon("calendar-o")
span ...
.widget.mountable
h3.widget-title Forums
each post in posts
a.widget-element.ajax(href=post.Thread().Link())
.widget-element-text
Icon(arn.GetForumIcon(post.Thread().Tags[0]))
span= post.Thread().Title
.widget.mountable
h3.widget-title Groups
for i := 1; i <= 5; i++
.widget-element
.widget-element-text
Icon("group")
span ...
.widget.mountable
h3.widget-title Soundtracks
for i := 0; i <= 4; i++
if i < len(soundTracks)
a.widget-element.ajax(href=soundTracks[i].Link())
.widget-element-text
Icon("music")
span(title=soundTracks[i].Media[0].Title)= soundTracks[i].Anime()[0].Title.Canonical
else
.widget-element
.widget-element-text
Icon("music")
span ...
.widget.mountable
h3.widget-title Contacts
for i := 0; i <= 4; i++
if i < len(following)
a.widget-element.ajax(href="/+" + following[i].Nick)
.widget-element-text
Icon("address-card")
span= following[i].Nick
else
.widget-element
.widget-element-text
Icon("address-card")
span ...
.widget.mountable
h3.widget-title Follow
a.widget-element(href="https://discord.gg/0kimAmMCeXGXuzNF", target="_blank", rel="noopener")
.widget-element-text
Icon("microphone")
span Discord
a.widget-element(href="https://www.facebook.com/animenotifier", target="_blank", rel="noopener")
.widget-element-text
Icon("facebook")
span Facebook
a.widget-element(href="https://twitter.com/animenotifier", target="_blank", rel="noopener")
.widget-element-text
Icon("twitter")
span Twitter
a.widget-element(href="https://plus.google.com/+AnimeReleaseNotifierOfficial", target="_blank", rel="noopener")
.widget-element-text
Icon("google-plus")
span Google+
a.widget-element(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener")
.widget-element-text
Icon("github")
span GitHub