flipside-js/index.html

245 lines
5.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>flipside.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="flipside-v1.14.1.js"></script>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
padding: 0;
margin: 0;
background-color: #111111 !important;
}
text {
font-weight: 700;
font-size: 24px;
}
.wrapper {
width: 1080px;
font-weight: 700;
font-size: 20px;
}
.wrapper p {
font-size: 40px;
}
#widget-1 {
background: black;
}
#widget-2 {
width: 300px;
background: #33435e;
}
</style>
</head>
<body>
<div class="wrapper">
<h3>Dynamic</h3>
<div id="widget"></div>
</div>
<div class="wrapper">
<h2>Chart</h2>
<div id="chart"></div>
</div>
<div class="wrapper dark" style="background-color: #000000;">
<div id="chart2"></div>
</div>
<div class="wrapper"><div id="score"></div></div>
<div class="wrapper"><div id="widget-0" style="width: 289px;"></div></div>
<div class="wrapper" style="background-color: #000000;">
<div id="widget-1" style="width: 289px;"></div>
</div>
<div class="wrapper" style="background-color: #33435e;">
<div id="widget-2"></div>
</div>
<div class="wrapper"><div id="multiTable"></div></div>
<div class="wrapper">
<div id="multiTableFcas"></div>
</div>
<script>
const flipside = new Flipside("a7936778-4f87-4790-889f-3ab617271458");
flipside.dynamic("widget", {
widgetId: "578375af-3467-4742-9863-5ca6f2fa30d1",
darkMode: true,
asset: {
symbol: "BTC",
},
});
flipside.chart("chart", {
title: "Flipside 25 - Overall Industry Health",
chart: {
type: "area",
},
plotOptions: {
area: {
threshold: null,
fillColor: {
linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1,
},
stops: [
[0, "#9EC9FE"],
[1, "rgba(255, 255, 255, 0)"],
],
},
},
},
series: [
{
name: "FLIP25",
symbol: "FLIP25",
metric: "fcas",
type: "line",
yAxis: 1,
},
],
colors: ["#9EC9FE"],
rangeSelector: {
enabled: true,
},
});
flipside.chart("chart2", {
mode: "dark",
title: "Ethereum Health",
axisTitles: ["FCAS", "Dev"],
colors: ["#E44C27", "#7FCCC5"],
series: [
{ asset_id: 2, metric: "fcas", type: "line", yAxis: 0 },
{ asset_id: 2, metric: "dev", type: "line", yAxis: 1 },
],
});
flipside.spectrum("widget-0", {
asset: {
asset_id: 1,
highlights: ["BTC", "ETH", "QTUM"],
},
mode: "light",
fontFamily: "inherit",
relatedMarkers: {
enabled: true,
bucketDistance: 35,
lineDistance: 25,
fontFamily: "inherit",
},
showHeader: false,
name: { enabled: true, style: {} },
spectrum: { enabled: true },
icon: { enabled: true },
rank: { enabled: true },
trend: { enabled: true },
});
flipside.spectrum("widget-1", {
assets: [
{
asset_id: 1,
highlights: ["BTC", "NMR", "QTUM"],
},
{
asset_id: 2,
highlights: ["BTC", "NMR", "QTUM"],
},
],
mode: "dark",
bucketDistance: 100,
showHeader: false,
relatedMarkers: {
bucketDistance: 55,
lineDistance: 35,
},
});
flipside.createTable("widget-2", "btc", {
dark: true,
borderColor: "#737e8d",
});
// Price table
flipside.multiTable("multiTable", {
widgetType: "price-multi-table",
columns: ["market_cap", "price", "volume_24h"],
sortBy: "market_cap",
showFullName: true,
fontFamily: "inherit",
limit: 50,
mode: "light",
headers: {
style: {
fontWeight: "bold",
padding: "10px 0 10px 0",
},
},
rows: {
dividers: true,
dividersColor: "#eaeaea",
alternating: false,
style: {
padding: "10px 0 10px 0",
},
},
title: {
text: "Top 50 Coins By Market Cap",
style: { fontSize: "24px", fontWeight: 400 },
},
});
// FCAS
flipside.multiTable("multiTableFcas", {
autoWidth: false,
assets: null,
columns: [
"fcas",
"trend",
"userActivity",
"developerBehavior",
"marketMaturity",
"rank",
],
exlusions: null,
fontFamily: "inherit",
headers: {},
limit: 10,
mode: "light",
rows: {
alternating: true,
alternatingColors: "#eeeeee",
dividers: false,
},
title: {
text: "Top Coins",
style: {},
},
trend: {
enabled: true,
changeOver: 14,
style: {},
},
});
flipside.score("score", { symbol: "eth" });
</script>
</body>
</html>