-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathindex.html
190 lines (169 loc) · 8.96 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TDC Chat</title>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<!-- Material Design Lite -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.1.3/material.min.js"></script>
<link rel="stylesheet" href="https://code.getmdl.io/1.1.3/material.indigo-red.min.css"/>
<!-- App -->
<script src="js/app.js"></script>
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">TDC Chat</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation mdl-layout--large-screen-only">
<a class="mdl-navigation__link about" href="">Sobre</a>
</nav>
<div class="wrapper">
<button id="button-users" style="display: none;" class="mdl-button mdl-js-button mdl-button--icon">
<i class="material-icons">people</i>
</button>
</div>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">TDC Chat</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" target="_blank" href="https://firebase.google.com/">Firebase</a>
<a class="mdl-navigation__link" target="_blank" href="https://getmdl.io/components/">MDL</a>
<a class="mdl-navigation__link" target="_blank" href="https://github.com/TiagoGouvea/firebase-tdc-chat">GitHub Repo</a>
<a class="mdl-navigation__link" target="_blank" href="http://www.tiagogouvea.com.br">@TiagoGouvea</a>
<!---->
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
<div class="mdl-cell mdl-cell--12-col">
<div id="div-must-auth" style="display:none;">
<div class="snippet-group">
<div class="snippet-header">
<div class="snippet-demos">
<div class="snippet-demo-padding"></div>
<div class="snippet-demo">
<div class="snippet-demo-container demo-card demo-card__square">
<div class="demo-card-square mdl-card mdl-shadow--2dp">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Bem vindo</h2>
</div>
<div class="mdl-card__supporting-text">
Para iniciar no TDC Chat autentique-se com o GitHub.
</div>
<div class="mdl-card__actions mdl-card--border">
<!-- Accent-colored raised button with ripple -->
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
id="buttton-auth">
Autenticar
</button>
</div>
</div>
</div>
</div>
<div class="snippet-demo-padding"></div>
</div>
</div>
</div>
</div>
<div id="div-chat" style="display: none;">
<div id="div-send" class="send" style="display: none;">
<div class="mdl-textfield mdl-js-textfield send-input">
<input type="text" class="mdl-textfield__input" id="input-message" disabled />
</div>
<div class=" send-button">
<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-button--colored"
id="button-send" disabled>
<i class="material-icons">send</i>
</button>
</div>
</div>
<div class="mdl-spinner mdl-js-spinner is-active" id="div-loading"></div>
<ul class="demo-list-three mdl-list" id="ul-messages">
<!-- messages goes here -->
</ul>
<script id="message-template" type="text/x-custom-template">
<li class="mdl-list__item mdl-list__item--three-line" id="li-message-{key}">
<span class="mdl-list__item-primary-content">
<img src="{photo-url}" class="mdl-list__item-avatar">
<span>{user-name}</span>
<span class="mdl-list__item-text-body">
{body}
</span>
</span>
</li>
</script>
</div>
<div id="div-users" style="display:none;">
<div class="snippet-group">
<div class="snippet-header">
<div class="snippet-demos">
<div class="snippet-demo-padding"></div>
<div class="snippet-demo">
<div class="snippet-demo-container demo-card demo-card__square">
<div class="demo-card-square mdl-card mdl-shadow--2dp">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Usuários</h2>
</div>
<div class="mdl-card__supporting-text">
<ul class="demo-list-icon mdl-list" id="ul-users-online">
<!-- user will be here -->
</ul>
</div>
</div>
</div>
</div>
<div class="snippet-demo-padding"></div>
</div>
</div>
</div>
<script id="user-template" type="text/x-custom-template">
<li class="mdl-list__item" id="li-user-{key}">
<span class="mdl-list__item-primary-content">
<img src="{photo-url}" class="mdl-list__item-avatar">
<span class="user-name">{user-name}</span>
</span>
</li>
</script>
</div>
</div>
</div>
</main>
<dialog class="mdl-dialog">
<h4 class="mdl-dialog__title">TDC Chat</h4>
<div class="mdl-dialog__content">
<p>
Simples exemplo de utilização do Firebase criado por Tiago Gouvêa para apresentação no TDC São Paulo 2016.<br><br>
Links uteis:<br>
<a target="_blank" href="https://github.com/TiagoGouvea/firebase-tdc-chat">Repositório no GitHub</a><br>
<a target="_blank" href="http://www.tiagogouvea.com.br">Blog de Tiago Gouvêa</a><br><br>
<a target="_blank" href="https://firebase.google.com/">Firebase</a><br>
<a target="_blank" href="https://getmdl.io/components/">Materia Design Lite (MDL)</a><Br>
</p>
</div>
<div class="mdl-dialog__actions">
<button type="button" class="mdl-button close">OK</button>
</div>
</dialog>
</div>
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/3.1.0/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyDHosKQuCNxBcBIweE9tRkoUHxyvm4p2qc",
authDomain: "tdcchat2016-fe9cc.firebaseapp.com",
databaseURL: "https://tdcchat2016-fe9cc.firebaseio.com",
storageBucket: "",
};
firebase.initializeApp(config);
</script>
</body>
</html>