Skip to content

Instantly share code, notes, and snippets.

@alexander-alvarez
Created April 11, 2017 21:43
Show Gist options
  • Save alexander-alvarez/52b5ff8ef9a1ca3db713684cdfd4e5a2 to your computer and use it in GitHub Desktop.
Save alexander-alvarez/52b5ff8ef9a1ca3db713684cdfd4e5a2 to your computer and use it in GitHub Desktop.
ember-scrollable horizontal
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
<style>
.horizontal-demo .tse-scrollable{height:110px}
.horizontal-demo .tse-scrollable .scrollable-content{
display:inline-block;
height:110px;
white-space:nowrap
}
.horizontal-demo .tse-scrollable ul {
list-style-type:none;
margin:0;
overflow:auto;
padding-left:0;
}
.horizontal-demo .tse-scrollable ul>li{
background:#666;color:#fff;
display:inline-block;
font-size:24px;
height:100px;
line-height:100px;
margin-right:10px;
text-align:center;
width:100px;
}
</style>
<section class="horizontal-demo">
{{#ember-scrollable horizontal=true}}
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
</ul>
{{/ember-scrollable}}
</section>
<br>
{
"version": "0.12.1",
"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.12.0",
"ember-template-compiler": "2.12.0",
"ember-testing": "2.12.0"
},
"addons": {
"ember-data": "2.12.1",
"ember-scrollable": "*"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment