Improved accessibility

This commit is contained in:
Eduard Urbach 2018-11-21 15:43:32 +09:00
parent 2dc0d9e7c0
commit fecc09eee2
4 changed files with 10 additions and 9 deletions

View File

@ -50,4 +50,4 @@ component SoundTrackMiniFooter(track *arn.SoundTrack, user *arn.User)
a(href=track.Link())= track.Title.ByUser(user) a(href=track.Link())= track.Title.ByUser(user)
component ExternalMedia(media *arn.ExternalMedia) component ExternalMedia(media *arn.ExternalMedia)
iframe.lazy(data-src=media.EmbedLink(), allowfullscreen) iframe.lazy(data-src=media.EmbedLink(), title=media.Service + " media", allowfullscreen)

View File

@ -7,7 +7,7 @@ component Anime(anime *arn.Anime, listItem *arn.AnimeListItem, tracks []*arn.Sou
component AnimeMainColumn(anime *arn.Anime, listItem *arn.AnimeListItem, tracks []*arn.SoundTrack, amvs []*arn.AMV, amvAppearances []*arn.AMV, episodes []*arn.AnimeEpisode, episodeToFriends map[int][]*arn.User, user *arn.User) component AnimeMainColumn(anime *arn.Anime, listItem *arn.AnimeListItem, tracks []*arn.SoundTrack, amvs []*arn.AMV, amvAppearances []*arn.AMV, episodes []*arn.AnimeEpisode, episodeToFriends map[int][]*arn.User, user *arn.User)
.anime-header(data-id=anime.ID) .anime-header(data-id=anime.ID)
a.anime-image-container.mountable(href=anime.ImageLink("original"), target="_blank", data-mountable-type="header") a.anime-image-container.mountable(href=anime.ImageLink("original"), target="_blank", rel="noopener", data-mountable-type="header")
img.anime-cover-image.lazy(data-src=anime.ImageLink("large"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user)) img.anime-cover-image.lazy(data-src=anime.ImageLink("large"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
.space .space
@ -33,7 +33,7 @@ component AnimeMainColumn(anime *arn.Anime, listItem *arn.AnimeListItem, tracks
AnimeComments(anime, user, false) AnimeComments(anime, user, false)
component AnimeSideColumn(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem, user *arn.User) component AnimeSideColumn(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem, user *arn.User)
AnimeTrailer(anime) AnimeTrailer(anime, user)
AnimeInformation(anime) AnimeInformation(anime)
AnimeRatings(anime, user) AnimeRatings(anime, user)
AnimePopularity(anime) AnimePopularity(anime)
@ -150,15 +150,15 @@ component AnimeGenres(anime *arn.Anime)
a.anime-genre.mountable(href="/genre/" + strings.ToLower(genre), data-mountable-type="header") a.anime-genre.mountable(href="/genre/" + strings.ToLower(genre), data-mountable-type="header")
span= genre span= genre
component AnimeTrailer(anime *arn.Anime) component AnimeTrailer(anime *arn.Anime, user *arn.User)
if len(anime.Trailers) > 0 && anime.Trailers[len(anime.Trailers) - 1].Service == "Youtube" && anime.Trailers[len(anime.Trailers) - 1].ServiceID != "" if len(anime.Trailers) > 0 && anime.Trailers[len(anime.Trailers) - 1].Service == "Youtube" && anime.Trailers[len(anime.Trailers) - 1].ServiceID != ""
AnimeTrailerByIndex(anime, len(anime.Trailers)-1) AnimeTrailerByIndex(anime, len(anime.Trailers)-1, user)
component AnimeTrailerByIndex(anime *arn.Anime, index int) component AnimeTrailerByIndex(anime *arn.Anime, index int, user *arn.User)
section.anime-section.mountable(data-mountable-type="sidebar") section.anime-section.mountable(data-mountable-type="sidebar")
h3.anime-section-name Trailer h3.anime-section-name Trailer
.anime-trailer.video-container .anime-trailer.video-container
iframe.video(src="https://www.youtube.com/embed/" + anime.Trailers[index].ServiceID + "?showinfo=0", importance="low", allowfullscreen) iframe.video(src="https://www.youtube.com/embed/" + anime.Trailers[index].ServiceID + "?showinfo=0", importance="low", title=anime.Title.ByUser(user) + " trailer", allowfullscreen)
component AnimeFriends(friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem) component AnimeFriends(friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem)
if len(friends) > 0 if len(friends) > 0

View File

@ -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=" + fmt.Sprint(company.Location.Latitude) + "," + fmt.Sprint(company.Location.Longitude) + "&key=AIzaSyAsx6fhqRGaMLTixIJMIZBU4Mg6HJmvQf0", importance="low") 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")
if len(closeCompanies) > 0 if len(closeCompanies) > 0
h3.mountable Within 1 km radius h3.mountable Within 1 km radius

View File

@ -11,8 +11,9 @@ component SoundTrackPage(track *arn.SoundTrack, user *arn.User)
each media in track.Media each media in track.Media
.widget.mountable .widget.mountable
h3.widget-title= media.Service h3.widget-title= media.Service
.soundtrack-media.video-container .soundtrack-media.video-container
iframe.lazy.video(data-src=media.EmbedLink(), allowfullscreen) iframe.lazy.video(data-src=media.EmbedLink(), title=media.Service + " media source", allowfullscreen)
if user != nil && media.Service == "Youtube" && track.File != "" if user != nil && media.Service == "Youtube" && track.File != ""
.buttons .buttons