-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
83 lines (80 loc) · 4.41 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
<!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">
<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>Kitteh Anonymous Chat</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="pubnub-element.html">
<link rel="import" href="bower_components/paper-scaffold.html">
<link rel="import" href="bower_components/iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="bower_components/paper-item/paper-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="bower_components/paper-header-panel/paper-header-panel.html">
<link rel="import" href="bower_components/iron-icons/iron-icons.html">
<link rel="import" href="x-chat-list.html">
<link rel="import" href="x-translate.html">
<link rel="import" href="x-languages.html">
<link rel="stylesheet" href="css/style.css">
</head>
<!-- <body unresolved fullbleed> -->
<body>
<template is="dom-bind" id="tmpl">
<!-- Use your own publish_key and subscribe_key please -->
<core-pubnub
publish_key="pub-c-03b76426-8522-4250-9885-ecb6df78a080"
subscribe_key="sub-c-fdf26802-2aac-11e5-9aaf-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>
<paper-scaffold>
<paper-header-panel navigation class="flex">
<paper-toolbar id="navheader" class="tall">
<img class="middle avatar {{color}}" src$="{{avatar}}">
<div class="bottom uuid">{{uuid}}</div>
</paper-toolbar>
<section class="layout vertical" id="onlineList">
<paper-item label="Online Now" class="subdue layout horizontal center"></paper-item>
<template is="dom-repeat" items="{{data}}">
<paper-item label="{{item}}"></paper-item>
</template>
</section>
</paper-header-panel>
<div tool class="layout horizontal flex">
<div class="flexKitteh">Kitteh Anonymous</div>
<iron-icon icon="account-circle"></iron-icon><span>{{occupancy}}</span>
<x-translate query="le chat"></x-translate>
</div>
<section class="layout vertical flex">
<x-languages id="languages"></x-languages>
</section
<section class="layout vertical fit" id="chat">
<div class="chat-list flex">
<template is="dom-repeat" items="{{messageList}}">
<x-chat-list color="{{item.color}}" avatar="{{item.avatar}}" username="{{item.uuid}}" text="{{item.text}}" status="{{item.status}}" timestamp="{{item.timestamp}}"></x-chat-list>
</template>
</div>
<div class="shim"></div>
<div class="send-message layout horizontal">
<paper-input class="flex" label="Type message..." id="input" value="{{input}}" on-keyup$="{{checkKey}}"></paper-input>
<paper-fab class="send" icon="send" id="sendButton" on-tap$="{{sendMyMessage}}"></paper-fab>
</div>
</section>
</paper-scaffold>
</template>
<script src="js/app.js"></script>
</body>
</html>