From 7198608a16698d06c753df8d4ca82a4fb10ddcd1 Mon Sep 17 00:00:00 2001 From: mattbk Date: Mon, 2 Nov 2015 11:37:20 -0600 Subject: [PATCH 1/2] Fix image css Closes https://github.com/mattbk/changeblindness/issues/21. --- css/style.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/css/style.css b/css/style.css index f65eb16..728221e 100644 --- a/css/style.css +++ b/css/style.css @@ -3,9 +3,10 @@ body { } #rotator { - background: #dddddd; - width: 960px; - height: 627px; + //background: #dddddd; + background: #ffffff; + // 90vh is 90% of viewer height: http://stackoverflow.com/a/16837667/2152245 + height:90vh;; overflow: hidden; cursor: pointer; } -- 2.39.5 From a1245ef13ab24f833c58a12559d1605c19a8589d Mon Sep 17 00:00:00 2001 From: mattbk Date: Mon, 2 Nov 2015 11:44:07 -0600 Subject: [PATCH 2/2] Calculate total phases and display --- index.php | 5 +++-- views/change.html.twig | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index b2e81e0..3b70036 100755 --- a/index.php +++ b/index.php @@ -66,9 +66,10 @@ switch ($mode) { break; case 'phase': $template = 'change.html.twig'; - $variables['imageWithElement'] = 'img/'.$phase.'-with.png'; - $variables['imageWithoutElement'] = 'img/'.$phase.'-without.png'; + $variables['imageWithElement'] = 'img/'.$phase.'-with.jpg'; + $variables['imageWithoutElement'] = 'img/'.$phase.'-without.jpg'; $variables['step_count'] = $index; + $variables['step_total'] = count($settings->phases); // Store the participant ID with some simple validation to prevent SQL injection if (isset($_POST['participantid'])) { $_SESSION['participantid'] = preg_replace('/[^A-Za-z0-9\. -]/', '', $_POST['participantid']); diff --git a/views/change.html.twig b/views/change.html.twig index c9e29ac..d63b4d9 100644 --- a/views/change.html.twig +++ b/views/change.html.twig @@ -2,7 +2,7 @@ {% block content %}

Please wait while the images are loaded.

-- 2.39.5