{"action":"opened","number":28,"pull_request":{"url":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28","id":207133544,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MTMzNTQ0","html_url":"https://github.com/shiffman/natureofcode.com/pull/28","diff_url":"https://github.com/shiffman/natureofcode.com/pull/28.diff","patch_url":"https://github.com/shiffman/natureofcode.com/pull/28.patch","issue_url":"https://api.github.com/repos/shiffman/natureofcode.com/issues/28","number":28,"state":"open","locked":false,"title":"Adding support for new p5 sketches etc.","user":{"login":"nelliemckesson","id":812739,"node_id":"MDQ6VXNlcjgxMjczOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/812739?v=4","gravatar_id":"","url":"https://api.github.com/users/nelliemckesson","html_url":"https://github.com/nelliemckesson","followers_url":"https://api.github.com/users/nelliemckesson/followers","following_url":"https://api.github.com/users/nelliemckesson/following{/other_user}","gists_url":"https://api.github.com/users/nelliemckesson/gists{/gist_id}","starred_url":"https://api.github.com/users/nelliemckesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelliemckesson/subscriptions","organizations_url":"https://api.github.com/users/nelliemckesson/orgs","repos_url":"https://api.github.com/users/nelliemckesson/repos","events_url":"https://api.github.com/users/nelliemckesson/events{/privacy}","received_events_url":"https://api.github.com/users/nelliemckesson/received_events","type":"User","site_admin":false},"body":"Alriiight, so here's the corresponding code to go with the magicbook p5 iframe stuff. Some notes and questions:\r\n\r\n* I couldn't find the HTML template you're using for the website chapter files (to add all the header info, etc.). Someone (me? you?) will need to add the following script tags to the header, for all of the website chapter files:\r\n\r\n```js\r\n<script type=\"text/javascript\" src=\"https://natureofcode.com/book/javascripts/jquery.lazyloadxt.extra.min.js\"></script>\r\n<script type=\"text/javascript\" src=\"https://natureofcode.com/book/javascripts/size-iframes.js\"></script>\r\n```\r\n\r\nThe first script is a lazy-loading library that will work with the iframes. The second is a custom js file I wrote to scale/resize two-col and three-col processing blocks (plus captions).\r\n\r\n* I made a few very minor tweaks to the current CSS. I think it looks pretty good, tbh, and doesn't need much. I pulled over one or two things from the new CSS that I thought looked nice and added support for the iframes and a few magicbook code changes (sections, examples), but otherwise left it as-is. See how you feel about it and let me know if you think there's anything that looks weird!\r\n\r\n* During testing, I noticed the code blocks didn't seem to be converting the same way that they did in the previous version of the book. My process was to run the magicbook build, and then simply copy the chapter content into the general chapter template (which I got by just copying the HTML of one of the rendered chapters on the current live book site). Figured I'd check with you first to see if there's an extra step that needs to happen to get the code to convert before I start troubleshooting any further.","created_at":"2018-08-08T20:50:14Z","updated_at":"2018-08-08T20:50:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28/commits","review_comments_url":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28/comments","review_comment_url":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shiffman/natureofcode.com/issues/28/comments","statuses_url":"https://api.github.com/repos/shiffman/natureofcode.com/statuses/047f67f9b9813e7ff201a10852883524d822774b","head":{"label":"nelliemckesson:gh-pages","ref":"gh-pages","sha":"047f67f9b9813e7ff201a10852883524d822774b","user":{"login":"nelliemckesson","id":812739,"node_id":"MDQ6VXNlcjgxMjczOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/812739?v=4","gravatar_id":"","url":"https://api.github.com/users/nelliemckesson","html_url":"https://github.com/nelliemckesson","followers_url":"https://api.github.com/users/nelliemckesson/followers","following_url":"https://api.github.com/users/nelliemckesson/following{/other_user}","gists_url":"https://api.github.com/users/nelliemckesson/gists{/gist_id}","starred_url":"https://api.github.com/users/nelliemckesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelliemckesson/subscriptions","organizations_url":"https://api.github.com/users/nelliemckesson/orgs","repos_url":"https://api.github.com/users/nelliemckesson/repos","events_url":"https://api.github.com/users/nelliemckesson/events{/privacy}","received_events_url":"https://api.github.com/users/nelliemckesson/received_events","type":"User","site_admin":false},"repo":{"id":144064069,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQwNjQwNjk=","name":"natureofcode.com","full_name":"nelliemckesson/natureofcode.com","owner":{"login":"nelliemckesson","id":812739,"node_id":"MDQ6VXNlcjgxMjczOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/812739?v=4","gravatar_id":"","url":"https://api.github.com/users/nelliemckesson","html_url":"https://github.com/nelliemckesson","followers_url":"https://api.github.com/users/nelliemckesson/followers","following_url":"https://api.github.com/users/nelliemckesson/following{/other_user}","gists_url":"https://api.github.com/users/nelliemckesson/gists{/gist_id}","starred_url":"https://api.github.com/users/nelliemckesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nelliemckesson/subscriptions","organizations_url":"https://api.github.com/users/nelliemckesson/orgs","repos_url":"https://api.github.com/users/nelliemckesson/repos","events_url":"https://api.github.com/users/nelliemckesson/events{/privacy}","received_events_url":"https://api.github.com/users/nelliemckesson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nelliemckesson/natureofcode.com","description":"Repo for web files for nature of code","fork":true,"url":"https://api.github.com/repos/nelliemckesson/natureofcode.com","forks_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/forks","keys_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/teams","hooks_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/hooks","issue_events_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/issues/events{/number}","events_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/events","assignees_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/assignees{/user}","branches_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/branches{/branch}","tags_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/tags","blobs_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/statuses/{sha}","languages_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/languages","stargazers_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/stargazers","contributors_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/contributors","subscribers_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/subscribers","subscription_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/subscription","commits_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/contents/{+path}","compare_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/merges","archive_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/downloads","issues_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/issues{/number}","pulls_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/pulls{/number}","milestones_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/milestones{/number}","notifications_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/labels{/name}","releases_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/releases{/id}","deployments_url":"https://api.github.com/repos/nelliemckesson/natureofcode.com/deployments","created_at":"2018-08-08T20:26:55Z","updated_at":"2018-08-08T20:41:03Z","pushed_at":"2018-08-08T20:41:02Z","git_url":"git://github.com/nelliemckesson/natureofcode.com.git","ssh_url":"git@github.com:nelliemckesson/natureofcode.com.git","clone_url":"https://github.com/nelliemckesson/natureofcode.com.git","svn_url":"https://github.com/nelliemckesson/natureofcode.com","homepage":null,"size":38168,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"shiffman:gh-pages","ref":"gh-pages","sha":"004c553d5ee8a1eaff208938fff0860cdb0a351a","user":{"login":"shiffman","id":191758,"node_id":"MDQ6VXNlcjE5MTc1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/191758?v=4","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false},"repo":{"id":5331264,"node_id":"MDEwOlJlcG9zaXRvcnk1MzMxMjY0","name":"natureofcode.com","full_name":"shiffman/natureofcode.com","owner":{"login":"shiffman","id":191758,"node_id":"MDQ6VXNlcjE5MTc1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/191758?v=4","gravatar_id":"","url":"https://api.github.com/users/shiffman","html_url":"https://github.com/shiffman","followers_url":"https://api.github.com/users/shiffman/followers","following_url":"https://api.github.com/users/shiffman/following{/other_user}","gists_url":"https://api.github.com/users/shiffman/gists{/gist_id}","starred_url":"https://api.github.com/users/shiffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiffman/subscriptions","organizations_url":"https://api.github.com/users/shiffman/orgs","repos_url":"https://api.github.com/users/shiffman/repos","events_url":"https://api.github.com/users/shiffman/events{/privacy}","received_events_url":"https://api.github.com/users/shiffman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shiffman/natureofcode.com","description":"Repo for web files for nature of code","fork":false,"url":"https://api.github.com/repos/shiffman/natureofcode.com","forks_url":"https://api.github.com/repos/shiffman/natureofcode.com/forks","keys_url":"https://api.github.com/repos/shiffman/natureofcode.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shiffman/natureofcode.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shiffman/natureofcode.com/teams","hooks_url":"https://api.github.com/repos/shiffman/natureofcode.com/hooks","issue_events_url":"https://api.github.com/repos/shiffman/natureofcode.com/issues/events{/number}","events_url":"https://api.github.com/repos/shiffman/natureofcode.com/events","assignees_url":"https://api.github.com/repos/shiffman/natureofcode.com/assignees{/user}","branches_url":"https://api.github.com/repos/shiffman/natureofcode.com/branches{/branch}","tags_url":"https://api.github.com/repos/shiffman/natureofcode.com/tags","blobs_url":"https://api.github.com/repos/shiffman/natureofcode.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shiffman/natureofcode.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shiffman/natureofcode.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/shiffman/natureofcode.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shiffman/natureofcode.com/statuses/{sha}","languages_url":"https://api.github.com/repos/shiffman/natureofcode.com/languages","stargazers_url":"https://api.github.com/repos/shiffman/natureofcode.com/stargazers","contributors_url":"https://api.github.com/repos/shiffman/natureofcode.com/contributors","subscribers_url":"https://api.github.com/repos/shiffman/natureofcode.com/subscribers","subscription_url":"https://api.github.com/repos/shiffman/natureofcode.com/subscription","commits_url":"https://api.github.com/repos/shiffman/natureofcode.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/shiffman/natureofcode.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/shiffman/natureofcode.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/shiffman/natureofcode.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/shiffman/natureofcode.com/contents/{+path}","compare_url":"https://api.github.com/repos/shiffman/natureofcode.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shiffman/natureofcode.com/merges","archive_url":"https://api.github.com/repos/shiffman/natureofcode.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shiffman/natureofcode.com/downloads","issues_url":"https://api.github.com/repos/shiffman/natureofcode.com/issues{/number}","pulls_url":"https://api.github.com/repos/shiffman/natureofcode.com/pulls{/number}","milestones_url":"https://api.github.com/repos/shiffman/natureofcode.com/milestones{/number}","notifications_url":"https://api.github.com/repos/shiffman/natureofcode.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shiffman/natureofcode.com/labels{/name}","releases_url":"https://api.github.com/repos/shiffman/natureofcode.com/releases{/id}","deployments_url":"https://api.github.com/repos/shiffman/natureofcode.com/deployments","created_at":"2012-08-07T17:50:51Z","updated_at":"2018-06-10T14:29:37Z","pushed_at":"2018-06-10T14:29:35Z","git_url":"git://github.com/shiffman/natureofcode.com.git","ssh_url":"git@github.com:shiffman/natureofcode.com.git","clone_url":"https://github.com/shiffman/natureofcode.com.git","svn_url":"https://github.com/shiffman/natureofcode.com","homepage":null,"size":38168,"stargazers_count":54,"watchers_count":54,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":11,"license":null,"forks":7,"open_issues":11,"watchers":54,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28"},"html":{"href":"https://github.com/shiffman/natureofcode.com/pull/28"},"issue":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/issues/28"},"comments":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/shiffman/natureofcode.com/statuses/047f67f9b9813e7ff201a10852883524d822774b"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":3,"additions":143,"deletions":25,"changed_files":3}}
{"actor":{"display_login":"nelliemckesson"}}