{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/comments/111662946","pull_request_review_id":32924975,"id":111662946,"diff_hunk":"@@ -59,42 +91,152 @@ function getPhotoItems(item) {\n   for (var i = 0; i < item; i++) {\n     photoItems[i] = {\n       url: 'photos/' + (i + 1) + '.jpg',\n-      likes: getRandomNumber(minLikes, maxLikes),\n+      likes: getRandomNumber(MIN_LIKES, MAX_LIKES),\n       comments: getRandomComments()\n     };\n   }\n \n   return photoItems;\n }\n \n+// получение нужного дом-элемента из шаблона для клонирования\n+function getTemplateClone(template, innerSelector) {\n+  var templateElement = document.querySelector(template);\n+  var elementToClone;\n+\n+  if ('content' in templateElement) {\n+    elementToClone = templateElement.content.querySelector(innerSelector);\n+  } else {\n+    elementToClone = templateElement.querySelector(innerSelector);\n+  }\n+\n+  return elementToClone;\n+}\n+\n+/* ****************** */\n+/*      ГАЛЕРЕЯ       */\n+/* *****НАЧАЛО******* */\n+\n // создаем элемент разметки с фото\n-function renderPictures(picturesObj) {\n+function renderPictures(picturesObj, pictureNumber) {\n   var photosElement = photoItemsTemplate.cloneNode(true);\n \n   photosElement.querySelector('img').src = picturesObj.url;\n   photosElement.querySelector('.picture-comments').textContent = picturesObj.comments;\n   photosElement.querySelector('.picture-likes').textContent = picturesObj.likes;\n \n+  // создание листерна при клике на picture\n+  photosElement.addEventListener('click', function (evt) {\n+    evt.preventDefault();\n+    showGallery(pictureNumber);\n+  });\n+\n   return photosElement;\n }\n \n+// показываем галереи","path":"js/pictures.js","position":150,"original_position":150,"commit_id":"fecb0cdb2c114f05cffbad047d04e144ee236267","original_commit_id":"fecb0cdb2c114f05cffbad047d04e144ee236267","user":{"login":"HungryOwl","id":15196793,"avatar_url":"https://avatars2.githubusercontent.com/u/15196793?v=3","gravatar_id":"","url":"https://api.github.com/users/HungryOwl","html_url":"https://github.com/HungryOwl","followers_url":"https://api.github.com/users/HungryOwl/followers","following_url":"https://api.github.com/users/HungryOwl/following{/other_user}","gists_url":"https://api.github.com/users/HungryOwl/gists{/gist_id}","starred_url":"https://api.github.com/users/HungryOwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HungryOwl/subscriptions","organizations_url":"https://api.github.com/users/HungryOwl/orgs","repos_url":"https://api.github.com/users/HungryOwl/repos","events_url":"https://api.github.com/users/HungryOwl/events{/privacy}","received_events_url":"https://api.github.com/users/HungryOwl/received_events","type":"User","site_admin":false},"body":"галереЮ","created_at":"2017-04-15T10:46:53Z","updated_at":"2017-04-15T10:46:53Z","html_url":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3#discussion_r111662946","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/comments/111662946"},"html":{"href":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3#discussion_r111662946"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3","id":115149541,"html_url":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3","diff_url":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3.diff","patch_url":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/3","number":3,"state":"open","locked":false,"title":"Личный проект: подробности","user":{"login":"Arigami28","id":25018720,"avatar_url":"https://avatars1.githubusercontent.com/u/25018720?v=3","gravatar_id":"","url":"https://api.github.com/users/Arigami28","html_url":"https://github.com/Arigami28","followers_url":"https://api.github.com/users/Arigami28/followers","following_url":"https://api.github.com/users/Arigami28/following{/other_user}","gists_url":"https://api.github.com/users/Arigami28/gists{/gist_id}","starred_url":"https://api.github.com/users/Arigami28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arigami28/subscriptions","organizations_url":"https://api.github.com/users/Arigami28/orgs","repos_url":"https://api.github.com/users/Arigami28/repos","events_url":"https://api.github.com/users/Arigami28/events{/privacy}","received_events_url":"https://api.github.com/users/Arigami28/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: подробности](https://up.htmlacademy.ru/javascript/9/user/323827/tasks/11)\n\n:boom: https://htmlacademy-javascript.github.io/323827-kekstagram/3/","created_at":"2017-04-10T17:16:27Z","updated_at":"2017-04-15T10:46:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f568a89407f96534258036ce76ec2ba8dc98138","assignee":{"login":"HungryOwl","id":15196793,"avatar_url":"https://avatars2.githubusercontent.com/u/15196793?v=3","gravatar_id":"","url":"https://api.github.com/users/HungryOwl","html_url":"https://github.com/HungryOwl","followers_url":"https://api.github.com/users/HungryOwl/followers","following_url":"https://api.github.com/users/HungryOwl/following{/other_user}","gists_url":"https://api.github.com/users/HungryOwl/gists{/gist_id}","starred_url":"https://api.github.com/users/HungryOwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HungryOwl/subscriptions","organizations_url":"https://api.github.com/users/HungryOwl/orgs","repos_url":"https://api.github.com/users/HungryOwl/repos","events_url":"https://api.github.com/users/HungryOwl/events{/privacy}","received_events_url":"https://api.github.com/users/HungryOwl/received_events","type":"User","site_admin":false},"assignees":[{"login":"HungryOwl","id":15196793,"avatar_url":"https://avatars2.githubusercontent.com/u/15196793?v=3","gravatar_id":"","url":"https://api.github.com/users/HungryOwl","html_url":"https://github.com/HungryOwl","followers_url":"https://api.github.com/users/HungryOwl/followers","following_url":"https://api.github.com/users/HungryOwl/following{/other_user}","gists_url":"https://api.github.com/users/HungryOwl/gists{/gist_id}","starred_url":"https://api.github.com/users/HungryOwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HungryOwl/subscriptions","organizations_url":"https://api.github.com/users/HungryOwl/orgs","repos_url":"https://api.github.com/users/HungryOwl/repos","events_url":"https://api.github.com/users/HungryOwl/events{/privacy}","received_events_url":"https://api.github.com/users/HungryOwl/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/3/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/statuses/fecb0cdb2c114f05cffbad047d04e144ee236267","head":{"label":"Arigami28:module4-task1","ref":"module4-task1","sha":"fecb0cdb2c114f05cffbad047d04e144ee236267","user":{"login":"Arigami28","id":25018720,"avatar_url":"https://avatars1.githubusercontent.com/u/25018720?v=3","gravatar_id":"","url":"https://api.github.com/users/Arigami28","html_url":"https://github.com/Arigami28","followers_url":"https://api.github.com/users/Arigami28/followers","following_url":"https://api.github.com/users/Arigami28/following{/other_user}","gists_url":"https://api.github.com/users/Arigami28/gists{/gist_id}","starred_url":"https://api.github.com/users/Arigami28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arigami28/subscriptions","organizations_url":"https://api.github.com/users/Arigami28/orgs","repos_url":"https://api.github.com/users/Arigami28/repos","events_url":"https://api.github.com/users/Arigami28/events{/privacy}","received_events_url":"https://api.github.com/users/Arigami28/received_events","type":"User","site_admin":false},"repo":{"id":85746901,"name":"kekstagram","full_name":"Arigami28/kekstagram","owner":{"login":"Arigami28","id":25018720,"avatar_url":"https://avatars1.githubusercontent.com/u/25018720?v=3","gravatar_id":"","url":"https://api.github.com/users/Arigami28","html_url":"https://github.com/Arigami28","followers_url":"https://api.github.com/users/Arigami28/followers","following_url":"https://api.github.com/users/Arigami28/following{/other_user}","gists_url":"https://api.github.com/users/Arigami28/gists{/gist_id}","starred_url":"https://api.github.com/users/Arigami28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arigami28/subscriptions","organizations_url":"https://api.github.com/users/Arigami28/orgs","repos_url":"https://api.github.com/users/Arigami28/repos","events_url":"https://api.github.com/users/Arigami28/events{/privacy}","received_events_url":"https://api.github.com/users/Arigami28/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arigami28/kekstagram","description":"Роман Андреев","fork":true,"url":"https://api.github.com/repos/Arigami28/kekstagram","forks_url":"https://api.github.com/repos/Arigami28/kekstagram/forks","keys_url":"https://api.github.com/repos/Arigami28/kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arigami28/kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arigami28/kekstagram/teams","hooks_url":"https://api.github.com/repos/Arigami28/kekstagram/hooks","issue_events_url":"https://api.github.com/repos/Arigami28/kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/Arigami28/kekstagram/events","assignees_url":"https://api.github.com/repos/Arigami28/kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/Arigami28/kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/Arigami28/kekstagram/tags","blobs_url":"https://api.github.com/repos/Arigami28/kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arigami28/kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arigami28/kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arigami28/kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arigami28/kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/Arigami28/kekstagram/languages","stargazers_url":"https://api.github.com/repos/Arigami28/kekstagram/stargazers","contributors_url":"https://api.github.com/repos/Arigami28/kekstagram/contributors","subscribers_url":"https://api.github.com/repos/Arigami28/kekstagram/subscribers","subscription_url":"https://api.github.com/repos/Arigami28/kekstagram/subscription","commits_url":"https://api.github.com/repos/Arigami28/kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arigami28/kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arigami28/kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arigami28/kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arigami28/kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/Arigami28/kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arigami28/kekstagram/merges","archive_url":"https://api.github.com/repos/Arigami28/kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arigami28/kekstagram/downloads","issues_url":"https://api.github.com/repos/Arigami28/kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/Arigami28/kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/Arigami28/kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/Arigami28/kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arigami28/kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/Arigami28/kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/Arigami28/kekstagram/deployments","created_at":"2017-03-21T19:54:49Z","updated_at":"2017-03-21T21:02:30Z","pushed_at":"2017-04-14T22:29:48Z","git_url":"git://github.com/Arigami28/kekstagram.git","ssh_url":"git@github.com:Arigami28/kekstagram.git","clone_url":"https://github.com/Arigami28/kekstagram.git","svn_url":"https://github.com/Arigami28/kekstagram","homepage":null,"size":4283,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"08f306f59317581177db220146183a974f941e4a","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars1.githubusercontent.com/u/14179712?v=3","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":85746787,"name":"323827-kekstagram","full_name":"htmlacademy-javascript/323827-kekstagram","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars1.githubusercontent.com/u/14179712?v=3","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/323827-kekstagram","description":"Роман Андреев","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram","forks_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/deployments","created_at":"2017-03-21T19:53:35Z","updated_at":"2017-03-21T23:58:43Z","pushed_at":"2017-04-14T22:29:50Z","git_url":"git://github.com/htmlacademy-javascript/323827-kekstagram.git","ssh_url":"git@github.com:htmlacademy-javascript/323827-kekstagram.git","clone_url":"https://github.com/htmlacademy-javascript/323827-kekstagram.git","svn_url":"https://github.com/htmlacademy-javascript/323827-kekstagram","homepage":"https://github.com/Arigami28/kekstagram","size":4276,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3"},"html":{"href":"https://github.com/htmlacademy-javascript/323827-kekstagram/pull/3"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/3"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/323827-kekstagram/statuses/fecb0cdb2c114f05cffbad047d04e144ee236267"}}}}
{"actor":{"display_login":"HungryOwl"}}