about summary refs log tree commit diff
path: root/client/index.html
blob: facf4e98623c86e818b1eb2a5ace8cab7a2d4d42 (plain) (blame)
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
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="google-signin-client_id" content="580018768696-4beppspj6cu7rhjnfgok8lbmh9a4n3ok.apps.googleusercontent.com">
    <title>Elm SPA</title>
    <link rel="stylesheet" href="./output.css" />
    <script src="https://apis.google.com/js/platform.js" async defer></script>
    <script src="./Main.min.js"></script>
  </head>
  <body class="font-serif">
    <div id="mount"></div>
    <script>
     function onSignIn(googleUser) {
       var profile = googleUser.getBasicProfile();
       console.log('ID: ' + profile.getId());
       console.log('Name: ' + profile.getName());
       console.log('Image URL: ' + profile.getImageUrl());
       console.log('Email: ' + profile.getEmail());
     }

     function signOut() {
       console.log('Signing out!');
       var auth2 = gapi.auth2.getAuthInstance();
       auth2.signOut().then(function() {
         console.log('User signed out.');
       });
     }

     Elm.Main.init({node: document.getElementById("mount")});
    </script>
  </body>
</html>