summaryrefslogtreecommitdiffstats
path: root/templates/index.html
blob: b8f2e6e43b520410998f2e9cd9e59ba0da321ff7 (plain)
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
{% extends "base.html" %}
{% block content %}
  <div class="alert alert-info">
      This is just a test deployment of Warsaw Hackerspace Vending Machine Bitcoin Payments System™.<br />
      <b>Please report any issues to <a href="mailto:informatic@hackerspace.pl" class="alert-link">informatic@hackerspace.pl</a>.</b>
  </div>
  <div class="row">
  {% for item in items %}
  <div class="col-sm-6">
      <div class="well vend-item">
          <div class="row">
              <div class="col-md-12">
                  <div class="pull-right">
                      <span class="label label-info">{{ '%.2fzł'|format(item.value/100) }}</span>
                      <span class="label label-primary">{{ format_btc(from_local_currency(item.value*1.03)) }}</span>
                  </div>
                  <h3>{{ item.name }}</h3>
              </div>
              <div class="col-xs-6">
                  <img src="{{ item.image }}"  class="img-responsive center-block" />
              </div>
              <div class="col-xs-6 text-center">
                  {% with btc_uri = 'bitcoin:%s?amount=%s' % (config['INPUT_ADDRESS'], sat_to_btc(from_local_currency(item.value*1.03))) %}
                  <a href="{{ btc_uri }}">
                      <img src="{{ qrcode(btc_uri) }}" class="img-responsive center-block"/>
                      <code><small>{{ config['INPUT_ADDRESS'] }}</small></code>
                  </a>
                  {% endwith %}
              </div>
          </div>
      </div>
  </div>
  {% endfor %}
  </div>
{% endblock %}