107 lines
3.9 KiB
Plaintext
Raw Normal View History

2020-10-23 00:28:11 +00:00
component CompanyPage(company *arn.Company, studioAnime, producedAnime, licensedAnime []*arn.Anime, closeCompanies []*arn.Company, distances map[string]float64, rating *arn.AnimeRating, user *arn.User)
2017-11-19 00:15:57 +00:00
CompanyTabs(company, user)
2017-11-29 14:36:44 +00:00
.company-page
.company-header
2017-11-30 00:16:45 +00:00
h1.company-name.mountable= company.Name.English
2017-11-19 00:15:57 +00:00
2017-11-30 00:16:45 +00:00
.company-description.mountable
2017-11-29 14:36:44 +00:00
div!= markdown.Render(company.Description)
2017-11-18 23:34:03 +00:00
2018-03-23 18:04:06 +00:00
CompanyAnimes("Animated:", studioAnime, user)
CompanyAnimes("Produced:", producedAnime, user)
CompanyAnimes("Licensed:", licensedAnime, user)
2017-11-29 14:36:44 +00:00
.company-sidebar
2020-10-23 00:28:11 +00:00
h3.mountable Ratings
2020-10-22 12:33:50 +00:00
2020-10-23 00:28:11 +00:00
table.company-rating-info-table.mountable
2020-10-22 12:33:50 +00:00
tbody
2020-10-23 00:28:11 +00:00
tr.mountable
2020-10-22 12:33:50 +00:00
td.company-rating-info-key Overall:
td.company-rating-info-value
2020-10-23 00:28:11 +00:00
CompanyRating(rating.Overall, rating.Count.Overall, user)
2020-10-22 12:33:50 +00:00
2020-10-23 00:28:11 +00:00
tr.mountable
2020-10-22 12:33:50 +00:00
td.company-rating-info-key Story:
td.company-rating-info-value
2020-10-23 00:28:11 +00:00
CompanyRating(rating.Story, rating.Count.Story, user)
2020-10-22 12:33:50 +00:00
2020-10-23 00:28:11 +00:00
tr.mountable
2020-10-22 12:33:50 +00:00
td.company-rating-info-key Visuals:
td.company-rating-info-value
2020-10-23 00:28:11 +00:00
CompanyRating(rating.Visuals, rating.Count.Visuals, user)
2020-10-22 12:33:50 +00:00
2020-10-23 00:28:11 +00:00
tr.mountable
2020-10-22 12:33:50 +00:00
td.company-rating-info-key Soundtrack:
td.company-rating-info-value
2020-10-23 00:28:11 +00:00
CompanyRating(rating.Soundtrack, rating.Count.Soundtrack, user)
2020-10-22 12:33:50 +00:00
2017-11-29 14:36:44 +00:00
if company.Location.Latitude != 0 && company.Location.Longitude != 0
2017-11-30 00:16:45 +00:00
h3.mountable Location
2018-11-21 06:43:32 +00:00
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", importance="low", title=company.Name.English + " location map")
2017-11-29 14:36:44 +00:00
2018-04-08 07:31:31 +00:00
if len(closeCompanies) > 0
h3.mountable Within 1 km radius
ul.mountable
each closeCompany in closeCompanies
li.mountable(data-mountable-type="close-company")
a(href=closeCompany.Link())= closeCompany.Name.English
2018-04-08 07:41:40 +00:00
span.company-distance= fmt.Sprintf(" - %.0f m", distances[closeCompany.ID] * 1000)
2018-04-08 07:31:31 +00:00
h3.mountable Links
.light-button-group.mountable
each link in company.Links
a.light-button.mountable(href=link.URL, target="_blank", data-mountable-type="company-link")
if strings.ToLower(link.Title) == "wikipedia"
Icon("wikipedia-w")
else
Icon("external-link")
span= link.Title
2018-04-24 22:45:50 +00:00
if company.Email != ""
a.light-button.mountable(href="mailto:" + company.Email, data-mountable-type="company-link")
Icon("envelope")
span Email
a.light-button.mountable(href="/api" + company.Link(), target="_blank", data-mountable-type="company-link")
Icon("code")
span API
2017-11-29 14:39:39 +00:00
//- if len(company.Name.Synonyms) > 0
//- h3 Synonyms
//- ul
//- each synonym in company.Name.Synonyms
//- li= synonym
//- if len(company.Tags) > 0
//- h3 Tags
//- ul
//- each tag in company.Tags
//- li= tag
2018-03-01 23:17:27 +00:00
2018-03-23 18:04:06 +00:00
component CompanyAnimes(label string, animes []*arn.Anime, user *arn.User)
2018-03-01 23:17:27 +00:00
if len(animes) > 0
2018-03-23 18:04:06 +00:00
if label != ""
h3.mountable= label
2018-03-01 23:17:27 +00:00
.company-anime.mountable
each anime in animes
2018-03-23 18:04:06 +00:00
CompanyAnime(anime, user)
component CompanyAnime(anime *arn.Anime, user *arn.User)
2018-04-18 11:09:13 +00:00
a.company-anime-item.tip(href=anime.Link(), aria-label=anime.Title.ByUser(user))
img.company-anime-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
component CompanyAnimeNoTip(anime *arn.Anime, user *arn.User)
a.company-anime-item(href=anime.Link(), title=anime.Title.ByUser(user))
2018-03-23 18:04:06 +00:00
img.company-anime-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
2018-03-01 23:17:27 +00:00
2017-11-18 23:34:03 +00:00
component CompanyTabs(company *arn.Company, user *arn.User)
.tabs
Tab("Company", "building", company.Link())
if user != nil
Tab("Edit", "pencil", company.Link() + "/edit")
Tab("History", "history", company.Link() + "/history")