1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

Added files

This commit is contained in:
2015-06-25 16:28:41 -05:00
parent 656dca9289
commit eb27b55a54
5621 changed files with 1630154 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<connectionAlert:>
<div class="connection">
<!--
connected and canConnect are built-in properties of model. If a variable
is not defined in the current context, it will be looked up in the model
data and the model properties
-->
{#unless connected}
<p class="alert">
{#if canConnect}
<!-- Leading space is removed, and trailing space is maintained -->
Offline
<!-- a :self path alias is automatically created per component -->
{#unless :self.hideReconnect}
&ndash; <a x-bind="click:connect">Reconnect</a>
{/}
{else}
Unable to reconnect &ndash; <a x-bind="click:reload">Reload</a>
{/}
</p>
{/}
</div>

View File

@@ -0,0 +1,13 @@
exports.connect = function() {
model = this.model
// Hide the reconnect link for a second after clicking it
model.set('hideReconnect', true)
setTimeout(function() {
model.set('hideReconnect', false)
}, 1000)
model.socket.socket.connect()
}
exports.reload = function() {
window.location.reload()
}

View File

@@ -0,0 +1,14 @@
var config = {
filename: __filename
, styles: '../styles/ui'
, scripts: {
connectionAlert: require('./connectionAlert')
}
};
module.exports = ui
ui.decorate = 'derby'
function ui(derby, options) {
derby.createLibrary(config, options)
}