HTML5 valid

This commit is contained in:
Eduard Urbach 2017-10-03 04:59:39 +02:00
parent 3ae0e51110
commit 8d07099cea
2 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,7 @@ component Sidebar(user *arn.User)
if user != nil
Avatar(user)
else
img.user-image.lazy(data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
if user != nil
SidebarButton("Home", "/animelist/watching", "home")

6
utils/EmptyImage.go Normal file
View File

@ -0,0 +1,6 @@
package utils
// EmptyImage returns the smallest possible 1x1 pixel image encoded in Base64.
func EmptyImage() string {
return "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
}