Last active
October 26, 2015 21:44
-
-
Save alexnorton/a4927b162a43a2d13645 to your computer and use it in GitHub Desktop.
Example Mozart components
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
{ | |
"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": [] | |
} |
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
{ | |
"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