From 8d07099cea51c13a665a96cb4bc3510dd1234332 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 3 Oct 2017 04:59:39 +0200 Subject: [PATCH] HTML5 valid --- mixins/Sidebar.pixy | 2 +- utils/EmptyImage.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 utils/EmptyImage.go diff --git a/mixins/Sidebar.pixy b/mixins/Sidebar.pixy index b6b66e8e..390e300c 100644 --- a/mixins/Sidebar.pixy +++ b/mixins/Sidebar.pixy @@ -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") diff --git a/utils/EmptyImage.go b/utils/EmptyImage.go new file mode 100644 index 00000000..f7c3edf7 --- /dev/null +++ b/utils/EmptyImage.go @@ -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==" +}