diff options
| author | Adam Soltys <[email protected]> | 2014-08-20 08:01:20 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-08-20 08:01:20 -0700 |
| commit | 11390ded587c17ca06535c0826f2d2da94417d93 (patch) | |
| tree | d73d67e31c63cce7fa36959c9c60dfa963fcac42 | |
| parent | 1e24fe8d3d87104a7d70b4be286dc82003e48912 (diff) | |
| download | coinos-server-11390ded587c17ca06535c0826f2d2da94417d93.tar.gz coinos-server-11390ded587c17ca06535c0826f2d2da94417d93.zip | |
Add links to homepage
| -rw-r--r-- | public/css/calculator.less | 3 | ||||
| -rw-r--r-- | public/js/calculator.coffee | 10 | ||||
| -rw-r--r-- | public/js/setup.coffee | 1 | ||||
| -rw-r--r-- | views/users/edit.html | 5 | ||||
| -rw-r--r-- | views/users/show.html | 4 |
5 files changed, 13 insertions, 10 deletions
diff --git a/public/css/calculator.less b/public/css/calculator.less index 2a36be4f..4ba5058a 100644 --- a/public/css/calculator.less +++ b/public/css/calculator.less @@ -15,7 +15,7 @@ div.container-fluid { .navbar-toggle { background-color: #428bca; width: 100%; position: absolute; top: 0px; height: 30px; margin: 0; float: none; z-index: 1; margin-bottom: -30px; } .navbar-toggle .glyphicon { margin-top: -5px; padding-left: 10px; } -.navbar { margin: 0; margin-bottom: 15px; } +.navbar { margin: 0; min-height: 40px; } .navbar-collapse.in { overflow-y: visible; } .nav { margin-top: 30px; } .nav li a { padding: 10px 0 10px 10px; } @@ -34,6 +34,7 @@ div#calculator { strong#total { font-size: 30px; } p#address { padding-top: 10px; } #title { display: none; } + #title a { color: #000; text-decoration: none; } #logo { display: none; padding: 10px 0; margin-bottom: 10px; max-height: 250px; } #error { margin-top: 10px; } } diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee index 700e9903..c90954ab 100644 --- a/public/js/calculator.coffee +++ b/public/js/calculator.coffee @@ -58,16 +58,12 @@ setup = -> g.commission or= 0 g.symbol or= 'quadrigacx' - if g.title - $('#title').html(g.title).show() - if g.logo $('#logo').attr('src', g.logo).show() - else unless g.title - $('#logo').attr('src', '/assets/img/bitcoin.png').show() + else if g.title + $('#title').html("<a href='/#{g.user}/edit'>#{g.title}</a>").show() - $('#logo').click -> $(location).attr("href","/#{g.user}/edit") - $('#address').html("#{address} <a href='http://blockchain.info/address/#{address}' target='_blank'><img src='/assets/img/blockchain.png' /></a>") + $('#address').html("<a href='/#{g.user}/report'>#{address}</a> <a href='http://blockchain.info/address/#{address}' target='_blank'><img src='/assets/img/blockchain.png' /></a>") $('#symbol').html(g.symbol + " bid") $('#currency').html(g.currency) $('#unit').html(g.unit) diff --git a/public/js/setup.coffee b/public/js/setup.coffee index ce6b3963..7daf960f 100644 --- a/public/js/setup.coffee +++ b/public/js/setup.coffee @@ -80,6 +80,7 @@ $(-> $.getJSON("/#{user}.json", (data) -> $('#title').val(data.title) $('#address').val(data.address) + $('#logo').val(data.logo) $("#symbol option[value='#{data.symbol}']").attr('selected', 'selected') $('#commission').val(data.commission) $('#unit').val(data.unit) diff --git a/views/users/edit.html b/views/users/edit.html index 703ef9c0..462a6269 100644 --- a/views/users/edit.html +++ b/views/users/edit.html @@ -12,6 +12,11 @@ <input type="text" id="title" name="title" class="form-control" /> </div> +<div class="form-group"> + <label for="logo">Logo:</label> + <input type="text" id="logo" name="logo" class="form-control" /> + </div> + <div class="form-group"> <label for="address">Bitcoin Address:</label> <input type="text" id="address" name="address" class="form-control" /> diff --git a/views/users/show.html b/views/users/show.html index bbf214b4..328353b6 100644 --- a/views/users/show.html +++ b/views/users/show.html @@ -6,7 +6,7 @@ <input id="user" type="hidden" value="{{user}}" /> <h1 id="title"></h1> - <img id="logo" src="/assets/img/bitcoin.png" alt="Logo" /> + <a href="/{{user}}/edit"><img id="logo" src="/assets/img/bitcoin.png" alt="Logo" /></a> <form role="form"> <div class="form-group"> @@ -37,7 +37,7 @@ <div id="payment"> <p>Please send <strong id="total">0.0</strong> <span id="unit"></span> to</p> - <div id="qr"></div> + <a href="/{{user}}/report"><div id="qr"></div></a> <p id="address"></p> </div> |
