Skip to content

Instantly share code, notes, and snippets.

@rblalock
rblalock / nativebutton.css
Created October 26, 2010 04:42
Native OS looking CSS3 button
.nativebutton {
display: inline-block;
margin: 20px;
padding: 3px 6px;
font-family: 'Lucida Grande', Arial, sans-serif;
font-size: 13px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
@rblalock
rblalock / csslogo.css
Created October 26, 2010 04:43
A CSS3 driven logo
h1 {
position: relative;
font-size: 200px;
margin-top: 0;
font-family: 'Myriad-Pro', 'Myriad', helvetica, arial, sans-serif;
text-shadow: 2px 3px 3px #292929;
letter-spacing: -7px;
-webkit-text-stroke: 1px white;
}
@rblalock
rblalock / clearfix.css
Created October 26, 2010 04:44
The all important clearfix
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
.clearfix:after {
clear: both;
@rblalock
rblalock / logo.css
Created October 26, 2010 04:45
Type logo css layout
h1#logo {
margin:0;
position:absolute;
top: 0;
}
h1#logo a {
background:transparent url(../images/logo.jpg) no-repeat scroll 0 0;
display:block;
width: 284px;
@rblalock
rblalock / htmlshim.html
Created October 26, 2010 04:46
The html5 shim for IE
<style>
/* CSS */
header, footer, article, section, nav, menu, hgroup {
display: block;
}
</style>
<script>
// Javascript to make IE recognize the elements
document.createElement("article");
@rblalock
rblalock / joomlasvn.sh
Created October 26, 2010 04:47
Quick SVN checkout of latest Joomla version
svn export --force --username anonymous http://joomlacode.org/svn/joomla/development/releases/1.5 .
@rblalock
rblalock / datetimepicker.js
Created October 26, 2010 04:48
Date / time picker for Titanium
// Label
var label = Ti.UI.createLabel({
text: 'Due Date',
top: 10,
left: 10,
height: 30,
color: '#333',
font: { fontWeight: 'bold', fontSize: 20 },
shadowColor:'#eee',
shadowOffset:{x: 0, y: 1}
@rblalock
rblalock / tableview.js
Created October 26, 2010 04:48
Typical table layout code block
var rows = [{text: 'Something here'}];
var row = Titanium.UI.createTableViewRow({
height: '50',
backgroundColor: '#eee'
});
rows.push(row);
// Create the table with populated data
@rblalock
rblalock / sample1.json
Created October 26, 2010 17:39
1 - Sample json feed for titanium layout control
{
Colors: {
someColor: '#333',
otherColor: '#777'
}
}
@rblalock
rblalock / sample1.js
Created October 26, 2010 17:42
Sample titanium searchbar with remote change of layout
var searchbar = Ti.UI.createSearchBar({
showCancel: true,
barColor: '#7CA122' // This is the default color if no remote source is used / found
});
// get the colors.json source
Ajax.xhr('GET', '', 'http://localhost/colors.json', function(data) {
searchbar.barColor = data.Colors.someColor; // change the searchbar color
win.barColor = data.Colors.otherColor; // change the window bar color
});