Skip to content

Instantly share code, notes, and snippets.

@mikeptweet
Created February 10, 2015 15:09
Show Gist options
  • Save mikeptweet/be3a2a094b3fa95e3bf0 to your computer and use it in GitHub Desktop.
Save mikeptweet/be3a2a094b3fa95e3bf0 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
</style>
<core-pubnub publish_key="pub-c-156a6d5f-22bd-4a13-848d-b5b4d4b36695" subscribe_key="sub-c-f762fb78-2724-11e4-a4df-02ee2ddab7fe" uuid>
<core-pubnub-subscribe id="sub" channel="polymer-chat" on-callback="{{ subscribeCallback }}" on-presence="{{ presenceChanged }}" on-error="{{ error }}">
<core-pubnub-publish id="pub" channel="polymer-chat" message 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"></div>
<div class="bottom uuid">{{ uuid }}</div>
</core-toolbar>
<section id="onlineList" layout vertical>
<core-item label="Online Now" class="subdue" layout horizontal center></core-item>
<template repeat="{{cat in cats}}"></template>
</section>
</core-header-panel>
<div tool layout horizontal flex>
<div flex>Kitteh Anonymous</div>
<core-icon icon="account-circle"></core-icon>
<span>{{ occupancy }}</span>
</div>
<section id="chat" layout vertical fit>
<div flex class="chat-list">
<template repeat="{{message in messageList}}"></template>
</div>
<div class="shim"></div>
<div class="send-message" layout horizontal>
<paper-input label="Type message..." value="{{ input }}" id="input" flex on-keyup="{{ checkKey }}"></paper-input>
<paper-fab icon="send" id="sendButton" on-tap="{{ sendMyMessage }}"></paper-fab>
</div>
</section>
</core-scaffold>
</template>
<script>
Polymer({
input: ''
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment