From 1b324ccd614db865550c09bf5a7bc4fe3387a8b6 Mon Sep 17 00:00:00 2001
From: TonyFord <tonyford@strategy-investor.de>
Date: Mon, 3 Feb 2020 11:44:23 +0100
Subject: [PATCH] disable search function add price source info to orders

---
 _data/price-sources/faircoin-xyz.json |  2 +-
 _data/price-sources/freevision.json   |  2 +-
 _includes/menu.html                   |  2 +-
 _includes/overview.html               |  2 +-
 _layouts/selectln.html                | 18 +++---------------
 script/get_prices.py                  |  2 +-
 6 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/_data/price-sources/faircoin-xyz.json b/_data/price-sources/faircoin-xyz.json
index 21f534e..4be1ef6 100644
--- a/_data/price-sources/faircoin-xyz.json
+++ b/_data/price-sources/faircoin-xyz.json
@@ -1 +1 @@
-{"lastupdate": "2020-02-03", "price": {"EUR": 0.15}}
\ No newline at end of file
+{"lastupdate": "2020-02-03", "price": {"EUR": 0.15}, "www": "https://faircoin.xyz/eur2fair/1"}
\ No newline at end of file
diff --git a/_data/price-sources/freevision.json b/_data/price-sources/freevision.json
index 5614708..b9fc4e9 100644
--- a/_data/price-sources/freevision.json
+++ b/_data/price-sources/freevision.json
@@ -1 +1 @@
-{"lastupdate": "2020-02-03", "price": {"EUR": 0.04}}
\ No newline at end of file
+{"lastupdate": "2020-02-03", "price": {"EUR": 0.04}, "www": "https://exchange.faircoin.co/data/freevision_eur.json"}
\ No newline at end of file
diff --git a/_includes/menu.html b/_includes/menu.html
index cdb637a..3e2ecb0 100644
--- a/_includes/menu.html
+++ b/_includes/menu.html
@@ -5,7 +5,7 @@
       <a href="{{ site.baseurl }}/"><span>FairCoin |</span> {{ site.title | map: include.ln }}</a>
     </div>
 
-    <header>
+    <header class="d-none">
 
       <div class="header container align-items-center justify-content-center">
         <div class="header--block size margin container column">
diff --git a/_includes/overview.html b/_includes/overview.html
index c98aa43..0381927 100644
--- a/_includes/overview.html
+++ b/_includes/overview.html
@@ -31,7 +31,7 @@
             <div><small>{{ o.description }}</small></div>
           </div>
 
-          <div class="orderlist-price">{% if o.min-size > 0 %}{{ o.min-size }}..{% endif %}{{ o.max-size }} {{ o.unit }}<br>( {{ o.price-per-unit | decimals }} {{ o.price-currency }} / {{ o.unit }} )<br>( {{ site.data.price-sources[o.price-source].price[o.price-currency] }} {{ o.price-currency }} / FAIR )</div>
+          <div class="orderlist-price">{% if o.min-size > 0 %}{{ o.min-size }}..{% endif %}{{ o.max-size }} {{ o.unit }}<br>( {{ o.price-per-unit | decimals }} {{ o.price-currency }} / {{ o.unit }} )<br>( {% capture price_ex %}{{ site.data.price-sources[o.price-source].price[o.price-currency] }}{% endcapture %}{% if price_ex != "" %}{{ price_ex }}{% else %}{{ o.price-source }}{% endif %} {{ o.price-currency }} / FAIR )<br><i>{% if price_ex != "" %}<a href="{{ site.data.price-sources[o.price-source].www }}">{{ o.price-source }}</a>{% else %}fixed price{% endif %}</i></div>
         </div>
       {% endfor %}
     {% endfor %}
diff --git a/_layouts/selectln.html b/_layouts/selectln.html
index ff924bd..1657457 100644
--- a/_layouts/selectln.html
+++ b/_layouts/selectln.html
@@ -1,19 +1,7 @@
-<!doctype html>
-<html lang="{{ site.lang | default: "en-US" }}">
-  <head>
-    <meta charset="utf-8">
-    <meta http-equiv="X-UA-Compatible" content="IE=edge">
-
-    <link rel="stylesheet" href="{{ '/assets/assets/css/styles.css?v=' | append: site.github.build_revision | relative_url }}">
-    <script src="https://code.jquery.com/jquery-3.3.0.min.js" integrity="sha256-RTQy8VOmNlT6b2PIRur37p6JEBZUE7o8wPgMvu18MC4=" crossorigin="anonymous"></script>
-    <!--[if lt IE 9]>
-      <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" integrity="sha256-3Jy/GbSLrg0o9y5Z5n1uw0qxZECH7C6OQpVBgNFYa0g=" crossorigin="anonymous"></script>
-    <![endif]-->
-    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
-  </head>
-  <body>
+{% include head.html %}
+  <body style="text-align:center;">
     <h1>select language</h1>
-    <ul>
+    <ul style="list-style:none;">
       {% for ln in page.ln %}
       <li><a href="./{{ ln }}">{{ ln }}</a></li>
       {% endfor %}
diff --git a/script/get_prices.py b/script/get_prices.py
index c044555..9646601 100644
--- a/script/get_prices.py
+++ b/script/get_prices.py
@@ -24,7 +24,7 @@ for p in P:
         else:
             price=price[i]
 
-    A={'lastupdate' : Date, 'price' : {}}
+    A={'lastupdate' : Date, 'price' : {}, 'www' : p['www'] }
     A['price'][p['currency']] = eval( p['formula'].replace('$', str(price)) )
     file = open('../_data/price-sources/'+p['file'],'w')
     file.write(json.dumps(A))
-- 
GitLab