summaryrefslogtreecommitdiffstats
path: root/templates/index.html
blob: b6e88c16c6a90c3cd84c1b5a6a36ccbb7e4e140d (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
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
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>bitvend - The Bitcoin Vending Machine</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="/static/css/bootstrap.css" media="screen">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../bower_components/html5shiv/dist/html5shiv.js"></script>
      <script src="../bower_components/respond/dest/respond.min.js"></script>
    <![endif]-->

    <style>
        body {
            margin-top: 80px;
        }
        h3 {
            margin: 0;
            padding: 0;
                padding-bottom: 0.5em;
        }
        footer {
            padding-bottom: 20px;
        }
    </style>
  </head>
  <body>
      <div class="navbar navbar-default navbar-fixed-top">
          <div class="container">
              <div class="navbar-header">
                  <a href="../" class="navbar-brand">bitvend - bitcoin vending machine</a>
                  <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#navbar-main">
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                      <span class="icon-bar"></span>
                  </button>
              </div>
			  <div class="navbar-collapse collapse" id="navbar-main">
				  <p class="navbar-text navbar-right">
				  1zł = {{ format_btc(from_local_currency(100)) }}
				  </p>
				  <p class="navbar-text navbar-right">
				  <b>Rate:</b> {{ to_local_currency(100000000) / 100 }}zł
				  </p>
			  </div>
          </div>
      </div>

      <div class="container">
          <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.1)) }}</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">
                          {% with btc_uri = 'bitcoin:%s?amount=%s' % (config['INPUT_ADDRESS'], sat_to_btc(from_local_currency(item.value*1.1))) %}
                          <a href="{{ btc_uri }}">
                              <img src="{{ qrcode(btc_uri) }}" class="img-responsive center-block"/>
                              <center><code><small>{{ config['INPUT_ADDRESS'] }}</small></code></center>
                          </a>
                          {% endwith %}
                      </div>
                  </div>
              </div>
          </div>
          {% endfor %}
          </div>

          <hr>

          <footer class="row"><big>made by <a href="https://wiki.hackerspace.pl/people:informatic:start">inf</a></big>
              <span class="pull-right text-right">1infuHrvt7tuGY8nJcfTwB3wwAR1XwUcW &bull; <a href="https://code.hackerspace.pl/informatic/bitvend">sauce</a><br />report any issues to <a href="mailto:informatic@hackerspace.pl">informatic@hackerspace.pl</a></span>
          </footer>
      </div>
  </body>
</html>