mirror of
https://github.com/seigler/Dash-price-widget
synced 2025-07-26 23:56:10 +00:00
improved appearance
This commit is contained in:
parent
8cf456f7aa
commit
e203d61a7f
6 changed files with 124 additions and 44 deletions
9
assets/media/dash.svg
Normal file
9
assets/media/dash.svg
Normal file
|
@ -0,0 +1,9 @@
|
|||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="226.777px" height="226.777px" viewBox="0 0 226.777 226.777" enable-background="new 0 0 226.777 226.777"
|
||||
xml:space="preserve">
|
||||
<path fill="#FFFFFF" d="M113.388,0C50.766,0,0,50.766,0,113.388c0,62.623,50.766,113.389,113.389,113.389
|
||||
c62.623,0,113.389-50.766,113.389-113.389C226.777,50.766,176.011,0,113.388,0z M56.562,104.802h45.266l-5.238,17.024H51.326
|
||||
L56.562,104.802z M173.83,96.773c-1.801,6.506-7.656,26.023-10.059,32.945c-2.4,6.922-6.829,12.734-12.506,16.057
|
||||
c-5.676,3.323-7.797,4.712-15.731,4.712H54.303l5.721-18.542h76.395l11.414-37.109h-75.79l5.722-18.541c0,0,83.698,0,84.577,0
|
||||
c3.875,0,8.996,1.792,11.488,6.639C176.321,87.775,175.629,90.267,173.83,96.773z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 812 B |
|
@ -1,10 +1,6 @@
|
|||
(function () {
|
||||
"use strict";
|
||||
|
||||
/*jshint ignore:start*/
|
||||
window.JSON || document.write('<scr' + 'ipt src="//cdnjs.cloudflare.com/ajax/libs/json3/3.2.4/json3.min.js"><\/scr' + 'ipt>');
|
||||
/*jshint ignore:end*/
|
||||
|
||||
function fetchJSONFile(path, callback) {
|
||||
var httpRequest = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
|
||||
httpRequest.onreadystatechange = function () {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue