Skip to content

Instantly share code, notes, and snippets.

@alexnorton
Last active October 26, 2015 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexnorton/a4927b162a43a2d13645 to your computer and use it in GitHub Desktop.
Save alexnorton/a4927b162a43a2d13645 to your computer and use it in GitHub Desktop.
Example Mozart components
{
"head": [
"<style>body { font-family: \"Helvetica\", \"Arial\", sans-serif; margin: 0; } #header { background-color: #bb1919; color: white; font-size: 48px; padding: 10px 0; font-family: \"Gill Sans\"; text-align: center; }</style>"
],
"bodyInline": "<div id=\"header\">BBC NEWS</div>",
"bodyLast": []
}
{
"head": [
"<style>#content { margin: 0 auto; max-width: 700px; } img { height:100px; padding: 2px; }</style>",
"<script src=\"https://code.jquery.com/jquery-2.1.4.min.js\"></script>"
],
"bodyInline":
"<div id=\"content\"><h2>Demo page</h2><p>Hello, world!</p><p>There should be kittens here:</p><div id=\"kittens\"></div></div>",
"bodyLast": [
"<script>$.ajax('https://api.flickr.com/services/feeds/photos_public.gne?format=json&tags=kittens',{dataType: 'jsonp', jsonp: false, jsonpCallback: 'jsonFlickrFeed'}).success(function(data){for(var i=0; i<10; i++) {$(document.createElement('img')).attr('src', data.items[i].media.m).appendTo('#kittens');}});</script>"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment