mirror of
https://github.com/fazo96/markcloud.git
synced 2025-01-10 11:04:21 +01:00
added spinner
This commit is contained in:
parent
0189dec725
commit
cac43cb4c0
@ -10,4 +10,5 @@ coffeescript
|
||||
less
|
||||
perak:markdown
|
||||
natestrauser:font-awesome
|
||||
mrt:moment
|
||||
|
||||
|
@ -36,6 +36,7 @@ minimongo@1.0.3
|
||||
mizzao:bootstrap-3@3.2.0_1
|
||||
mobile-status-bar@1.0.0
|
||||
mongo@1.0.6
|
||||
mrt:moment@2.8.1
|
||||
natestrauser:font-awesome@4.2.0
|
||||
observe-sequence@1.0.2
|
||||
ordered-dict@1.0.0
|
||||
|
@ -7,6 +7,10 @@ Router.map ->
|
||||
@route 'home',
|
||||
path: '/'
|
||||
waitOn: -> Meteor.subscribe 'docs'
|
||||
action: ->
|
||||
if !@ready()
|
||||
@render(); @render 'spinner', to: 'outside'
|
||||
else @render()
|
||||
@route 'doc',
|
||||
path: '/d/:_id'
|
||||
layoutTemplate: 'docLayout'
|
||||
@ -18,6 +22,8 @@ Router.map ->
|
||||
else @render 'loading'
|
||||
@route 'new'
|
||||
|
||||
Template.layout.showSpinner = ->
|
||||
Meteor.status().connected is no or Router.current().ready() is no
|
||||
Template.home.ndocs = -> docs.find().count()
|
||||
Template.new.events
|
||||
'click #new-btn': (e,t) ->
|
||||
|
@ -2,6 +2,12 @@
|
||||
max-width: 40em;
|
||||
}
|
||||
|
||||
#spinner {
|
||||
position: fixed;
|
||||
right: 1em;
|
||||
top: 1em;
|
||||
}
|
||||
|
||||
#new-btn {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<template name="layout">
|
||||
{{> yield region="outside"}}
|
||||
<div class="container">
|
||||
<h1>MarkCloud</h1>
|
||||
<hr>
|
||||
@ -21,6 +22,7 @@
|
||||
</template>
|
||||
|
||||
<template name="docLayout">
|
||||
{{> yield region="outside"}}
|
||||
<div class="container">{{> yield}}</div>
|
||||
</template>
|
||||
|
||||
@ -31,7 +33,13 @@
|
||||
</template>
|
||||
|
||||
<template name="loading">
|
||||
<div class="text-center">
|
||||
<i class="fa fa-cog fa-spin fa-3x"></i>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<i class="fa fa-cog fa-spin fa-3x"></i>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template name="spinner">
|
||||
<div id="spinner">
|
||||
<i class="fa fa-2x fa-cog fa-spin"></i>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user