Skip to content

Instantly share code, notes, and snippets.

@dhindurthy
Last active March 23, 2018 19:20
Show Gist options
  • Save dhindurthy/1a67d6345ac76c77a2f733cc252508c3 to your computer and use it in GitHub Desktop.
Save dhindurthy/1a67d6345ac76c77a2f733cc252508c3 to your computer and use it in GitHub Desktop.
skeleton-loading
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['appName'],
appName: 'Anmals'
});
import Ember from 'ember';
const {
run: { later },
RSVP: { Promise }
} = Ember;
export default Ember.Route.extend({
queryParams: {
appName: { refreshModel: true }
},
model() {
return new Promise((resolve, reject) => {
later(null, resolve, 7000);
});
}
});
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
img{
margin-right:10px;
}
.app-name{
//border:1px solid black;
background-color:#E7E4E4;
width:30%;
height:20px;
}
.category{
display:flex;
}
.image {
//border:1px solid black;
background-color:#E7E4E4;
width:30px;
height:30px;
margin-right:10px;
}
.category-name{
//border:1px solid black;
background-color:#E7E4E4;
width:20%;
height:15px;
}
.item{
//border:1px solid black;
background-color:#E7E4E4;
width:10%;
height:10px;
margin:3px;
}
<h3 class="app-name"></h3>
<h4 class="category"><div class="image"></div><div class="category-name"></div></h4>
<ul>
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
</ul>
<br>
<h4 class="category"><div class="image"></div><div class="category-name"></div></h4>
<ul>
<li class="item"></li>
</ul>
<h3>{{appName}}, welcome to my app!</h3>
<h4><img src="smiley.gif" height="30" width="30">Vertebrates</h4>
<ul>
<li>Mammals</li>
<li>Birds</li>
<li>Fish</li>
<li>Reptiles</li>
</ul>
<h4><img src="smiley.gif" height="30" width="30">Invertebrates</h4>
<ul>
<li>Insects</li>
</ul>
<br>
{{outlet}}
<br>
<br>
Change app name:
<input type="text" value={{appName}} oninput={{action (mut appName) value="target.value"}}>
{
"version": "0.13.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "2.16.2",
"ember-template-compiler": "2.16.2",
"ember-testing": "2.16.2"
},
"addons": {
"ember-data": "2.16.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment