-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathnews.html
103 lines (95 loc) · 3.22 KB
/
news.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LunarCRUSH Widget News</title>
<!-- <link href="https://fonts.googleapis.com/css?family=Exo+2&display=swap" rel="stylesheet"> -->
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<style>
body,
html {
margin: 0;
padding: 0;
/* position: absolute; */
/* width: 100%; */
/* height: 1500px; */
background-color: #0f1722;
}
#news-widget {
border-style: none;
width: 1000px;
height: 500px;
font-family: 'Roboto', sans-serif;
position: relative;
left: 330px;
top: -60px;
background-color: #0f1722;
}
</style>
<script>
var paletteLight = {
type: 'dark',
common: { black: 'rgba(0, 0, 0, 1)', white: 'rgba(255, 255, 255, 1)' },
// background: { paper: '#2e3540', default: '#272b34' },
background: { paper: '#202327', default: '#191a1e' },
primary: {
light: 'rgba(126,211,32, 1)',
main: 'rgba(126,211,32, 1)',
dark: 'rgba(126,211,32, 1)',
contrastText: 'rgba(255, 255, 255, 1)'
},
secondary: {
light: 'rgba(255,39,0, 1)',
main: 'rgba(255,39,0, 1)',
dark: 'rgba(255,39,0, 1)',
contrastText: 'rgba(255, 255, 255, 1)'
},
error: {
light: 'rgba(229, 115, 115, 1)',
main: 'rgba(244, 67, 54, 1)',
dark: 'rgba(211, 47, 47, 1)',
contrastText: '#fff'
},
// contrastThreshold: 100,
// tonalOffset: 100,
text: {
primary: 'rgba(255, 255, 255, 0.87)',
secondary: 'rgba(209, 209, 209, 0.54)',
disabled: 'rgba(134, 134, 134, 0.38)',
hint: 'rgba(0, 0, 0, 0.38)'
},
typography: {
fontFamily: "'Roboto', sans-serif",
fontWeight: 300,
},
};
function setPalette() {
return window.btoa(JSON.stringify(paletteLight))
}
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
console.log('Query variable %s not found', variable);
};
window.onload = function () {
var symbol = getQueryVariable('symbol') || 'BTC';
var interval = getQueryVariable('interval') || '1 Week';
// document.getElementById('news-widget').src = 'http://localhost:3000/news?stylesheet=https://localhost:5000/news-widget.css&palette=' + setPalette() + '&symbol=' + symbol + '&interval=' + interval;
document.getElementById('news-widget').src = 'https://lunarcrush-widgets.firebaseapp.com/news?stylesheet=https://lunar-widget-test.firebaseapp.com/news-widget.css&palette=' + setPalette() + '&symbol=' + symbol + '&interval=' + interval;
}
</script>
</head>
<body>
<div id="wrapper">
<img src="/coin-page.png" alt="" width="1700" />
<iframe name="news-widget" id="news-widget" frameborder="0" border="0" cellspacing="0" scrolling="yes"></iframe>
</div>
</body>
</html>