1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2025-01-12 06:08:23 -05:00

More style updates

This commit is contained in:
Lance Stout 2013-08-23 16:02:50 -07:00
parent e2680579a2
commit d56afc0611
10 changed files with 57 additions and 33965 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -47,12 +47,15 @@ module.exports = function (client, app) {
client.on('*', function (name, data) { client.on('*', function (name, data) {
log(name, data); log(name, data);
if (data && data.toJSON) {
var msg = data.toJSON();
window.postMessage(JSON.stringify(msg), '*');
}
}); });
client.on('disconnected', function () { //client.on('disconnected', function () {
client.connect(); // client.connect();
}); //});
client.on('session:started', function (jid) { client.on('session:started', function (jid) {
me.jid = jid; me.jid = jid;

View File

@ -79,12 +79,8 @@ module.exports = StrictModel.extend({
fetchHistory: function () { fetchHistory: function () {
var self = this; var self = this;
var time = new Date(Date.now());
var yesterday = new Date(time.valueOf() + time.getTimezoneOffset() * 6000 - 86400000);
client.getHistory({ client.getHistory({
with: this.jid, with: this.jid,
start: yesterday,
rsm: { rsm: {
count: 20, count: 20,
before: true before: true

View File

@ -11,8 +11,11 @@ module.exports = BasePage.extend({
initialize: function (spec) { initialize: function (spec) {
this.render(); this.render();
}, },
imageBindings: {
avatar: 'header .avatar'
},
contentBindings: { contentBindings: {
name: 'h1.name' name: 'header .name'
}, },
render: function () { render: function () {
this.basicRender(); this.basicRender();

View File

@ -422,8 +422,7 @@ Client.prototype.sendMessage = function (data) {
} }
var message = new Message(data); var message = new Message(data);
this.emit('message:sent', message); this.send(new Message(data));
this.send(message);
}; };
Client.prototype.sendPresence = function (data) { Client.prototype.sendPresence = function (data) {

View File

@ -6,7 +6,6 @@ var jade=function(exports){Array.isArray||(Array.isArray=function(arr){return"[o
// create our folder objects // create our folder objects
exports.dialogs = {};
exports.includes = {}; exports.includes = {};
exports.pages = {}; exports.pages = {};
@ -55,7 +54,7 @@ exports.layout = function anonymous(locals) {
exports.pages.info = function anonymous(locals) { exports.pages.info = function anonymous(locals) {
var buf = []; var buf = [];
with (locals || {}) { with (locals || {}) {
buf.push('<section class="page info"><nav id="contactList"></nav><h1 class="name"></h1><ul id="conversation"></ul></section>'); buf.push('<section class="page info"><nav id="contactList"></nav><header class="contactInfo"><img width="30" height="30" class="avatar"/><h1 class="name"></h1></header><ul id="conversation"></ul></section>');
} }
return buf.join(""); return buf.join("");
}; };

View File

@ -1,4 +1,6 @@
section.page.info section.page.info
nav#contactList nav#contactList
h1.name header.contactInfo
img.avatar(width=30, height=30)
h1.name
ul#conversation ul#conversation

View File

@ -7,7 +7,11 @@ html, body {
} }
#pages { #pages {
margin-left: 205px; margin-left: 201px;
}
#log {
padding: 5px;
} }
#contactList { #contactList {
@ -130,7 +134,6 @@ html, body {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
box-sizing: border-box;
width: 100%; width: 100%;
display: block; display: block;
} }
@ -144,9 +147,8 @@ html, body {
padding-right: 10px; padding-right: 10px;
min-width: 20px; min-width: 20px;
width: 100%; width: 100%;
box-sizing: border-box; border-bottom: 1px solid #ccc;
border-bottom: 1px solid #B5CB9F; /* background: #f1fce7; */
background: #f1fce7;
} }
#conversation .body { #conversation .body {
@ -164,21 +166,17 @@ html, body {
#conversation .timestamp { #conversation .timestamp {
font-size: 11px; font-size: 11px;
border: 1px solid rgba(215,215,215,0); color: #bbb;
color: #B5CB9F;
font-weight: bold; font-weight: bold;
float: right; float: right;
padding: 1px 5px;
border-radius: 5px;
box-shadow: rgba(0,0,0,0) 0 -1px 1px;
text-decoration: none !important;
text-shadow: none;
display: block; display: block;
margin-right: 15px;
} }
#conversation .mine .timestamp { #conversation .mine .timestamp {
color: #BBE0FA; color: #BBE0FA;
} }
.delayed .timestamp:before { .delayed .timestamp:before {
content: '@ ' content: '@ '
} }
@ -187,3 +185,31 @@ html, body {
content: 'edited ' content: 'edited '
} }
.contactInfo {
padding: 5px;
background-image: #bccad0;
background-image: -moz-linear-gradient(top, #bccad0, #95a4a9);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #bccad0), color-stop(1, #95a4a9));
min-height: 30px;
position: relative;
}
.contactInfo .avatar {
float: left;
margin-right: 5px;
border-radius: 5px;
width: 30px;
height: 30px;
position: absolute;
top: 10px;
left: 10px;
}
.contactInfo .name {
margin-left: 50px;
font-size: 14px;
}
#me {
display: none;
}

View File

@ -47,6 +47,9 @@ var clientApp = new Moonboots({
server: app server: app
}); });
app.get('test', function (req, res) {
res.send('<html></html>');
});
// serves app on every other url // serves app on every other url
app.get('*', clientApp.html()); app.get('*', clientApp.html());