-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·75 lines (64 loc) · 2.84 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
75
<!doctype html>
<html>
<head>
<title>PolymerFirebaseCodeLab</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="bower_components/iron-icons/iron-icons.html">
<link rel="import" href="bower_components/paper-toolbar/paper-toolbar.html">
<!-- <link rel="import" href="bower_components/font-roboto/roboto.html"> -->
<link rel="import" href="bower_components/paper-button/paper-button.html">
<link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="bower_components/paper-fab/paper-fab.html">
<link rel="import" href="bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="bower_components/paper-toast/paper-toast.html">
<link rel="import" href="firebase-element/firebase-auth.html">
<link rel="import" href="firebase-element/firebase.html">
<link rel="import" href="bower_components/paper-input/paper-input.html">
<link rel="stylesheet" href="styles.css">
</head>
<body unresolved>
<template is="dom-bind" id="app">
<firebase-auth
location="[[firebaseURL]]"
provider="[[firebaseProvider]]"
on-error="onFirebaseError"
on-login="onFirebaseLogin"
on-logout="onFirebaseLogout"
status-known="true">
</firebase-auth>
<paper-toast id="errorToast"></paper-toast>
<paper-button on-click="openToast">Open Toast</paper-button>
<paper-toast id="toast" text="Hello world!"></paper-toast>
<script>
var logout = document.querySelector('firebase-auth').logout;
var login = document.querySelector('firebase-auth').login;
</script>
<a href="#" onclick="logout()">Logout</a>
<a href="#" onclick="login()">Login</a>
<form on-submit="addItem">
<paper-input value="{{newItemValue}}"
placeholder="Enter your item here..."></paper-input>
<paper-button on-click="addItem">Add</paper-button>
</form>
<template is="dom-repeat" items="{{items}}">
<div>
<paper-icon-button icon="delete"
on-click="deleteItem"></paper-icon-button>
<paper-checkbox on-change="toggleItem"
checked="{{item.done}}">[[item.text]]</paper-checkbox>
</div>
</template>
<script>logout = function(){
console.log('logout');
document.querySelector('firebase-auth').logout();
};
login = function(){
console.log('login');
document.querySelector('firebase-auth').login();
};</script>
<script src="main.js"></script>
</body></html>