{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/comments/200191948","pull_request_review_id":134459654,"id":200191948,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDE5MTk0OA==","diff_hunk":"@@ -75,11 +33,44 @@\n   };\n \n \n-  var PICTURES = generatePictures(PICS_AMOUNT);\n-  var pictureElements = createPictureElements(PICTURES);\n+  var onLoad = function (data) {\n+    var pictures = createPictureElements(data);\n+    renderElement(pictures, picturesList);\n+\n+    // Обработчик открытия превью при нажатии на миниатюру изображения\n+    var onSmallPictureClick = function (evt) {\n+      var pictureLinks = document.querySelectorAll('.picture__link');\n+      var target = evt.target;\n+      var index;\n+      var a = target.closest('a.picture__link');\n+      if (!a || !picturesList.contains(a)) {\n+        return;\n+      }\n+      for (var i = 0; i < pictureLinks.length; i++) {\n+        if (a === pictureLinks[i]) {\n+          index = i;\n+        }\n+      }\n+      window.openPreview(data[index]);\n+    };\n+\n+    picturesList.addEventListener('click', onSmallPictureClick);\n+\n+  };\n+\n+  var onError = function (message) {\n+    var node = document.createElement('div');\n+    node.style = 'z-index: 100; margin: 0 auto; padding: 25px; text-align: center; color: red; background-color: #fff;';\n+    node.style.position = 'absolute';","path":"js/pictures.js","position":86,"original_position":86,"commit_id":"5eeb10f7bad94f2ced4098278172813b5b1705dc","original_commit_id":"5eeb10f7bad94f2ced4098278172813b5b1705dc","user":{"login":"evgen3","id":12950683,"node_id":"MDQ6VXNlcjEyOTUwNjgz","avatar_url":"https://avatars0.githubusercontent.com/u/12950683?v=4","gravatar_id":"","url":"https://api.github.com/users/evgen3","html_url":"https://github.com/evgen3","followers_url":"https://api.github.com/users/evgen3/followers","following_url":"https://api.github.com/users/evgen3/following{/other_user}","gists_url":"https://api.github.com/users/evgen3/gists{/gist_id}","starred_url":"https://api.github.com/users/evgen3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgen3/subscriptions","organizations_url":"https://api.github.com/users/evgen3/orgs","repos_url":"https://api.github.com/users/evgen3/repos","events_url":"https://api.github.com/users/evgen3/events{/privacy}","received_events_url":"https://api.github.com/users/evgen3/received_events","type":"User","site_admin":false},"body":"мне кажется, что стоит передать все стили строкой, как сверху","created_at":"2018-07-04T19:27:50Z","updated_at":"2018-07-04T19:32:19Z","html_url":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7#discussion_r200191948","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/comments/200191948"},"html":{"href":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7#discussion_r200191948"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7","id":199286485,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5Mjg2NDg1","html_url":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7","diff_url":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7.diff","patch_url":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/7","number":7,"state":"open","locked":false,"title":"Личный проект: надо подкачаться","user":{"login":"maximus-dr","id":25801968,"node_id":"MDQ6VXNlcjI1ODAxOTY4","avatar_url":"https://avatars0.githubusercontent.com/u/25801968?v=4","gravatar_id":"","url":"https://api.github.com/users/maximus-dr","html_url":"https://github.com/maximus-dr","followers_url":"https://api.github.com/users/maximus-dr/followers","following_url":"https://api.github.com/users/maximus-dr/following{/other_user}","gists_url":"https://api.github.com/users/maximus-dr/gists{/gist_id}","starred_url":"https://api.github.com/users/maximus-dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximus-dr/subscriptions","organizations_url":"https://api.github.com/users/maximus-dr/orgs","repos_url":"https://api.github.com/users/maximus-dr/repos","events_url":"https://api.github.com/users/maximus-dr/events{/privacy}","received_events_url":"https://api.github.com/users/maximus-dr/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: надо подкачаться](https://up.htmlacademy.ru/javascript/14/user/318987/tasks/22)\n\n:boom: https://htmlacademy-javascript.github.io/318987-kekstagram/7/","created_at":"2018-07-04T15:54:11Z","updated_at":"2018-07-04T19:32:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf2b532c48500a466dc29c4d660934517aeb77e7","assignee":{"login":"evgen3","id":12950683,"node_id":"MDQ6VXNlcjEyOTUwNjgz","avatar_url":"https://avatars0.githubusercontent.com/u/12950683?v=4","gravatar_id":"","url":"https://api.github.com/users/evgen3","html_url":"https://github.com/evgen3","followers_url":"https://api.github.com/users/evgen3/followers","following_url":"https://api.github.com/users/evgen3/following{/other_user}","gists_url":"https://api.github.com/users/evgen3/gists{/gist_id}","starred_url":"https://api.github.com/users/evgen3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgen3/subscriptions","organizations_url":"https://api.github.com/users/evgen3/orgs","repos_url":"https://api.github.com/users/evgen3/repos","events_url":"https://api.github.com/users/evgen3/events{/privacy}","received_events_url":"https://api.github.com/users/evgen3/received_events","type":"User","site_admin":false},"assignees":[{"login":"evgen3","id":12950683,"node_id":"MDQ6VXNlcjEyOTUwNjgz","avatar_url":"https://avatars0.githubusercontent.com/u/12950683?v=4","gravatar_id":"","url":"https://api.github.com/users/evgen3","html_url":"https://github.com/evgen3","followers_url":"https://api.github.com/users/evgen3/followers","following_url":"https://api.github.com/users/evgen3/following{/other_user}","gists_url":"https://api.github.com/users/evgen3/gists{/gist_id}","starred_url":"https://api.github.com/users/evgen3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evgen3/subscriptions","organizations_url":"https://api.github.com/users/evgen3/orgs","repos_url":"https://api.github.com/users/evgen3/repos","events_url":"https://api.github.com/users/evgen3/events{/privacy}","received_events_url":"https://api.github.com/users/evgen3/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/7/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/statuses/5eeb10f7bad94f2ced4098278172813b5b1705dc","head":{"label":"maximus-dr:module6-task1","ref":"module6-task1","sha":"5eeb10f7bad94f2ced4098278172813b5b1705dc","user":{"login":"maximus-dr","id":25801968,"node_id":"MDQ6VXNlcjI1ODAxOTY4","avatar_url":"https://avatars0.githubusercontent.com/u/25801968?v=4","gravatar_id":"","url":"https://api.github.com/users/maximus-dr","html_url":"https://github.com/maximus-dr","followers_url":"https://api.github.com/users/maximus-dr/followers","following_url":"https://api.github.com/users/maximus-dr/following{/other_user}","gists_url":"https://api.github.com/users/maximus-dr/gists{/gist_id}","starred_url":"https://api.github.com/users/maximus-dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximus-dr/subscriptions","organizations_url":"https://api.github.com/users/maximus-dr/orgs","repos_url":"https://api.github.com/users/maximus-dr/repos","events_url":"https://api.github.com/users/maximus-dr/events{/privacy}","received_events_url":"https://api.github.com/users/maximus-dr/received_events","type":"User","site_admin":false},"repo":{"id":135339703,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzMzk3MDM=","name":"318987-kekstagram","full_name":"maximus-dr/318987-kekstagram","owner":{"login":"maximus-dr","id":25801968,"node_id":"MDQ6VXNlcjI1ODAxOTY4","avatar_url":"https://avatars0.githubusercontent.com/u/25801968?v=4","gravatar_id":"","url":"https://api.github.com/users/maximus-dr","html_url":"https://github.com/maximus-dr","followers_url":"https://api.github.com/users/maximus-dr/followers","following_url":"https://api.github.com/users/maximus-dr/following{/other_user}","gists_url":"https://api.github.com/users/maximus-dr/gists{/gist_id}","starred_url":"https://api.github.com/users/maximus-dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximus-dr/subscriptions","organizations_url":"https://api.github.com/users/maximus-dr/orgs","repos_url":"https://api.github.com/users/maximus-dr/repos","events_url":"https://api.github.com/users/maximus-dr/events{/privacy}","received_events_url":"https://api.github.com/users/maximus-dr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maximus-dr/318987-kekstagram","description":"Max Ivanov","fork":true,"url":"https://api.github.com/repos/maximus-dr/318987-kekstagram","forks_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/forks","keys_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/teams","hooks_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/events","assignees_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/tags","blobs_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/languages","stargazers_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/subscription","commits_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/merges","archive_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/downloads","issues_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/maximus-dr/318987-kekstagram/deployments","created_at":"2018-05-29T18:51:59Z","updated_at":"2018-07-01T21:20:29Z","pushed_at":"2018-07-04T15:53:03Z","git_url":"git://github.com/maximus-dr/318987-kekstagram.git","ssh_url":"git@github.com:maximus-dr/318987-kekstagram.git","clone_url":"https://github.com/maximus-dr/318987-kekstagram.git","svn_url":"https://github.com/maximus-dr/318987-kekstagram","homepage":null,"size":2216,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"c0cd6c9327dcbdd52ea24610ad61244a54a44cd0","user":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":135339392,"node_id":"MDEwOlJlcG9zaXRvcnkxMzUzMzkzOTI=","name":"318987-kekstagram","full_name":"htmlacademy-javascript/318987-kekstagram","owner":{"login":"htmlacademy-javascript","id":14179712,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc5NzEy","avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/318987-kekstagram","description":"Max Ivanov","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram","forks_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/deployments","created_at":"2018-05-29T18:49:03Z","updated_at":"2018-06-30T16:25:42Z","pushed_at":"2018-07-04T15:55:15Z","git_url":"git://github.com/htmlacademy-javascript/318987-kekstagram.git","ssh_url":"git@github.com:htmlacademy-javascript/318987-kekstagram.git","clone_url":"https://github.com/htmlacademy-javascript/318987-kekstagram.git","svn_url":"https://github.com/htmlacademy-javascript/318987-kekstagram","homepage":"https://github.com/maximus-dr/318987-kekstagram","size":2222,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7"},"html":{"href":"https://github.com/htmlacademy-javascript/318987-kekstagram/pull/7"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/7"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/318987-kekstagram/statuses/5eeb10f7bad94f2ced4098278172813b5b1705dc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"evgen3"}}