Sencha Touch 2

by bradleytrager

HTML

<link rel="stylesheet" href="http://cdn.sencha.io/touch/sencha-touch-2.1.0/resources/css/sencha-touch.css">
<script src="http://cdn.sencha.io/touch/sencha-touch-2.1.0/sencha-touch-all.js"></script>

CSS

html {
    overflow: hidden
}
.home {
    text-align: center;
}
.home img {
    width: 64%;
}
.home h1 {
    font-weight: bold;
    font-size: 1.2em;
}
.home p {
    color: #666;
    font-size: 0.8em;
    line-height: 1.5em;
    margin: 10px 20px 12px 20px;
}
.home h2 {
    color: #999;
    font-size: 0.7em;
}
.twitterView .x-dataview-item {
    padding: 10px;
    min-height: 50px;
}
.twitterView .x-dataview-item img {
    float: left;
    display: block;
    margin-top: 36px;
}
.twitterView .x-dataview-item h2 {
    font-weight: bold;
    color: #333;
    margin: 0px 0px 10px 60px;
}
.twitterView .x-dataview-item p {
    color: #666;
    margin-left: 60px;
    font-size: 0.8em;
}
/*used in the dataview guide*/
 .my-dataview-item {
    background: #ddd;
    padding: 1em;
    border-bottom: 1px solid #ccc;
}
.my-dataview-item img {
    float: left;
    margin-right: 1em;
}
.my-dataview-item h2 {
    font-weight: bold;
}

JavaScript

Ext.application({
    name: 'Sencha',
    launch: function () {
        var list = Ext.create('Ext.List', {
            //fullscreen: true,
            itemTpl: '{title}',
            data: [{
                title: 'Item 1'
            }, {
                title: 'Item 2'
            }, {
                title: 'Item 3'
            }, {
                title: 'Item 4'
            }]
        });
       
        Ext.Viewport.add([list]);
    }
});