Permalink
Please sign in to comment.
Showing
with
146 additions
and 114 deletions.
- +20 −0 README.md
- +3 −0 README.md~
- +45 −4 css/main.css
- +0 −73 css/main.css~
- +15 −1 index.html
- +4 −0 main.js
- +1 −1 package.json
- +0 −35 package.json~
- +58 −0 settings.html
| @@ -1,3 +1,23 @@ | ||
| # Crypti | ||
| A small Bitcoin price widget for desktops. | ||
| + | ||
| +* Keeps you current on Bitcoin to USD conversion | ||
| +* Utilized Coinmarketcap.com data | ||
| +* Updates every 60 seconds | ||
| + | ||
| +## Platforms | ||
| + | ||
| +Currently Supported | ||
| + | ||
| +* Win32 x64-86 | ||
| +* Win32 x64 | ||
| +* Linux | ||
| + | ||
| +Planned Support | ||
| + | ||
| +* MacOS | ||
| + | ||
| +## Compiled Binaries | ||
| + | ||
| +Compiled binaries are available on the [Latest Release](https://github.com/matthewjamesr/Crypti/releases/latest) page. |
| @@ -0,0 +1,3 @@ | ||
| +# Crypti | ||
| + | ||
| +A small Bitcoin price widget for desktops. |
49
css/main.css
| @@ -1,73 +0,0 @@ | ||
| -html { | ||
| - background: linear-gradient(045deg, #0fb8ad 0%, #1fc8db 51%, #2cb5e8 75%); | ||
| - padding: 0px; | ||
| - margin: 0px; | ||
| - height: 100%; | ||
| - color: #FFF; | ||
| -} | ||
| - | ||
| -body { | ||
| - margin: 10px 15px 15px 15px; | ||
| -} | ||
| - | ||
| -#info { | ||
| - position: absolute; | ||
| - top: 0px | ||
| - left: 0px; | ||
| - margin-left: -10px; | ||
| -} | ||
| - | ||
| -img#btc-icon { | ||
| - position: absolute; | ||
| - top: 15px; | ||
| - right: 15px; | ||
| - height: 85px; | ||
| - width: 85px; | ||
| - -webkit-app-region: drag; | ||
| -} | ||
| - | ||
| -.refresh-control { | ||
| - float: left | ||
| -} | ||
| - | ||
| -.refresh-controler, #timer { | ||
| - font-size: 10pt; | ||
| - margin-left: 10px; | ||
| -} | ||
| - | ||
| -.refresh-bar { | ||
| - position: absolute; | ||
| - bottom: 0px; | ||
| - left: 0px; | ||
| - height: 5px; | ||
| - width: 100%; | ||
| -} | ||
| - | ||
| -#progress { | ||
| - position relative; | ||
| - background: #28959b; | ||
| - height: 100%; | ||
| - width: 0% | ||
| -} | ||
| - | ||
| -h1 { | ||
| - position: relative; | ||
| - float: left; | ||
| - font-size: 32pt; | ||
| - margin: 0px 0px 0px 0px; | ||
| -} | ||
| - | ||
| -p { | ||
| - position: absolute; | ||
| - bottom: 15px; | ||
| - margin: 15px 0px 0px 0px; | ||
| - font-size: 16pt; | ||
| -} | ||
| - | ||
| -div#drag-region { | ||
| - position: absolute; | ||
| - left: 0px; | ||
| - height: 15px; | ||
| - width: 100%; | ||
| - -webkit-app-region: drag; | ||
| -} |
16
index.html
| @@ -1,35 +0,0 @@ | ||
| -{ | ||
| - "name": "Crypti", | ||
| - "version": "1.0.0", | ||
| - "description": "A minimal bitcoin price desktop widget", | ||
| - "main": "main.js", | ||
| - "repository": "https://github.com/electron/electron-quick-start", | ||
| - "keywords": [ | ||
| - "crypti", | ||
| - "bitcoin", | ||
| - "cryptocurrency", | ||
| - "price", | ||
| - "widget" | ||
| - ], | ||
| - "author": "Matthew Reichardt", | ||
| - "license": "MIT", | ||
| - "devDependencies": { | ||
| - "electron": "~1.6.2" | ||
| - }, | ||
| - "dependencies": { | ||
| - "material-icons": "^0.1.0", | ||
| - "request": "^2.81.0" | ||
| - }, | ||
| - "build": { | ||
| - "appId": "com.github.matthewjamesr.crypti", | ||
| - "mac": { | ||
| - "category": "finance" | ||
| - } | ||
| - }, | ||
| - "scripts": { | ||
| - "start": "electron .", | ||
| - "pack": "build --dir", | ||
| - "dist": "build", | ||
| - "postinstall": "install-app-deps" | ||
| - } | ||
| -} |
| @@ -0,0 +1,58 @@ | ||
| +<!DOCTYPE html> | ||
| +<html> | ||
| + <head> | ||
| + <meta charset="UTF-8"> | ||
| + <title>Crypti Settings</title> | ||
| + <link rel="stylesheet" href="css/main.css" /> | ||
| + <link rel="stylesheet" href="css/animate.css" /> | ||
| + <!-- Material icons font hosted by Google --> | ||
| + <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> | ||
| + <!-- Material icons CSS toolkit --> | ||
| + <link rel="stylesheet" href="node_modules/material-icons/css/material-icons.min.css"> | ||
| + </head> | ||
| + <body> | ||
| + <div id="drag-region"></div> | ||
| + <i class="mi mi-info-outline" id="info"></i> | ||
| + <h1 id="btcPrice">Searching</h1> | ||
| + <div class="refresh-control"> | ||
| + <span id="timer"></span> | ||
| + </div> | ||
| + <img id="btc-icon" src="images/btc-icon.svg" /> | ||
| + <p style="float: left;">USD - BTC</p> | ||
| + <div class="refresh-bar"> | ||
| + <div id="progress"></div> | ||
| + </div> | ||
| + </body> | ||
| + | ||
| + <script> | ||
| + // You can also require other files to run in this process | ||
| + require('./renderer.js') | ||
| + | ||
| + var currentPrice = document.getElementById('btcPrice'); | ||
| + var counter = 60; | ||
| + var progress = 0; | ||
| + | ||
| + var request = require('request'); | ||
| + request('https://api.coinmarketcap.com/v1/ticker/bitcoin/', function(error, response, body) { | ||
| + currentPrice.innerHTML = '$' + JSON.parse(body)[0].price_usd; | ||
| + }); | ||
| + var requestLoop = setInterval(function() { | ||
| + //document.getElementById('timer').innerHTML = Math.ceil(counter); | ||
| + document.getElementById('progress').style.width = progress/60*100 + "%"; | ||
| + if(counter === 0) { | ||
| + request('https://api.coinmarketcap.com/v1/ticker/bitcoin/', function(error, response, body) { | ||
| + currentPrice.innerHTML = '$' + JSON.parse(body)[0].price_usd; | ||
| + | ||
| + }); | ||
| + counter = 60; | ||
| + progress = 0; | ||
| + } | ||
| + counter-- | ||
| + progress++ | ||
| + }, 1000); | ||
| + </script> | ||
| + <script | ||
| + src="https://code.jquery.com/jquery-3.2.1.min.js" | ||
| + integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" | ||
| + crossorigin="anonymous"></script> | ||
| +</html> |
0 comments on commit
34c8309