From 605d972e911a4bb3d8fa42f0608f8bbe3b5f4b63 Mon Sep 17 00:00:00 2001
From: TonyFord <tonyford@strategy-investor.de>
Date: Fri, 12 Jun 2020 09:10:08 +0200
Subject: [PATCH] qr code improvements

---
 _includes/overview.html | 32 ++++----------------------------
 _plugins/array.rb       |  6 +++++-
 css/main.scss           | 24 ++++++++++++++++++++++++
 3 files changed, 33 insertions(+), 29 deletions(-)

diff --git a/_includes/overview.html b/_includes/overview.html
index cf6282e..ad0d5a9 100644
--- a/_includes/overview.html
+++ b/_includes/overview.html
@@ -69,8 +69,8 @@
             {% capture price %}{% if price_ex != "" %}{{price_ex}}{% else %}{{ o.price-source }}{% endif %}{% endcapture %}
             <div class="orderlist-price"><font class="faircoin-price">{{ o.price-per-unit | divided_by: price | round:1 | decimals }} FAIR</font><br>{% if min-size > 0 %}{{ min-size }}..{% endif %}{{ max-size }} {{ o.unit }}{% if site.data.price-sources[priceref] %}<br>( {{ o.price-per-unit | decimals }} {{ site.data.price-sources[priceref].currency }} / {{ o.unit }} )<br>( {{ price }} {{ site.data.price-sources[priceref].currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source | replace: '-','/' }}</a>{% else %}fixed price{% endif %}</i>{% else %}<br><br><br>{% endif %}
 
-            <div class="qrcode d-none">
-              <div onclick="$(this).parent().toggleClass('d-none')" id="qrcode_{{ peer[0] }}_{{ hid }}" data-price="{{ o.price-per-unit | divided_by: price | round:1 | decimals }}" class=""></div>
+            <div class="qrcode invisble">
+              <div onclick="$(this).parent().toggleClass('invisble')" id="qrcode_{{ peer[0] }}_{{ hid }}" data-price="{{ o.price-per-unit | divided_by: price | round:1 | decimals }}" class=""></div>
             </div>
             </div>
           </div>
@@ -83,30 +83,6 @@
 
 </div>
 
-<style>
-.qrcode {
-  position: relative;
-  width: 0px;
-  height: 0px;
-  right: 200px;
-  top: -85px;
-  z-index: 200;
-}
-
-.qrcode > div {
-  z-index: 201;
-  height: 150px;
-  width: 150px;
-  background: white;
-  border: 20px solid white;
-}
-
-.qrcode.d-none {
-  z-index: 0;
-}
-
-</style>
-
 <script>
 
 function createQRCode(qrcode){
@@ -126,8 +102,8 @@ function createQRCode(qrcode){
     window[qrcode].makeCode(url); // make another code.
   }
 
-  $('.qrcode').toggleClass('d-none',true);
-  $('#'+qrcode).parent().toggleClass('d-none');
+  $('.qrcode').toggleClass('invisble',true);
+  $('#'+qrcode).parent().toggleClass('invisble');
 
 }
 
diff --git a/_plugins/array.rb b/_plugins/array.rb
index da4f1db..2786b8e 100644
--- a/_plugins/array.rb
+++ b/_plugins/array.rb
@@ -20,7 +20,11 @@ module Arrays
   def objectsize(input)
     c=0
     for a in input
-      c+=a[1].length
+      for aa in a[1]
+        if aa['test'] != true
+          c+=1
+        end
+      end
     end
     c
   end
diff --git a/css/main.scss b/css/main.scss
index caf884b..6ba5d37 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -443,3 +443,27 @@ bid {
 .user-address {
   cursor: pointer;
 }
+
+.qrcode {
+  position: relative;
+  width: 0px;
+  height: 0px;
+  right: 200px;
+  top: -85px;
+  z-index: 200;
+  opacity: 1;
+  transition: opacity 0.4s 0s ease-out;
+}
+
+.qrcode > div {
+  z-index: 201;
+  height: 150px;
+  width: 150px;
+  background: white;
+  border: 20px solid white;
+}
+
+.qrcode.invisble {
+  z-index: 0;
+  opacity: 0;
+}
-- 
GitLab