fxhero web widget
by paulftw
HTML
<body ng-app ng-controller="RootCtrl">
<div>
<div class=topbar>
{{ title }}
</div>
<div class='pairview'>
<button class='basecur'>EUR</button><button class='quotecur'>USD</button>
<button class='sell'>
<span class=prefix>1.34</span>
<span class=body>56</span>
<span class=suffix>8</span>
</button>
<button class='buy'>
<span class=prefix>1.34</span>
<span class=body>56</span>
<span class=suffix>8</span>
</button>
<div class='spread'>2.0</div>
</div>
</div>
</body>
CSS
.pairview {
border: 2px solid #666;
width: 200px;
position: relative;
text-align: center;
}
.pairview button {
cursor: hand;
cursor: pointer;
}
.basecur, .quotecur {
height: 36px;
width: 64px;
margin: 0 0 4px 1px;
float: left;
font-size: 16px;
font-weight: 600;
}
.basecur:after, .quotecur:after {
display: inline-block;
width: 0;
height: 0;
border-top: 4px solid #333;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
position: relative;
top: -3px;
left: 6px;
}
.buy, .sell {
background: -webkit-linear-gradient(top, #eee 0%, #f0f9ff 35%, #91e842 100%);
background: linear-gradient(top, #eee 0%, #f0f9ff 35%, #91e842 100%);
-webkit-box-shadow: inset 0 0 6px 0 #000;
box-shadow: inset 0 0 6px 0 #fff;
width: 94px;
height: 72px;
margin: 2px;
border-radius: 4px;
border: 1px solid #333;
display: inline-block;
font-size: 32px;
word-spacing:-0.4em;
}
.pairview .prefix, .pairview .body, .pairview .suffix {
margin: 0;
padding: 0;
display: inline-block;
font-weight: bold;
}
.pairview .prefix {
font-size: 50%;
}
.pairview .suffix {
font-size: 50%;
position: relative;
top: -0.7em;
}
.spread {
position: absolute;
top: 48px;
left: 99px;
border: 1px solid #3c3;
background-color: #cfc;
padding: 0px;
font-size: 10px;
font-family: sans-serif;
width: 32px;
margin-left: -16px;
text-align: center;
}
JavaScript
RootCtrl = function($scope) {
$scope.title = 'main page';
};