Changed the purpose of the repo

Changed from k4li -> currency project
This commit is contained in:
Yamozha
2021-02-03 17:28:43 +02:00
parent c0b4a23c06
commit 1f543cae6f
11 changed files with 91 additions and 262 deletions

35
Website/css/home.css Normal file
View File

@ -0,0 +1,35 @@
@import url(https://fonts.googleapis.com/css?family=Roboto:300);
:root {
--base-grid: 8px;
--colour-white: #fff;
--colour-black: #1a1a1a;
}
@viewport {
width: device-width ;
zoom: 1.0 ;
}
*,
:after,
:before {
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
background-position: 100%;
}
body {
position: absolute;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%);
top: 50%;
font-size: 1.2em;
font-family: 'Roboto', sans-serif;
line-height: 1.4;
}

14
Website/index.html Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="css/home.css">
<link rel="stylesheet" href="http://github.hubspot.com/odometer/themes/odometer-theme-default.css">
<meta charset="utf-8">
<title>Currency site</title>
</head>
<body>
<script src="http://github.hubspot.com/odometer/odometer.js"></script>
<h1 id="odometer" class="odometer">This is where you'll see the thing</h1>
<script type="text/javascript" src="scripts/getCurrentCoins.js"></script>
</body>
</html>

View File

@ -0,0 +1,16 @@
function currencyTicker(){
var ws = new WebSocket("ws://localhost:8765/");
ws.onopen = function(){
console.log("Connection is Established");
ws.send("STATUSONCOIN");
};
ws.onmessage = function(evt) {
var received_msg = evt.data;
w = document.getElementById("odometer").innerHTML = received_msg;
};
}
currencyTicker()
var t=setInterval(currencyTicker,5000);