89 lines
2.8 KiB
Plaintext
Raw Normal View History

2017-06-20 13:02:20 +02:00
component ProfileHeader(viewUser *arn.User, user *arn.User)
2016-11-20 19:26:11 +09:00
.profile
2017-06-15 15:50:39 +02:00
img.profile-cover(src=viewUser.CoverImageURL(), alt="Cover image")
2016-11-20 19:26:11 +09:00
2017-06-20 20:30:55 +02:00
.image-container.mountable
2016-11-20 19:26:11 +09:00
ProfileImage(viewUser)
2017-06-22 11:21:26 -03:00
2017-06-20 20:30:55 +02:00
.intro-container.mountable
2016-11-20 19:26:11 +09:00
h2#nick= viewUser.Nick
if viewUser.Tagline != ""
p.profile-field.tagline
Icon("comment")
2016-11-20 23:15:14 +09:00
span.tagline-text= viewUser.Tagline
2016-11-20 19:26:11 +09:00
else
p.profile-field.tagline
Icon("comment")
2016-11-20 23:15:14 +09:00
span.tagline-text No tagline yet.
2017-06-22 11:21:26 -03:00
2017-06-13 00:06:35 +02:00
if viewUser.Website != ""
p.profile-field.website
Icon("home")
a(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow")= viewUser.Website
2017-06-22 11:21:26 -03:00
2017-06-08 14:46:38 +02: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"
2017-06-22 11:21:26 -03:00
2016-11-20 19:26:11 +09:00
//- if viewUser.dataEditCount
//- p.profile-field.editor-contribution(title="Anime data modifications")
//- Icon("edit")
//- span= viewUser.dataEditCount
2017-06-22 11:21:26 -03:00
2016-11-20 19:26:11 +09:00
if viewUser.Registered != ""
p.profile-field.registration-date(title="Member since")
Icon("calendar")
//- span= time.Parse(time.RFC3339, viewUser.Registered)
2017-06-06 16:59:04 +02:00
span= viewUser.RegisteredTime().Format("Jan 2006")
2016-11-20 19:26:11 +09:00
//- span= monthNames[joined.getMonth()] + ' ' + joined.getFullYear()
2017-06-22 11:21:26 -03:00
2016-11-20 19:26:11 +09:00
if viewUser.Role != ""
p.profile-field.role
Icon("rocket")
span= arn.Capitalize(viewUser.Role)
2017-06-22 11:21:26 -03:00
component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread, posts []*arn.Post)
2017-06-20 13:02:20 +02:00
ProfileHeader(viewUser, user)
2017-06-22 11:21:26 -03:00
2017-06-20 20:13:04 +02:00
.profile-category.mountable
2017-06-19 22:16:01 +02:00
h3
a.ajax(href="/+" + viewUser.Nick + "/animelist", title="View all anime") Anime
2017-06-08 21:54:39 +02:00
2017-06-19 22:16:01 +02:00
.profile-watching-list
2017-06-08 22:02:39 +02:00
if len(animeList.Items) == 0
p No anime in the collection.
else
each item in animeList.Items
2017-06-20 11:13:56 +02:00
a.profile-watching-list-item.ajax(href=item.Anime().Link(), title=item.Anime().Title.Canonical + " (" + toString(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
2017-06-24 17:38:10 +02:00
img.anime-cover-image.profile-watching-list-item-image.lazy(data-src=item.Anime().Image.Tiny, alt=item.Anime().Title.Canonical)
2017-06-08 21:54:39 +02:00
2017-06-20 20:13:04 +02:00
.profile-category.mountable
2017-06-19 22:16:01 +02:00
h3
a.ajax(href="/+" + viewUser.Nick + "/threads", title="View all threads") Threads
2017-06-22 11:21:26 -03:00
2017-06-19 22:16:01 +02:00
if len(threads) == 0
p No threads on the forum.
2017-06-08 22:02:39 +02:00
else
each thread in threads
ThreadLink(thread)
2017-06-22 14:38:01 -03:00
.profile-category.mountable
2017-06-22 11:21:26 -03:00
h3
2017-06-22 12:03:43 -03:00
a.ajax(href="/+" + viewUser.Nick + "/posts", title="View all posts") Posts
2017-06-22 11:21:26 -03:00
if len(posts) == 0
p No posts on the forum.
else
each post in posts
.post
.post-author
Avatar(post.Author())
.post-content
2017-06-26 15:17:53 +02:00
div!= post.HTML()
2017-06-22 11:21:26 -03:00
.post-toolbar.active
.spacer
.post-likes= len(post.Likes)
2017-06-23 16:41:24 +02:00
2017-06-24 18:15:39 +02:00
//- if user != nil && user.Role == "admin"
//- .footer
//- a(href="/api/user/" + viewUser.ID) User API