Created
February 29, 2012 09:10
-
-
Save pure/1939349 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title></title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://github.com/pure/pure/raw/master/libs/pure.js"></script> | |
</head> | |
<body> | |
<div id="App"> | |
<header> | |
<nav class="nav-header"> | |
<ul> | |
<li><a href="#"></a></li> | |
</ul> | |
</nav> | |
</header> | |
<div class="main" data-role="main"> | |
</div> | |
<footer> | |
<nav class="nav-footer"> | |
<ul> | |
<li><a href="#"></a></li> | |
</ul> | |
</nav> | |
</footer> | |
</div> | |
<script> | |
var dummyData = { | |
header : { | |
nav : [ | |
{href:'#1', title:'Home' }, | |
{href:'#2', title:'Contact'}, | |
{href:'#3', title:'About'} | |
], | |
'logo' : 'logo.png' | |
}, | |
content : 'Lorem Ipsum Meh', | |
footer : 'by sam3k' | |
}; | |
var dummyDirectives = { | |
'header li' : { | |
'link<-header.nav' : { | |
'a':'link.title' | |
} | |
}, | |
'div.main' : 'content', | |
'footer' : 'footer' | |
}; | |
$('#App').directives(dummyDirectives).render(dummyData); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment