Improved user profiles
This commit is contained in:
parent
b4d0df2eb7
commit
2649457ed9
@ -48,83 +48,83 @@ component ProfileHead(viewUser *arn.User, user *arn.User, uri string)
|
|||||||
.profile-image-container.mountable.never-unmount
|
.profile-image-container.mountable.never-unmount
|
||||||
ProfileImage(viewUser)
|
ProfileImage(viewUser)
|
||||||
|
|
||||||
.intro-container.mountable.never-unmount
|
.profile-info.mountable.never-unmount
|
||||||
h1#nick= viewUser.Nick
|
h1#nick= viewUser.Nick
|
||||||
|
|
||||||
if viewUser.Tagline != ""
|
//- if viewUser.Tagline != ""
|
||||||
p.profile-field.tagline
|
//- p.profile-field.tagline
|
||||||
Icon("comment")
|
//- Icon("comment")
|
||||||
span.tagline-text= viewUser.Tagline
|
//- span.tagline-text= viewUser.Tagline
|
||||||
else
|
//- else
|
||||||
p.profile-field.tagline
|
//- p.profile-field.tagline
|
||||||
Icon("comment")
|
//- Icon("comment")
|
||||||
span.tagline-text No tagline yet.
|
//- span.tagline-text No tagline yet.
|
||||||
|
|
||||||
if viewUser.Website != ""
|
.profile-introduction!= markdown.Render(viewUser.Introduction)
|
||||||
p.profile-field.website
|
|
||||||
Icon("home")
|
|
||||||
a(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow")= viewUser.WebsiteShortURL()
|
|
||||||
|
|
||||||
//- if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 100
|
.profile-tags-container
|
||||||
//- p.profile-field.osu(title="osu! Level " + fmt.Sprint(int(viewUser.Accounts.Osu.Level)) + " | Accuracy: " + fmt.Sprintf("%.1f", viewUser.Accounts.Osu.Accuracy) + "%")
|
.profile-tags
|
||||||
//- Icon("trophy")
|
a.profile-tag.mountable.never-unmount(href="/+" + viewUser.Nick + "/animelist/watching", data-mountable-type="header")
|
||||||
//- a(href="https://osu.ppy.sh/u/" + viewUser.Accounts.Osu.Nick, target="_blank", rel="noopener")= fmt.Sprint(int(viewUser.Accounts.Osu.PP)) + " pp"
|
Icon("list")
|
||||||
|
span= fmt.Sprintf("%d anime", len(viewUser.AnimeList().Items))
|
||||||
|
|
||||||
//- if viewUser.Accounts.Overwatch.BattleTag != "" && viewUser.Accounts.Overwatch.SkillRating >= 1000
|
if viewUser.Website != ""
|
||||||
//- p.profile-field.overwatch(title=stringutils.Capitalize(viewUser.Accounts.Overwatch.Tier) + " (Overwatch)")
|
a.profile-tag.mountable.never-unmount(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow", aria-label="Website", data-mountable-type="header")
|
||||||
//- Icon("overwatch")
|
Icon("home")
|
||||||
//- a(href="https://playoverwatch.com/en-us/career/pc/" + strings.Replace(viewUser.Accounts.Overwatch.BattleTag, "#", "-", 1), target="_blank", rel="noopener")= fmt.Sprint(viewUser.Accounts.Overwatch.SkillRating) + " SR"
|
span= viewUser.WebsiteShortURL()
|
||||||
|
|
||||||
//- if viewUser.dataEditCount
|
//- if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 100
|
||||||
//- p.profile-field.editor-contribution(title="Anime data modifications")
|
//- a.profile-tag.tip.mountable.never-unmount(href="https://osu.ppy.sh/u/" + viewUser.Accounts.Osu.Nick, aria-label="osu! | Level " + fmt.Sprint(int(viewUser.Accounts.Osu.Level)) + " | Accuracy: " + fmt.Sprintf("%.1f", viewUser.Accounts.Osu.Accuracy) + "%", target="_blank", rel="noopener", data-mountable-type="header")
|
||||||
//- Icon("edit")
|
//- Icon("trophy")
|
||||||
//- span= viewUser.dataEditCount
|
//- span= fmt.Sprint(int(viewUser.Accounts.Osu.PP)) + " pp"
|
||||||
|
|
||||||
if viewUser.Registered != ""
|
//- if viewUser.Accounts.Overwatch.BattleTag != "" && viewUser.Accounts.Overwatch.SkillRating >= 1000
|
||||||
p.profile-field.registration-date(title="Member since")
|
//- a.profile-tag.tip.mountable.never-unmount(href="https://playoverwatch.com/en-us/career/pc/" + strings.Replace(viewUser.Accounts.Overwatch.BattleTag, "#", "-", 1), aria-label=fmt.Sprintf("Overwatch | %s", stringutils.Capitalize(viewUser.Accounts.Overwatch.Tier)), target="_blank", rel="noopener", data-mountable-type="header")
|
||||||
Icon("calendar")
|
//- Icon("overwatch")
|
||||||
//- span= time.Parse(time.RFC3339, viewUser.Registered)
|
//- span= fmt.Sprint(viewUser.Accounts.Overwatch.SkillRating) + " SR"
|
||||||
span= viewUser.RegisteredTime().Format("Jan 2006")
|
|
||||||
//- span= monthNames[joined.getMonth()] + ' ' + joined.getFullYear()
|
|
||||||
|
|
||||||
if viewUser.Role != ""
|
//- if viewUser.Accounts.FinalFantasyXIV.Nick != "" && viewUser.Accounts.FinalFantasyXIV.Class != ""
|
||||||
p.profile-field.role
|
//- .profile-tag.tip.mountable.never-unmount(aria-label=fmt.Sprintf("Final Fantasy XIV | Level %d | IL %d", viewUser.Accounts.FinalFantasyXIV.Level, viewUser.Accounts.FinalFantasyXIV.ItemLevel), data-mountable-type="header")
|
||||||
Icon("rocket")
|
//- Icon("gamepad")
|
||||||
span= stringutils.Capitalize(viewUser.Role)
|
//- span= viewUser.Accounts.FinalFantasyXIV.Class
|
||||||
|
|
||||||
if viewUser.IsPro()
|
if viewUser.Registered != ""
|
||||||
p.profile-field.profile-pro-status
|
.profile-tag.tip.mountable.never-unmount(aria-label="Member since", data-mountable-type="header")
|
||||||
a(href="/shop", title="PRO user")
|
Icon("calendar")
|
||||||
Icon("star")
|
span= viewUser.RegisteredTime().Format("Jan 2006")
|
||||||
span.profile-pro-status-text PRO
|
|
||||||
|
|
||||||
|
if viewUser.IsPro()
|
||||||
|
a.profile-tag.mountable.never-unmount(href="/support", aria-label="Supporter", data-mountable-type="header")
|
||||||
|
Icon("star")
|
||||||
|
span.profile-pro-status-text PRO
|
||||||
|
|
||||||
|
if viewUser.Role != ""
|
||||||
|
a.profile-tag.mountable.never-unmount(href="/users/staff", aria-label="Staff member", data-mountable-type="header")
|
||||||
|
Icon("rocket")
|
||||||
|
span= stringutils.Capitalize(viewUser.Role)
|
||||||
|
|
||||||
|
//- if user != nil && user.ID != viewUser.ID
|
||||||
|
//- a.button.profile-action(href="/compare/animelist/" + user.Nick + "/" + viewUser.Nick)
|
||||||
|
//- Icon("exchange")
|
||||||
|
//- span Compare
|
||||||
|
|
||||||
|
//- a.button.profile-action(href="/+" + viewUser.Nick + "/recommended/anime")
|
||||||
|
//- Icon("archive")
|
||||||
|
//- span Recomms
|
||||||
|
|
||||||
|
//- if user != nil && (user.Role == "editor" || user.Role == "admin")
|
||||||
|
//- a.button.profile-action(href="/+" + viewUser.Nick + "/log")
|
||||||
|
//- Icon("edit")
|
||||||
|
//- span Log
|
||||||
|
|
||||||
.profile-actions
|
.profile-actions
|
||||||
if user != nil && user.ID != viewUser.ID
|
if user != nil && user.ID != viewUser.ID
|
||||||
if !user.Follows().Contains(viewUser.ID)
|
if !user.Follows().Contains(viewUser.ID)
|
||||||
button.profile-action.action(data-action="followUser", data-trigger="click", data-api="/api/userfollows/" + user.ID + "/add/" + viewUser.ID)
|
button.profile-action.action.mountable.never-unmount(data-action="followUser", data-trigger="click", data-api="/api/userfollows/" + user.ID + "/add/" + viewUser.ID)
|
||||||
Icon("user-plus")
|
Icon("user-plus")
|
||||||
span Follow
|
span Follow
|
||||||
else
|
else
|
||||||
button.profile-action.action(data-action="unfollowUser", data-trigger="click", data-api="/api/userfollows/" + user.ID + "/remove/" + viewUser.ID)
|
button.profile-action.action.mountable.never-unmount(data-action="unfollowUser", data-trigger="click", data-api="/api/userfollows/" + user.ID + "/remove/" + viewUser.ID)
|
||||||
Icon("user-times")
|
Icon("user-times")
|
||||||
span Unfollow
|
span Unfollow
|
||||||
|
|
||||||
a.button.profile-action(href="/+" + viewUser.Nick + "/animelist/watching")
|
|
||||||
Icon("list")
|
|
||||||
span Anime list
|
|
||||||
|
|
||||||
if user != nil && user.ID != viewUser.ID
|
|
||||||
a.button.profile-action(href="/compare/animelist/" + user.Nick + "/" + viewUser.Nick)
|
|
||||||
Icon("exchange")
|
|
||||||
span Compare
|
|
||||||
|
|
||||||
a.button.profile-action(href="/+" + viewUser.Nick + "/recommended/anime")
|
|
||||||
Icon("archive")
|
|
||||||
span Recomms
|
|
||||||
|
|
||||||
if user != nil && (user.Role == "editor" || user.Role == "admin")
|
|
||||||
a.button.profile-action(href="/+" + viewUser.Nick + "/log")
|
|
||||||
Icon("edit")
|
|
||||||
span Log
|
|
||||||
|
|
@ -24,13 +24,12 @@ const profile-image-size = 280px
|
|||||||
a
|
a
|
||||||
color white
|
color white
|
||||||
|
|
||||||
.intro-container
|
.profile-info
|
||||||
vertical
|
vertical
|
||||||
align-items center
|
|
||||||
margin-top calc(content-padding * 1.5)
|
margin-top calc(content-padding * 1.5)
|
||||||
|
|
||||||
.profile-actions
|
.profile-actions
|
||||||
vertical
|
horizontal-wrap
|
||||||
margin-top content-padding
|
margin-top content-padding
|
||||||
|
|
||||||
:empty
|
:empty
|
||||||
@ -50,12 +49,12 @@ const profile-image-size = 280px
|
|||||||
> 740px
|
> 740px
|
||||||
.profile
|
.profile
|
||||||
horizontal
|
horizontal
|
||||||
align-items flex-start
|
align-items stretch
|
||||||
|
|
||||||
.profile-field
|
.profile-field
|
||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
.intro-container
|
.profile-info
|
||||||
align-items flex-start
|
align-items flex-start
|
||||||
margin-top 0
|
margin-top 0
|
||||||
padding content-padding
|
padding content-padding
|
||||||
|
37
pages/profile/tags.scarlet
Normal file
37
pages/profile/tags.scarlet
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
.profile-tags-container
|
||||||
|
// ...
|
||||||
|
|
||||||
|
.profile-tags
|
||||||
|
horizontal-wrap
|
||||||
|
justify-content center
|
||||||
|
margin-bottom typography-margin
|
||||||
|
margin-top content-padding
|
||||||
|
|
||||||
|
.profile-tag
|
||||||
|
default-transition
|
||||||
|
padding 0.25rem 0.75rem
|
||||||
|
font-size 85%
|
||||||
|
color hsl(0, 0%, 90%)
|
||||||
|
background rgba(255, 255, 255, 0.1)
|
||||||
|
border-radius ui-element-border-radius
|
||||||
|
margin 0.35rem
|
||||||
|
|
||||||
|
&.mounted
|
||||||
|
opacity 0.8
|
||||||
|
|
||||||
|
:hover
|
||||||
|
color hsl(0, 0%, 90%)
|
||||||
|
opacity 1.0
|
||||||
|
text-shadow none
|
||||||
|
background rgba(255, 255, 255, 0.2)
|
||||||
|
|
||||||
|
> 800px
|
||||||
|
.profile-tags
|
||||||
|
justify-content flex-start
|
||||||
|
margin-bottom 0
|
||||||
|
|
||||||
|
.profile-tags-container
|
||||||
|
vertical
|
||||||
|
flex 1
|
||||||
|
justify-content flex-end
|
||||||
|
align-items flex-end
|
Loading…
Reference in New Issue
Block a user