2017-06-08 19:54:39 +00:00
|
|
|
component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread)
|
2016-11-20 10:26:11 +00:00
|
|
|
.profile
|
2017-06-15 13:50:39 +00:00
|
|
|
img.profile-cover(src=viewUser.CoverImageURL(), alt="Cover image")
|
2016-11-20 10:26:11 +00:00
|
|
|
|
|
|
|
.image-container
|
|
|
|
ProfileImage(viewUser)
|
|
|
|
|
|
|
|
.intro-container
|
|
|
|
h2#nick= viewUser.Nick
|
|
|
|
|
|
|
|
if viewUser.Tagline != ""
|
|
|
|
p.profile-field.tagline
|
|
|
|
Icon("comment")
|
2016-11-20 14:15:14 +00:00
|
|
|
span.tagline-text= viewUser.Tagline
|
2016-11-20 10:26:11 +00:00
|
|
|
else
|
|
|
|
p.profile-field.tagline
|
|
|
|
Icon("comment")
|
2016-11-20 14:15:14 +00:00
|
|
|
span.tagline-text No tagline yet.
|
2016-11-20 10:26:11 +00:00
|
|
|
|
2017-06-12 22:06:35 +00:00
|
|
|
if viewUser.Website != ""
|
|
|
|
p.profile-field.website
|
|
|
|
Icon("home")
|
|
|
|
a(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow")= viewUser.Website
|
2016-11-20 10:26:11 +00:00
|
|
|
|
2017-06-08 12:46:38 +00:00
|
|
|
if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 1000
|
|
|
|
p.profile-field.osu(title="osu! performance points")
|
|
|
|
Icon("trophy")
|
|
|
|
span= toString(int(viewUser.Accounts.Osu.PP)) + " pp"
|
2016-11-20 10:26:11 +00:00
|
|
|
|
|
|
|
//- if viewUser.dataEditCount
|
|
|
|
//- p.profile-field.editor-contribution(title="Anime data modifications")
|
|
|
|
//- Icon("edit")
|
|
|
|
//- span= viewUser.dataEditCount
|
|
|
|
|
|
|
|
if viewUser.Registered != ""
|
|
|
|
p.profile-field.registration-date(title="Member since")
|
|
|
|
Icon("calendar")
|
|
|
|
//- span= time.Parse(time.RFC3339, viewUser.Registered)
|
2017-06-06 14:59:04 +00:00
|
|
|
span= viewUser.RegisteredTime().Format("Jan 2006")
|
2016-11-20 10:26:11 +00:00
|
|
|
//- span= monthNames[joined.getMonth()] + ' ' + joined.getFullYear()
|
|
|
|
|
|
|
|
if viewUser.Role != ""
|
|
|
|
p.profile-field.role
|
|
|
|
Icon("rocket")
|
|
|
|
span= arn.Capitalize(viewUser.Role)
|
|
|
|
|
2017-06-08 12:46:38 +00:00
|
|
|
//- nav.light-button-group
|
|
|
|
//- a.light-button(href="#") Bio
|
|
|
|
//- a.light-button(href="#") Anime
|
|
|
|
//- a.light-button(href="#") Forum
|
|
|
|
|
2017-06-08 19:54:39 +00:00
|
|
|
.profile-category
|
2017-06-19 20:16:01 +00:00
|
|
|
h3
|
|
|
|
a.ajax(href="/+" + viewUser.Nick + "/animelist", title="View all anime") Anime
|
2017-06-08 19:54:39 +00:00
|
|
|
|
2017-06-19 20:16:01 +00:00
|
|
|
.profile-watching-list
|
2017-06-08 20:02:39 +00:00
|
|
|
if len(animeList.Items) == 0
|
|
|
|
p No anime in the collection.
|
|
|
|
else
|
|
|
|
each item in animeList.Items
|
2017-06-19 20:16:01 +00:00
|
|
|
a.profile-watching-list-item.ajax(href="/+" + viewUser.Nick + "/animelist/" + item.Anime().ID, title=item.Anime().Title.Canonical + " (" + toString(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
|
|
|
|
img.anime-cover-image.profile-watching-list-item-image(src=item.Anime().Image.Tiny, alt=item.Anime().Title.Canonical)
|
2017-06-08 19:54:39 +00:00
|
|
|
|
2017-06-08 12:46:38 +00:00
|
|
|
.profile-category
|
2017-06-19 20:16:01 +00:00
|
|
|
h3
|
|
|
|
a.ajax(href="/+" + viewUser.Nick + "/threads", title="View all threads") Threads
|
2017-06-08 12:46:38 +00:00
|
|
|
|
2017-06-19 20:16:01 +00:00
|
|
|
if len(threads) == 0
|
|
|
|
p No threads on the forum.
|
2017-06-08 20:02:39 +00:00
|
|
|
else
|
|
|
|
each thread in threads
|
|
|
|
ThreadLink(thread)
|
2017-06-08 12:46:38 +00:00
|
|
|
|