-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
82 lines (68 loc) · 3.43 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="Simple Chat Room Created with Google Polymer 0.5 and PubNub's APIs">
<meta name="author" content="Angel Barrera @angelba_santana">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title>PolyChat</title>
<link rel="icon" sizes="192x192" href="images/app-icon-192.png">
<link rel="icon" sizes="128x128" href="images/app-icon-128.png">
<link rel="apple-touch-icon" sizes="128x128" href="images/app-icon-128.png">
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="images/app-icon-128.png">
<!-- Polymer -->
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="bower_components/pubnub-polymer/pubnub-element.html">
<link rel="import" href="bower_components/core-scaffold/core-scaffold.html">
<link rel="import" href="bower_components/core-item/core-item.html">
<link rel="import" href="bower_components/paper-input/paper-input.html">
<link rel="import" href="bower_components/paper-fab/paper-fab.html">
<link rel="import" href="x-chat-list.html">
<link rel="stylesheet" href="css/style.css">
</head>
<body unresolved fullbleed>
<template is="auto-binding">
<!-- Use your own publish_key and subscribe_key please -->
<core-pubnub publish_key="pub-c-56190f06-ed50-4eae-bdfb-4b4c40a07318" subscribe_key="sub-c-929733de-f7fe-11e4-af94-02ee2ddab7fe" uuid="{{uuid}}">
<core-pubnub-subscribe channel="polymer-chat" id="sub" on-callback="{{subscribeCallback}}" on-presence="{{presenceChanged}}" on-error="{{error}}">
<core-pubnub-publish channel="polymer-chat" message="" id="pub" on-error="{{error}}"></core-pubnub-publish>
<core-pubnub-history channel="polymer-chat" count="30" on-success="{{historyRetrieved}}" on-error="{{error}}"></core-pubnub-history>
</core-pubnub-subscribe>
</core-pubnub>
<core-scaffold>
<core-header-panel navigation flex>
<core-toolbar id="navheader" class="tall">
<div class="middle avatar {{color}}" style="background-image: url({{avatar}})"></div>
<div class="bottom uuid">{{uuid}}</div>
</core-toolbar>
<section layout vertical id="onlineList">
<core-item label="Online Now" class="subdue" layout horizontal center></core-item>
<template repeat="{{cat in cats}}">
<core-item label="{{cat}}"></core-item>
</template>
</section>
</core-header-panel>
<div tool layout horizontal flex>
<div flex>Bienvenidos todos</div>
<core-icon icon="account-circle"></core-icon><span>{{occupancy}}</span>
</div>
<section layout vertical fit id="chat">
<div flex class="chat-list">
<template repeat="{{message in messageList}}">
<x-chat-list color="{{message.color}}" avatar="{{message.avatar}}" username="{{message.uuid}}" text="{{message.text}}" status="{{message.status}}" timestamp="{{message.timestamp}}"></x-chat-list>
</template>
</div>
<div class="shim"></div>
<div class="send-message" layout horizontal>
<paper-input flex label="Mensaje..." id="input" value="{{input}}" on-keyup="{{checkKey}}"></paper-input>
<paper-fab icon="send" id="sendButton" on-tap="{{sendMyMessage}}"></paper-fab>
</div>
</section>
</core-scaffold>
</template>
<script src="js/app.js"></script>
</body>
</html>