-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
74 lines (71 loc) · 3.15 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mind Map</title>
<link rel="stylesheet" href="app.css">
<link rel="stylesheet" href="fontello/css/mind-map.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.amber-blue.min.css">
<script defer src="https://code.getmdl.io/1.1.1/material.min.js"></script>
<script type="module">
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.9.2/firebase-app.js";
import { getAuth, onAuthStateChanged, signInWithPopup, GoogleAuthProvider } from "https://www.gstatic.com/firebasejs/9.9.2/firebase-auth.js";
import { getDatabase, ref, set, push, remove, runTransaction, child, onValue, onChildAdded, onDisconnect } from "https://www.gstatic.com/firebasejs/9.9.2/firebase-database.js";
import DOMPurify from "./lib/purify.es.js";
const firebaseConfig = {
apiKey: "AIzaSyAz_Pu0oWNJjqYrB5AFrMp6Jv-eHcX4ngk",
authDomain: "mind-map.firebaseapp.com",
databaseURL: "https://mind-map.firebaseio.com",
projectId: "firebase-mind-map",
storageBucket: "firebase-mind-map.appspot.com",
messagingSenderId: "1046811900913",
appId: "1:1046811900913:web:40ff3f7f3a953968172250"
};
const app = initializeApp(firebaseConfig);
window.getAuth = getAuth;
window.onAuthStateChanged = onAuthStateChanged;
window.signInWithPopup = signInWithPopup;
window.GoogleAuthProvider = GoogleAuthProvider;
window.getDatabase = getDatabase;
window.ref = ref;
window.set = set;
window.push = push;
window.remove = remove;
window.runTransaction = runTransaction;
window.child = child;
window.onValue = onValue;
window.onChildAdded = onChildAdded;
window.onDisconnect = onDisconnect;
window.DOMPurify = DOMPurify;
</script>
<script src="lib/jquery.js"></script>
<script src="lib/coffeescript.js"></script>
<script src="app.coffee" type="text/coffeescript"></script>
</head>
<body>
<header class="mdl-layout__header is-casting-shadow" style="display: flex">
<div class="mdl-layout__header-row">
<button id="new-document" class="mdl-button mdl-js-button mdl-button--icon">
<img src="images/document-new.svg">
</button>
<div class="mdl-textfield mdl-js-textfield" id="document-title">
<input class="mdl-textfield__input" type="text" id="document-title-input">
<label class="mdl-textfield__label" for="document-title-input" id="document-title-placeholder">Document title</label>
</div>
<div id="formatting"></div>
<button id="sign-in" class="mdl-button mdl-button--raised mdl-button--accent mdl-js-button mdl-js-ripple-effect">Sign in</button>
<div id="signed-in" style="display: none">
<div id="user">
<img id="user-image"></img>
<div id="user-name"></div>
</div>
<button id="sign-out" class="mdl-button mdl-button--raised mdl-button--accent mdl-js-button mdl-js-ripple-effect">Sign out</button>
</div>
</div>
</header>
<div id="document-background"></div>
<main id="document-content"></main>
</body>
</html>