From 436c8c05aa4af269a233fbd39208973051677f66 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Tue, 13 Mar 2018 23:07:30 -0700 Subject: [PATCH] implement lazy images --- routes/_components/LazyImage.html | 47 +++++++++++++++++++++++ routes/_components/NonAutoplayGifv.html | 26 ++++++------- routes/_components/status/Media.html | 50 +++++++++++++------------ 3 files changed, 86 insertions(+), 37 deletions(-) create mode 100644 routes/_components/LazyImage.html diff --git a/routes/_components/LazyImage.html b/routes/_components/LazyImage.html new file mode 100644 index 0000000..3cb3149 --- /dev/null +++ b/routes/_components/LazyImage.html @@ -0,0 +1,47 @@ +
+ {{#if displaySrc}} + {{alt || ''}} + {{/if}} +
+ + \ No newline at end of file diff --git a/routes/_components/NonAutoplayGifv.html b/routes/_components/NonAutoplayGifv.html index dd48e57..e3b10f7 100644 --- a/routes/_components/NonAutoplayGifv.html +++ b/routes/_components/NonAutoplayGifv.html @@ -17,14 +17,15 @@ playsinline /> {{else}} - {{label}} + {{/if}} @@ -39,9 +40,9 @@ \ No newline at end of file diff --git a/routes/_components/status/Media.html b/routes/_components/status/Media.html index 6be8094..027e334 100644 --- a/routes/_components/status/Media.html +++ b/routes/_components/status/Media.html @@ -6,13 +6,14 @@ style="width: {{inlineWidth}}px; height: {{inlineHeight}}px;" > - {{media.description || ''}} {{else}} @@ -48,25 +49,23 @@ playing="{{mouseover}}" /> {{else}} - {{media.description || ''}} {{/if}} {{/if}} \ No newline at end of file