Added more tags to user profiles

This commit is contained in:
Eduard Urbach 2018-11-06 19:25:56 +09:00
parent daaa4c609f
commit 025e90439d

View File

@ -58,10 +58,21 @@ component ProfileHead(viewUser *arn.User, user *arn.User, uri string)
Icon("list")
span= fmt.Sprintf("%d anime", len(viewUser.AnimeList().Items))
if viewUser.Website != ""
a.profile-tag.mountable.never-unmount(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow", aria-label="Website", data-mountable-type="header")
Icon("home")
span= viewUser.WebsiteShortURL()
if user != nil && viewUser.Settings().Privacy.ShowAge && viewUser.Settings().Privacy.ShowGender && viewUser.AgeInYears() != 0
.profile-tag.mountable.never-unmount(data-mountable-type="header")
if viewUser.Gender == "male"
Icon("mars")
else if viewUser.Gender == "female"
Icon("venus")
else
Icon("venus-mars")
span= viewUser.AgeInYears()
if user != nil && viewUser.Settings().Privacy.ShowLocation && viewUser.Location.CountryName != ""
.profile-tag.mountable.never-unmount(data-mountable-type="header")
Icon("map-marker")
span= viewUser.Location.CountryName
//- if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 100
//- 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")
@ -99,18 +110,19 @@ component ProfileHead(viewUser *arn.User, user *arn.User, uri string)
span Inactive
//- if user != nil && user.ID != viewUser.ID
//- a.button.profile-action(href="/compare/animelist/" + user.Nick + "/" + viewUser.Nick)
//- Icon("exchange")
//- span Compare
//- a.profile-tag.tip.mountable.never-unmount(href="/compare/animelist/" + user.Nick + "/" + viewUser.Nick, aria-label="Compare", data-mountable-type="header")
//- RawIcon("exchange")
//- a.button.profile-action(href="/+" + viewUser.Nick + "/recommended/anime")
//- Icon("archive")
//- span Recomms
//- a.profile-tag.tip.mountable.never-unmount(href="/+" + viewUser.Nick + "/recommended/anime", aria-label="Recommendations", data-mountable-type="header")
//- RawIcon("archive")
//- if user != nil && (user.Role == "editor" || user.Role == "admin")
//- a.button.profile-action(href="/+" + viewUser.Nick + "/log")
//- Icon("edit")
//- span Log
//- a.profile-tag.tip.mountable.never-unmoun(href="/+" + viewUser.Nick + "/log", aria-label="Log", data-mountable-type="header")
//- RawIcon("edit")
//- if viewUser.Website != ""
//- a.profile-tag.tip.mountable.never-unmount(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow", aria-label=viewUser.WebsiteShortURL(), data-mountable-type="header")
//- RawIcon("globe")
.profile-actions
if user != nil && user.ID != viewUser.ID