JSFiddle - React, Tailwind, and code Playground
by tjerabek
HTML
<script src="https://raw.github.com/pa7/heatmap.js/master/src/heatmap.js"></script>
<style>
a img{
border:0px;
}
img{
border:0px;
}
.advert
{
border: 1px solid #00a1de;
position: static;
overflow: hidden;
-webkit-transition: all .2s ease;
-moz-transition: all .2s ease;
-ms-transition: all .2s ease;
-o-transition: all .2s ease;
transition: all .2s ease;
font-size: 12px;
line-height: 1.5em;
}
.advert .advertisement p
{
line-height: 1.3em;
}
.advertisement
{
margin: 0.5em;
float: left;
}
.advertisement .url img{
border:0px;
}
.advert.withoutlink .advertisement .url
{
display: none;
}
.advert.withoutlink .advertisement a
{
display: block;
}
.advert.withoutlink .advertisement .first-line,
.advert.withoutlink .advertisement .second-line
{
float: left;
}
.advert.perline .advertisement
{
float: none;
margin: 0.3em 0.5em;
margin-bottom: 0;
}
.advert.perline .advertisement a,
.advert.perline .advertisement p,
.advert.consolided .advertisement p
{
display: inline;
}
.advert.consolided .advertisement .advert-title,
.advert.consolided .advertisement p
{
/*font-size: 1.3em;*/
}
.advert.consolided .advertisement .url
{
/*font-size: 0.875em;*/
}
.advertisement .advert-title
{
font-weight: bold;
color: blue;
font-size: 15px !important;
}
.advertisement .url
{
color: Green;
font-size: 10px !important;
}
.advertisement p
{
margin: 0;
font-size: 12px !important;
}
.advert-info
{
width: 105px;
height: 23px;
position: absolute;
right: 0;
bottom: 0;
text-align: left;
font-size: .8em;
color: #808080;
overflow: hidden;
/*-webkit-border-bottom-right-radius: 10px;
-moz-border-radius-bottom-right: 10px;
border-bottom-right-radius: 10px;*/
}
.advert-info-item
{
margin-left: 82px;
width:44px;
height: 18px;
background: url("mclick_gray.png") no-repeat;
...
CSS
#heatmapEl{
width: 466px;
height: 58px;
position: relative;
}
a,.advert-title{color:#067BC3 !important;}body,table,div,ul,li,p{margin:0;padding:0}.url{color:#1F6D33 !important}body{font-size: 13px; font-family: Verdana;}p{font-size: 11px; color: #4A4B4D; }.advert { border: 1px solid #FFFFFF; background: #FFFFFF; width: 336px; height: 280px;-webkit-border-radius: 0px;-moz-border-radius: 0px;border-radius: 0px;font-size: 12px;}
body{
padding: 10em;
}
JavaScript
var config = {
"radius": 15,
"element": "heatmapEl",
"visible": true,
"opacity": 40,
"gradient": { 0.45: "rgb(0,0,255)", 0.55: "rgb(0,255,255)", 0.65: "rgb(0,255,0)", 0.95: "yellow", 1.0: "rgb(255,0,0)" }
};
var heatmap = heatmapFactory.create(config);
// set a dataset
heatmap.store.setDataSet({ max: 10, data:...