mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-22 01:02:23 -05:00
Add 'connecting' indicator on first load.
This commit is contained in:
parent
49d5f8e692
commit
48cc126bac
10
clientapp/template.html
Normal file
10
clientapp/template.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="#{cssFileName}" />
|
||||
<script src="#{jsFileName}"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>Connecting</p>
|
||||
</body>
|
||||
</html>
|
@ -12,7 +12,7 @@ exports.pages = {};
|
||||
exports.body = function anonymous(locals) {
|
||||
var buf = [];
|
||||
with (locals || {}) {
|
||||
buf.push('<body><div class="wrap"><div id="reconnect"></div><header id="me"><img class="avatar"/><p class="status"></p></header><nav class="main"><li><a href="/logout">Logout</a></li><li><a href="/">Home</a></li></nav><nav id="contactList"></nav><section id="pages"></section><footer></footer></div></body>');
|
||||
buf.push('<body><div class="wrap"><aside id="connectionStatus"><button class="reconnect">Reconnect</button><span class="message">disconnected</span></aside><div id="connectionOverlay"></div><header id="me"><img class="avatar"/><p class="status"></p></header><nav class="main"><li><a href="/logout">Logout</a></li><li><a href="/">Home</a></li></nav><nav id="contactList"></nav><section id="pages"></section><footer></footer></div></body>');
|
||||
}
|
||||
return buf.join("");
|
||||
};
|
||||
@ -71,7 +71,7 @@ exports.pages.chat = function anonymous(locals) {
|
||||
exports.pages.main = function anonymous(locals) {
|
||||
var buf = [];
|
||||
with (locals || {}) {
|
||||
buf.push('<section class="page main"></section>');
|
||||
buf.push('<section class="page main"><p>This space intentionally left blank.</p></section>');
|
||||
}
|
||||
return buf.join("");
|
||||
};
|
||||
|
@ -1,6 +1,9 @@
|
||||
body
|
||||
.wrap
|
||||
#reconnect
|
||||
aside#connectionStatus
|
||||
button.reconnect Reconnect
|
||||
span.message disconnected
|
||||
#connectionOverlay
|
||||
header#me
|
||||
img.avatar
|
||||
p.status
|
||||
|
@ -1 +1,2 @@
|
||||
section.page.main
|
||||
p This space intentionally left blank.
|
||||
|
@ -12,7 +12,7 @@ module.exports = HumanView.extend({
|
||||
'click a[href]': 'handleLinkClick'
|
||||
},
|
||||
classBindings: {
|
||||
connected: '#reconnect'
|
||||
connected: '#connectionOverlay'
|
||||
},
|
||||
render: function () {
|
||||
$('head').append(templates.head());
|
||||
|
@ -15,9 +15,8 @@ html, body {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#reconnect {
|
||||
#connectionOverlay {
|
||||
z-index: 5000;
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
height: 100%;
|
||||
@ -25,7 +24,7 @@ html, body {
|
||||
background-color: rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
#reconnect.connected {
|
||||
#connectionOverlay {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -195,7 +194,7 @@ nav.main a {
|
||||
overflow-x: hidden;
|
||||
position: relative;
|
||||
margin-top: 50px;
|
||||
padding-top: 50px;
|
||||
padding-top: 30px;
|
||||
bottom: 50px;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user