oauth + redirect

This commit is contained in:
Arjun Patel
2018-01-21 09:42:15 -08:00
parent e891bef6f7
commit c91abf7464
3 changed files with 32 additions and 40 deletions
+10 -16
View File
@@ -7,8 +7,6 @@
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="jquery-3.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="dash.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
@@ -34,29 +32,25 @@
}
function getData(value){
}
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawVisualization);
function drawVisualization() {
// Some raw data (not necessarily accurate)
var data = google.visualization.arrayToDataTable([
['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Papua New Guinea', 'Rwanda', 'Average'],
['2004/05', 165, 938, 522, 998, 450, 614.6],
['2005/06', 135, 1120, 599, 1268, 288, 682],
['2006/07', 157, 1167, 587, 807, 397, 623],
['2007/08', 139, 1110, 615, 968, 215, 609.4],
['2008/09', 136, 691, 629, 1026, 366, 569.6]
['Day', 'Steps', 'Calories', 'Sleep', 'Activity', 'Average'],
['01/05', 10, 94, 90, 84, 70],
['01/06', 70, 90, 91, 84, 84],
['01/07', 96, 98, 70, 93, 90],
['01/08', 83, 90, 90, 75, 85],
['01/09', 80, 90, 93, 95, 90]
]);
var options = {
title : 'Monthly Coffee Production by Country',
vAxis: {title: 'Cups'},
hAxis: {title: 'Month'},
title : 'Daily Fitness Goals',
vAxis: {title: 'Percent'},
hAxis: {title: 'Days'},
seriesType: 'bars',
series: {5: {type: 'line'}}
};
var chart = new google.visualization.ComboChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
@@ -79,7 +73,7 @@
<div class="card">
<div id="piechart" class="circleGraph"></div>
</div>
<!---graph --->
<!---graph ---->
</div>
<div class="col-md-6 cardCont">
<div class="row twoCardRow">
+16 -8
View File
@@ -1,17 +1,26 @@
<!Doctype html>
<html>
<head>
<link rel="shortcut icon" href="pics/Airplane.ico" />
<title>Reflex</title>
<script type="text/javascript" src="jquery-3.1.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="main.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
</head>
<meta name="google-signin-client_id" content="1028038812776-ovsjf90n1m620svlfncolr3h00c0frdn.apps.googleusercontent.com">
<script src="https://apis.google.com/js/api.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script type="text/javascript">
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
window.location.href = "http://localhost:8000/dashboard.html";
}
</script>
</head>
<body>
@@ -23,12 +32,11 @@
<p class="inputs">Welcome to Relfex Fitness!
<br>
<a href="planePage.html"><button id="begin">Begin Process</button></a>
<button class="g-signin2" data-onsuccess="onSignIn" id="begin"></button>
<br>
</p>
</div>
<script type="text/javascript" src="indexJs.js"></script>
+6 -16
View File
@@ -74,27 +74,17 @@ p.inputs {
margin-right: -50%;
transform: translate(-50%, -50%);
font-family: 'Open Sans Condensed', sans-serif;
box-shadow: 3px 3px 2px #888888;
vertical-align: middle;
line-height: 50px;
font-size: 40px;
}
button {
margin: 0;
font-family: 'Open Sans Condensed', sans-serif;
font-size: 20px;
background-color: darkblue;
color: white;
height: 35px;
width: 150px;
padding: 0 5px 0 5px;
border: none;
box-shadow: 3px 3px 2px #888888;
padding: 0;
border: none;
background-color: none;
}
button:hover {
font-size: 19px;
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
cursor: pointer;
border: none;
}