Remove toString calls (upgrade to latest pixy version)
This commit is contained in:
parent
a6fea3965c
commit
526a7998bb
@ -24,7 +24,7 @@ component AnimeListScrollable(animeListItems []*arn.AnimeListItem, viewUser *arn
|
|||||||
//- else
|
//- else
|
||||||
if item.Anime().EpisodeByNumber(item.Episodes + 1) != nil
|
if item.Anime().EpisodeByNumber(item.Episodes + 1) != nil
|
||||||
for _, link := range item.Anime().EpisodeByNumber(item.Episodes + 1).Links
|
for _, link := range item.Anime().EpisodeByNumber(item.Episodes + 1).Links
|
||||||
a.tip(href=link, aria-label="Watch episode " + toString(item.Episodes + 1), target="_blank", rel="noopener")
|
a.tip(href=link, aria-label="Watch episode " + fmt.Sprint(item.Episodes + 1), target="_blank", rel="noopener")
|
||||||
RawIcon("eye")
|
RawIcon("eye")
|
||||||
|
|
||||||
.anime-list-item-airing-date
|
.anime-list-item-airing-date
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
|
component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
|
||||||
.post.mountable(id=strings.ToLower(post.Type()) + "-" + toString(post.ID()), data-highlight=post.Creator().ID == highlightAuthorID, data-pro=post.Creator().IsPro(), data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID())
|
.post.mountable(id=strings.ToLower(post.Type()) + "-" + fmt.Sprint(post.ID()), data-highlight=post.Creator().ID == highlightAuthorID, data-pro=post.Creator().IsPro(), data-api="/api/" + strings.ToLower(post.Type()) + "/" + post.ID())
|
||||||
.post-author
|
.post-author
|
||||||
Avatar(post.Creator())
|
Avatar(post.Creator())
|
||||||
|
|
||||||
|
@ -248,4 +248,4 @@ component AnimeInformation(anime *arn.Anime)
|
|||||||
//- a(href=company.Link())= company.Name.English
|
//- a(href=company.Link())= company.Name.English
|
||||||
|
|
||||||
component FriendEntry(friend *arn.User, listItems map[*arn.User]*arn.AnimeListItem)
|
component FriendEntry(friend *arn.User, listItems map[*arn.User]*arn.AnimeListItem)
|
||||||
CustomAvatar(friend, friend.Link(), friend.Nick + " => " + listItems[friend].Status + " | " + toString(listItems[friend].Episodes) + " eps | " + fmt.Sprintf("%.1f", listItems[friend].Rating.Overall) + " rating")
|
CustomAvatar(friend, friend.Link(), friend.Nick + " => " + listItems[friend].Status + " | " + fmt.Sprint(listItems[friend].Episodes) + " eps | " + fmt.Sprintf("%.1f", listItems[friend].Rating.Overall) + " rating")
|
||||||
|
@ -39,7 +39,7 @@ component AnimeEpisodes(anime *arn.Anime, episodes []*arn.AnimeEpisode, user *ar
|
|||||||
//- if user != nil && user.Location.CountryName != "Japan"
|
//- if user != nil && user.Location.CountryName != "Japan"
|
||||||
//- td.episode-actions
|
//- td.episode-actions
|
||||||
//- for name, link := range episode.Links
|
//- for name, link := range episode.Links
|
||||||
//- a(href=link, target="_blank", rel="noopener", title="Watch episode " + toString(episode.Number) + " on " + name)
|
//- a(href=link, target="_blank", rel="noopener", title="Watch episode " + fmt.Sprint(episode.Number) + " on " + name)
|
||||||
//- RawIcon("eye")
|
//- RawIcon("eye")
|
||||||
//- //- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
|
//- //- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
|
||||||
//- //- RawIcon("google")
|
//- //- RawIcon("google")
|
||||||
|
@ -15,7 +15,7 @@ component CompanyPage(company *arn.Company, studioAnime, producedAnime, licensed
|
|||||||
.company-sidebar
|
.company-sidebar
|
||||||
if company.Location.Latitude != 0 && company.Location.Longitude != 0
|
if company.Location.Latitude != 0 && company.Location.Longitude != 0
|
||||||
h3.mountable Location
|
h3.mountable Location
|
||||||
iframe.company-location.mountable(src="https://www.google.com/maps/embed/v1/place?q=" + toString(company.Location.Latitude) + "," + toString(company.Location.Longitude) + "&key=AIzaSyAsx6fhqRGaMLTixIJMIZBU4Mg6HJmvQf0")
|
iframe.company-location.mountable(src="https://www.google.com/maps/embed/v1/place?q=" + fmt.Sprint(company.Location.Latitude) + "," + fmt.Sprint(company.Location.Longitude) + "&key=AIzaSyAsx6fhqRGaMLTixIJMIZBU4Mg6HJmvQf0")
|
||||||
|
|
||||||
if len(closeCompanies) > 0
|
if len(closeCompanies) > 0
|
||||||
h3.mountable Within 1 km radius
|
h3.mountable Within 1 km radius
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Genre(genre string, animes []*arn.Anime, user *arn.User)
|
component Genre(genre string, animes []*arn.Anime, user *arn.User)
|
||||||
h1(title=toString(len(animes)) + " anime")= strings.Title(genre)
|
h1(title=fmt.Sprint(len(animes)) + " anime")= strings.Title(genre)
|
||||||
|
|
||||||
.corner-buttons-hide-on-mobile
|
.corner-buttons-hide-on-mobile
|
||||||
if user != nil
|
if user != nil
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
component ImportAnilist(user *arn.User, matches []*arn.AniListMatch)
|
||||||
h1= "Preview: anilist.co (" + user.Accounts.AniList.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: anilist.co (" + user.Accounts.AniList.Nick + ", " + fmt.Sprint(len(matches)) + " anime)"
|
||||||
|
|
||||||
ImportButton("/import/anilist/animelist/finish")
|
ImportButton("/import/anilist/animelist/finish")
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component ImportKitsu(user *arn.User, matches []*arn.KitsuMatch)
|
component ImportKitsu(user *arn.User, matches []*arn.KitsuMatch)
|
||||||
h1= "Preview: kitsu.io (" + user.Accounts.Kitsu.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: kitsu.io (" + user.Accounts.Kitsu.Nick + ", " + fmt.Sprint(len(matches)) + " anime)"
|
||||||
|
|
||||||
ImportButton("/import/kitsu/animelist/finish")
|
ImportButton("/import/kitsu/animelist/finish")
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component ImportMyAnimeList(user *arn.User, matches []*arn.MyAnimeListMatch)
|
component ImportMyAnimeList(user *arn.User, matches []*arn.MyAnimeListMatch)
|
||||||
h1= "Preview: myanimelist.net (" + user.Accounts.MyAnimeList.Nick + ", " + toString(len(matches)) + " anime)"
|
h1= "Preview: myanimelist.net (" + user.Accounts.MyAnimeList.Nick + ", " + fmt.Sprint(len(matches)) + " anime)"
|
||||||
|
|
||||||
ImportButton("/import/myanimelist/animelist/finish")
|
ImportButton("/import/myanimelist/animelist/finish")
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList,
|
|||||||
.profile-watching-list.mountable
|
.profile-watching-list.mountable
|
||||||
each item in animeList.Items
|
each item in animeList.Items
|
||||||
if item.Status == arn.AnimeListStatusWatching || item.Status == arn.AnimeListStatusCompleted
|
if item.Status == arn.AnimeListStatusWatching || item.Status == arn.AnimeListStatusCompleted
|
||||||
a.profile-watching-list-item.tip(href=item.Anime().Link(), aria-label=item.Anime().Title.ByUser(user) + " (" + toString(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
|
a.profile-watching-list-item.tip(href=item.Anime().Link(), aria-label=item.Anime().Title.ByUser(user) + " (" + fmt.Sprint(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
|
||||||
img.profile-watching-list-item-image.lazy(data-src=item.Anime().ImageLink("small"), data-webp="true", data-color=item.Anime().AverageColor(), alt=item.Anime().Title.ByUser(user))
|
img.profile-watching-list-item-image.lazy(data-src=item.Anime().ImageLink("small"), data-webp="true", data-color=item.Anime().AverageColor(), alt=item.Anime().Title.ByUser(user))
|
||||||
|
|
||||||
.footer
|
.footer
|
||||||
@ -66,14 +66,14 @@ component ProfileHead(viewUser *arn.User, user *arn.User, uri string)
|
|||||||
a(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow")= viewUser.WebsiteShortURL()
|
a(href=viewUser.WebsiteURL(), target="_blank", rel="nofollow")= viewUser.WebsiteShortURL()
|
||||||
|
|
||||||
if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 100
|
if viewUser.Accounts.Osu.Nick != "" && viewUser.Accounts.Osu.PP >= 100
|
||||||
p.profile-field.osu(title="osu! Level " + toString(int(viewUser.Accounts.Osu.Level)) + " | Accuracy: " + fmt.Sprintf("%.1f", viewUser.Accounts.Osu.Accuracy) + "%")
|
p.profile-field.osu(title="osu! Level " + fmt.Sprint(int(viewUser.Accounts.Osu.Level)) + " | Accuracy: " + fmt.Sprintf("%.1f", viewUser.Accounts.Osu.Accuracy) + "%")
|
||||||
Icon("trophy")
|
Icon("trophy")
|
||||||
a(href="https://osu.ppy.sh/u/" + viewUser.Accounts.Osu.Nick, target="_blank", rel="noopener")= toString(int(viewUser.Accounts.Osu.PP)) + " pp"
|
a(href="https://osu.ppy.sh/u/" + viewUser.Accounts.Osu.Nick, target="_blank", rel="noopener")= fmt.Sprint(int(viewUser.Accounts.Osu.PP)) + " pp"
|
||||||
|
|
||||||
if viewUser.Accounts.Overwatch.BattleTag != "" && viewUser.Accounts.Overwatch.SkillRating >= 1000
|
if viewUser.Accounts.Overwatch.BattleTag != "" && viewUser.Accounts.Overwatch.SkillRating >= 1000
|
||||||
p.profile-field.overwatch(title=stringutils.Capitalize(viewUser.Accounts.Overwatch.Tier) + " (Overwatch)")
|
p.profile-field.overwatch(title=stringutils.Capitalize(viewUser.Accounts.Overwatch.Tier) + " (Overwatch)")
|
||||||
Icon("overwatch")
|
Icon("overwatch")
|
||||||
a(href="https://playoverwatch.com/en-us/career/pc/" + strings.Replace(viewUser.Accounts.Overwatch.BattleTag, "#", "-", 1), target="_blank", rel="noopener")= toString(viewUser.Accounts.Overwatch.SkillRating) + " SR"
|
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"
|
||||||
|
|
||||||
//- if viewUser.dataEditCount
|
//- if viewUser.dataEditCount
|
||||||
//- p.profile-field.editor-contribution(title="Anime data modifications")
|
//- p.profile-field.editor-contribution(title="Anime data modifications")
|
||||||
|
@ -31,5 +31,5 @@ component ShopItem(item *arn.ShopItem, popularity int)
|
|||||||
|
|
||||||
.buttons.shop-buttons
|
.buttons.shop-buttons
|
||||||
button.shop-button-buy.action(data-item-id=item.ID, data-item-name=item.Name, data-price=item.Price, data-trigger="click", data-action="buyItem")
|
button.shop-button-buy.action(data-item-id=item.ID, data-item-name=item.Name, data-price=item.Price, data-trigger="click", data-action="buyItem")
|
||||||
span.shop-item-price= "Buy for " + toString(item.Price)
|
span.shop-item-price= "Buy for " + fmt.Sprint(item.Price)
|
||||||
Icon("diamond")
|
Icon("diamond")
|
@ -11,7 +11,7 @@ component EditorRankingList(users []*arn.User, idToScore map[string]int, url str
|
|||||||
tbody
|
tbody
|
||||||
for index, user := range users
|
for index, user := range users
|
||||||
tr.ranking.mountable
|
tr.ranking.mountable
|
||||||
td= toString(index + 1) + "."
|
td= fmt.Sprint(index + 1) + "."
|
||||||
td.ranking-user
|
td.ranking-user
|
||||||
Avatar(user)
|
Avatar(user)
|
||||||
a.ranking-user-nick(href=user.Link())= user.Nick
|
a.ranking-user-nick(href=user.Link())= user.Nick
|
||||||
|
@ -12,10 +12,10 @@ component OsuRankingList(users []*arn.User, url string)
|
|||||||
tbody
|
tbody
|
||||||
for index, user := range users
|
for index, user := range users
|
||||||
tr.ranking.mountable
|
tr.ranking.mountable
|
||||||
td= toString(index + 1) + "."
|
td= fmt.Sprint(index + 1) + "."
|
||||||
td.ranking-user
|
td.ranking-user
|
||||||
Avatar(user)
|
Avatar(user)
|
||||||
a.ranking-user-nick(href=user.Link())= user.Nick
|
a.ranking-user-nick(href=user.Link())= user.Nick
|
||||||
td.ranking-score= toString(int(user.Accounts.Osu.PP + 0.5)) + " pp"
|
td.ranking-score= fmt.Sprint(int(user.Accounts.Osu.PP + 0.5)) + " pp"
|
||||||
td.ranking-accuracy= fmt.Sprintf("%.1f", user.Accounts.Osu.Accuracy) + "%"
|
td.ranking-accuracy= fmt.Sprintf("%.1f", user.Accounts.Osu.Accuracy) + "%"
|
||||||
|
|
@ -12,7 +12,7 @@ component OverwatchRankingList(users []*arn.User, url string)
|
|||||||
tbody
|
tbody
|
||||||
for index, user := range users
|
for index, user := range users
|
||||||
tr.ranking.mountable
|
tr.ranking.mountable
|
||||||
td= toString(index + 1) + "."
|
td= fmt.Sprint(index + 1) + "."
|
||||||
td.ranking-user
|
td.ranking-user
|
||||||
Avatar(user)
|
Avatar(user)
|
||||||
a.ranking-user-nick(href=user.Link())= user.Nick
|
a.ranking-user-nick(href=user.Link())= user.Nick
|
||||||
|
Loading…
Reference in New Issue
Block a user