From 1c99dc66b66f38f2b7d26d79db3824728edaf531 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 11 Mar 2015 16:30:31 -0700 Subject: [PATCH] Website: Load hover preview as needed with JS. --- template.jst | 38 ++++++++++++++++++++++++-------------- web.css | 2 +- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/template.jst b/template.jst index 8c587593a..39b594507 100644 --- a/template.jst +++ b/template.jst @@ -16,21 +16,31 @@ screenshot -preview -<%= - content - .match(/<\/h1>([^]*)

.*?<\/a>)/g, '$1preview') -%> +<%= content.match(/<\/h1>([^]*)

diff --git a/web.css b/web.css index 8af3b827c..2a0a3da07 100644 --- a/web.css +++ b/web.css @@ -45,7 +45,7 @@ a.screenshot > img { span.hover { display: none; } -a:hover + span.hover { +a:hover > span.hover { display: block; position: fixed; top: 0;