52 lines
1.8 KiB
Plaintext
Raw Normal View History

2018-03-01 23:17:27 +00:00
component CompanyPage(company *arn.Company, studioAnime, producedAnime, licensedAnime []*arn.Anime, 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-01 23:17:27 +00:00
CompanyAnime("Animated:", studioAnime, user)
CompanyAnime("Produced:", producedAnime, user)
CompanyAnime("Licensed:", licensedAnime, user)
2017-11-29 14:36:44 +00:00
.company-sidebar
if company.Location.Latitude != 0 && company.Location.Longitude != 0
2017-11-30 00:16:45 +00:00
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")
2017-11-27 20:19:17 +00:00
2017-11-29 14:36:44 +00:00
if len(company.Links) > 0
2017-11-30 00:16:45 +00:00
h3.mountable Links
ul.mountable
2017-11-29 14:36:44 +00:00
each link in company.Links
li
a(href=link.URL, target="_blank", rel="noopener")= link.Title
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
component CompanyAnime(label string, animes []*arn.Anime, user *arn.User)
if len(animes) > 0
h3.mountable= label
.company-anime.mountable
each anime in animes
a.company-anime-item.ajax(href=anime.Link(), title=anime.Title.ByUser(user))
img.company-anime-item-image.lazy(data-src=anime.Image("small"), data-webp="true", alt=anime.Title.ByUser(user))
2017-11-18 23:34:03 +00:00
component CompanyTabs(company *arn.Company, user *arn.User)
.tabs
Tab("Company", "building", company.Link())
Tab("Edit", "pencil", company.Link() + "/edit")
Tab("History", "history", company.Link() + "/history")