~franz/f-a.nz

ref: 2273a056e09ae215a543376f48f8ec63b05bc866 f-a.nz/_includes/footer.html -rw-r--r-- 10.8 KiB
2273a056 — Franz Geffke updates, fixes, changes 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
{% if page.url contains "/client/" or page.url contains "/work/" or page.url contains "/portfolio/" %}
<div class="footer hidden-print">
    <div class="call-out-contact">
      <div class="container">
        <div class="row">
          <div class="col-sm-12">
            <p><a href="/contact/?internal_referral">Have a project you'd like to discuss with me?</a></p>
          </div>
        </div>
      </div>
    </div>
</div>
{% endif %}

<script src="/assets/js/nprogress.min.js"></script>
<script>
NProgress.start();
</script>
<script src="/assets/js/main.min.js"></script>
<script type="text/javascript">
  var _paq = _paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://stats.dkkma.com/";
    _paq.push(['setTrackerUrl', u+'piwik.php']);
    _paq.push(['setSiteId', '8']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="https://stats.dkkma.com/piwik.php?idsite=8&rec=1" style="border:0;" alt="" /></p></noscript>
<script>
  NProgress.set(0.2);
</script>
<script src="/assets/js/bundle.min.js" async></script>
<script>
  NProgress.set(0.4);
</script>
<script>
  var slideout = new Slideout({
    'panel': document.getElementById('panel'),
    'menu': document.getElementById('menu'),
    'padding': 256,
    'tolerance': 70
  });
  document.querySelector('.toggle-button').addEventListener('click', function() {
    slideout.toggle();
  });
</script>
<script>
$(window).load(function () {
  exLink.init({
    protocols: ['http', 'https'],
    filetypes: ['pdf', 'xls', 'docx', 'doc', 'ppt', 'pptx'],
    noFollow: true,
    linkWarning: false,
    gaTrackLabel: 'External Links'
  });
});
</script>
{% if page.url contains "/client/" %}
<script async src="/assets/js/mapbox-gl.min.js"></script>
<script>
$(window).load(function () {
  mapboxgl.accessToken = "pk.eyJ1IjoiZGtrbWEiLCJhIjoiU05aOVdrRSJ9._Ahj-qQ5cCyLUCM2dp4tAw";
  var map = new mapboxgl.Map({
      container: 'map',
      style: 'mapbox://styles/mapbox/dark-v9',
      center: [{{ page.map }}],
      zoom: 6
  });
});
</script>
{% elsif page.url contains "/work/" %}
<script type="text/javascript">
$(window).load(function () {
  ;( function( $ ) {
    $( '.swipebox' ).swipebox();
  } )( jQuery );
});
</script>
{% elsif page.url contains "/gist/" %}
<script type="text/javascript">
$(window).load(function () {
  ;( function( $ ) {
    $( '.swipebox' ).swipebox();
  } )( jQuery );
});
</script>
{% elsif page.url contains "/contact/" %}
<script>
$(window).load(function () {
  (function()
  {
    var NowMoment = moment.utc().add({{ page.offset }}, 'hours').format('LT');
    var eDisplayMoment = document.getElementById('time');
    eDisplayMoment.innerHTML = NowMoment;
  })();
});
</script>
<script>
$(window).load(function () {
  $.simpleWeather({
    location: '{{ page.location }}',
    unit: 'c',
    success: function(weather) {
      html = ', '+weather.text+' and '+weather.temp+'&deg;'+weather.units.temp+' outside.';
      $("#weather").html(html);
    },
    error: function(error) {}
  });
});
</script>
<script async src="/assets/js/mapbox-gl.min.js"></script>
<script>
$(window).load(function () {
  mapboxgl.accessToken = "pk.eyJ1IjoiZGtrbWEiLCJhIjoiU05aOVdrRSJ9._Ahj-qQ5cCyLUCM2dp4tAw";
  var map = new mapboxgl.Map({
      container: 'map',
      style: 'mapbox://styles/mapbox/dark-v9',
      center: [{{ page.map }}],
      zoom: 1
  });
});
</script>
{% endif %}
<script>
  NProgress.set(0.6);
</script>
<script type="text/javascript">
  var url = window.location.href;
  var msg = document.getElementById('welcome_referral');
  if( url.search( 'client_referral' ) > 0 ) {
      msg.style.display = "block";
  }
  {% if page.url contains "/contact/" %}
  var msg = document.getElementById('internal_referral');
  if( url.search( 'internal_referral' ) > 0 ) {
      msg.style.display = "block";
  }
  var msg = document.getElementById('introduction');
  if( url.search( 'internal_referral' ) > 0 ) {
      msg.style.display = "none";
  }
  {% endif %}
</script>
{% if page.url == "/about/" %}
<script src='/assets/js/mapbox.min.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v3.1.0/mapbox.css' rel='stylesheet' />
<style>
  .navbar.navbar-default, .quick-contact, .innovative-product-award.loaded {
    z-index: 1000;
  }
  #map {
    height:360px;
    width:100%;
  }
</style>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoiZGtrbWEiLCJhIjoiY2oyN2h2M2VnMDA1bTJxbzY4dGhhc2V4NCJ9.Hb-yaLByaOY9LR7SF7JxmA';
var map = L.mapbox.map('map')
    .setView([27.2741606,3.2739257], 2);
    var myLayer = L.mapbox.featureLayer().addTo(map);
    var styleLayer = L.mapbox.styleLayer('mapbox://styles/dkkma/cj27hvld100112smweocii6o3').addTo(map);

    // The GeoJSON representing the two point features
    var geojson = {
        type: 'FeatureCollection',
        features: [{% for place in site.data.places %}{
            type: 'Feature',
            properties: {
                title: 'Life in {{ place.city }}, {{ place.country }} in {{ place.year }}',
                'marker-color': '#451668',
                'marker-size': 'small',
                'marker-symbol': 'building',
                'description': '{{ place.introduction }}'
            },
            geometry: {
                type: 'Point',
                coordinates: [{{ place.longitude }}, {{ place.latitude }}]
            }
        },
        {% endfor %}
        {% for client in site.clients %}{
            type: 'Feature',
            properties: {
                title: 'Client in {{ client.city }}, {{ client.country }}',
                'marker-color': '#451668',
                'marker-size': 'small',
                'marker-symbol': 'suitcase',
                'description': '{{ client.introduction }}'
            },
            geometry: {
                type: 'Point',
                coordinates: [{{ client.map }}]
            }
        }{% if forloop.last %}{% else %},{% endif %}
        {% endfor %}
      ]
    };

    map.scrollWheelZoom.disable();
    myLayer.setGeoJSON(geojson);
    //myLayer.on('click', function(e) {
    //    window.open(e.layer.feature.properties.url);
    //});
</script>
{% endif %}
<script>
  NProgress.set(0.8);
</script>
{% if page.url contains "/mutual-investment-fund/" %}
<script src='/assets/js/chart.bundle.min.js'></script>
<script>
var ctx = document.getElementById("myChart");
var myLineChart = Chart.Line(ctx, {
  data: {
    labels: [{% for entry in site.data.mutual-investment-fund %}"{{ entry.date }}"{% if forloop.last %}{% else %},{% endif %}{% endfor %}],
    datasets: [
      {
        label: 'Net asset value (NAV) in Euro',
        fill: true,
        lineTension: 0,
        backgroundColor: "#451668",
        borderColor: "#451668",
        borderCapStyle: 'butt',
        borderDash: [],
        borderDashOffset: 0.0,
        borderJoinStyle: 'miter',
        pointBorderColor: "#451668",
        pointBackgroundColor: "#fff",
        pointBorderWidth: 2,
        pointHoverRadius: 5,
        pointHoverBackgroundColor: "#fff",
        pointHoverBorderColor: "#451668",
        pointHoverBorderWidth: 3,
        pointRadius: 5,
        pointHitRadius: 10,
        data: [{% for entry in site.data.mutual-investment-fund %}{{ entry.rate }}{% if forloop.last %}{% else %},{% endif %}{% endfor %}],
        spanGaps: false,
      }
    ]
  }
});
</script>
{% endif %}
{% if page.url contains "/gist/" or page.url contains "/dev/" or page.url contains "/cryptocurrencies/" %}
<!-- <script src="/assets/js/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script> -->
<script>
  NProgress.set(0.9);
</script>
<script src="https://franz-comments.herokuapp.com/static/embed.js" async onload="
  Coral.Talk.render(document.getElementById('coral_talk_stream'), {
    talk: 'https://franz-comments.herokuapp.com/'
  });
"></script>
<!--
<script>
$("#comments-toggle").on("click" ,function(){
    setTimeout(function(){
      document.querySelector('#comment').scrollIntoView({
      behavior: 'smooth'
    });
  }, 1);
});
</script>
-->
{% endif %}
{% if page.url contains "/pay" %}
<script src="/assets/js/pay.min.js"></script>
<script src="https://checkout.stripe.com/checkout.js"></script>
<script>
var getQueryString = function ( field, url ) {
	var href = url ? url : window.location.href;
	var reg = new RegExp( '[?&]' + field + '=([^&#]*)', 'i' );
	var string = reg.exec(href);
	return string ? string[1] : null;
};

// /pay/?n=Mike&e=mike@me.com&a=10000&i=FA-123

var app = new Vue({
  delimiters:['<%', '%>'],
  el: '#app',
  data: {
    name: getQueryString('n'),
    amount: getQueryString('a') / 10,
    invoice: getQueryString('i'),
    xrpeur: null,
    amountXRP: null,
    etheur: null,
    amountETH: null,
    collapsedXRP: false,
    collapsedETH: false
  },
  created() {
    var self = this;
    axios.get('https://cache.f-a.nz/cryptowat/markets/kraken/xrpeur/price')
    .then(function (res) {
      console.log(res.data.result.price)
      res = res.data.result.price
      self.amountXRP = (getQueryString('a') / 10) / res
      console.log(self.amountXRP)
      self.xrpeur = res
    });
    axios.get('https://cache.f-a.nz/cryptowat/markets/kraken/etheur/price')
    .then(function (res) {
      console.log(res.data.result.price)
      res = res.data.result.price
      self.amountETH = (getQueryString('a') / 10) / res
      console.log(self.amountETH)
      self.etheur = res
      if (self.etheur > 0) {
        document.getElementById('loading').classList.add('hidden');
      }
    });
  },
  filters: {
    formatCrypto: function (value) {
      if (!value) return ''
      value = accounting.formatMoney(value, '', 4)
      return value
    },
    formatFiat: function (value) {
      if (!value) return ''
      value = accounting.formatMoney(value, '', 2)
      return value
    }
  }
})
</script>

<script>
var handler = StripeCheckout.configure({
  key: 'pk_test_6pRNASCoBOKtIshFeQd4XMUh',
  // pk_live_aS8I0BNMivxfYiI5UZtzd8vt
  image: 'https://stripe.com/img/documentation/checkout/marketplace.png',
  locale: 'auto',
  token: function(token) {
    // You can access the token ID with `token.id`.
    // Get the token ID to your server-side code for use.
  }
});

document.getElementById('customButton').addEventListener('click', function(e) {
  // Open Checkout with further options:
  handler.open({
    name: 'F-A.NZ',
    email: getQueryString('e'),
    description: 'Invoice ' + getQueryString('i'),
    zipCode: true,
    currency: 'EUR',
    amount: getQueryString('a')
  });
  e.preventDefault();
});

// Close Checkout on page navigation:
window.addEventListener('popstate', function() {
  handler.close();
});
</script>
{% endif %}

{% if page.url == "/" %}
<script src="/assets/js/particles.min.js"></script>
{% endif %}

<script>
  $(window).on("load", function() {
    NProgress.done();
  });
</script>