From e203d61a7f45ac51f53118fa6ded4e1dda800c4b Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 28 Apr 2016 23:17:29 -0400 Subject: [PATCH] improved appearance --- .gitignore | 1 + assets/media/dash.svg | 9 +++++ assets/scripts/app.js | 4 -- assets/styles/styles.css | 66 ++++++++++++++++++--------------- dist/index.html | 80 +++++++++++++++++++++++++++++++++++++--- package.json | 8 ++-- 6 files changed, 124 insertions(+), 44 deletions(-) create mode 100644 assets/media/dash.svg diff --git a/.gitignore b/.gitignore index 2ccbe46..100a0cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /node_modules/ +/.brackets.json diff --git a/assets/media/dash.svg b/assets/media/dash.svg new file mode 100644 index 0000000..39eafd8 --- /dev/null +++ b/assets/media/dash.svg @@ -0,0 +1,9 @@ + + + diff --git a/assets/scripts/app.js b/assets/scripts/app.js index 3a3b9a2..c3a2930 100644 --- a/assets/scripts/app.js +++ b/assets/scripts/app.js @@ -1,10 +1,6 @@ (function () { "use strict"; -/*jshint ignore:start*/ - window.JSON || document.write('<\/scr' + 'ipt>'); -/*jshint ignore:end*/ - function fetchJSONFile(path, callback) { var httpRequest = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); httpRequest.onreadystatechange = function () { diff --git a/assets/styles/styles.css b/assets/styles/styles.css index cda233e..611ff7d 100644 --- a/assets/styles/styles.css +++ b/assets/styles/styles.css @@ -1,54 +1,60 @@ /* Micro reset so global styles don't interfere */ + .dash-ticker, .dash-ticker *, .dash-ticker *:before, .dash-ticker *:after { - box-sizing: inherit; - vertical-align: baseline; - font-weight: inherit; - font-family: inherit; - font-style: inherit; - font-size: 100%; - border: 0 none; - outline: 0; - padding: 0; - margin: 0; + box-sizing: inherit; + vertical-align: baseline; + font-weight: inherit; + font-family: inherit; + font-style: inherit; + font-size: 100%; + border: 0 none; + outline: 0; + padding: 0; + margin: 0; + line-height: 1; } .dash-ticker { - display: block; - max-width: 20em; - margin: 0.5em auto; - border-radius: 0.5em; - background-color: rgba(0,0,0,0.125); - box-sizing: border-box; - color: inherit; - padding: 0.5em; + display: block; + max-width: 20em; + margin: 0.5em auto; + border-radius: 0.5em; + background-color: #1D76BC; + box-sizing: border-box; + color: white; + padding: 0.5em; + font-family: serif; } .dash-ticker .dash-ticker--title { - text-align: center; - font-size: 1.5em; - padding-bottom: 0.125em; - border-bottom: 1px solid rgba(0,0,0,0.5); - margin-bottom: 0.25em; + font-size: 2em; + float: left; + height: 1em; + width: 1em; + overflow: hidden; + text-indent: -999px; + background-image: url(../media/dash.svg); + background-size: 100% 100%; } #dash-ticker--price-container { - font-size: 2em; - text-align: center; + font-size: 2em; + text-align: center; } #dash-ticker--price-container > input { - position: fixed; - right: -200px; + position: fixed; + right: -200px; } #dash-ticker--price-container > input + label { - display: none; - cursor: pointer; + display: none; + cursor: pointer; } #dash-ticker--price-container > input:checked + label { - display: block; + display: block; } diff --git a/dist/index.html b/dist/index.html index 000936b..0c30d27 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,9 +1,76 @@ -
Dash Price
+})(); + diff --git a/package.json b/package.json index f66c25f..8b57b7e 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,9 @@ "version": "1.0.0", "description": "Embeddable dash price widget", "scripts": { - "test": "npm run -s lint", "lint": "echo '=> linting' && jshint assets/scripts/*.js", - "inline": "echo '=> inlining' && inline-assets --cssmin --htmlmin assets/index.html dist/index.html", - "install": "npm run -s lint && npm run -s inline" + "inline": "echo '=> inlining' && inline-assets assets/index.html dist/index.html", + "test": "npm run -s lint && npm run -s inline" }, "repository": { "type": "git", @@ -20,6 +19,7 @@ "homepage": "https://github.com/seigler/Dash-html-ticker#readme", "devDependencies": { "inline-assets": "^1.0.0", - "jshint": "^2.9.2" + "jshint": "^2.9.2", + "uglify-js": "^2.6.2" } }