{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/comments/184231660","pull_request_review_id":115384480,"id":184231660,"diff_hunk":"@@ -0,0 +1,67 @@\n+import {getElementFromTemplate, drawAnswerIcons} from '../utils.js';\n+import backButton from '../components/back-button.js';\n+import header from '../components/header.js';\n+import footer from '../components/footer.js';\n+import {gameState, answers, RIGHT_ANSWER_POINTS, TIME_BONUS, LIVES_BONUS} from '../data.js';\n+\n+export default (results) => {\n+  const stats = getElementFromTemplate(`\n+    ${header()}\n+    <div class=\"result\">\n+      <h1>${results.score > 0 ? `Победа!` : `Поражение :(`}</h1>\n+      <table class=\"result__table\">\n+        <tr>\n+          <td class=\"result__number\">1.</td>\n+          <td colspan=\"2\">\n+            <ul class=\"stats\">\n+              ${drawAnswerIcons(answers)}\n+            </ul>\n+          </td>\n+        ${results.score < 0 ? `\n+          <td class=\"result__total\"></td>\n+          <td class=\"result__total  result__total--final\">fail</td>\n+        </tr>\n+      </table>\n+          ` : `\n+          <td class=\"result__points\">×&nbsp;${RIGHT_ANSWER_POINTS}</td>\n+          <td class=\"result__total\">${results.correctAnswers * RIGHT_ANSWER_POINTS}</td>\n+        </tr>\n+        ${results.fastAnswers > 0 ? `\n+        <tr>\n+          <td></td>\n+          <td class=\"result__extra\">Бонус за скорость:</td>\n+          <td class=\"result__extra\">${results.fastAnswers}&nbsp;<span class=\"stats__result stats__result--fast\"></span></td>\n+          <td class=\"result__points\">×&nbsp;${TIME_BONUS}</td>\n+          <td class=\"result__total\">${results.fastAnswers * TIME_BONUS}</td>\n+        </tr>\n+        ` : ``}\n+        ${gameState.lives > 0 ? `\n+        <tr>\n+          <td></td>\n+          <td class=\"result__extra\">Бонус за жизни:</td>\n+          <td class=\"result__extra\">${gameState.lives}&nbsp;<span class=\"stats__result stats__result--alive\"></span></td>\n+          <td class=\"result__points\">×&nbsp;${LIVES_BONUS}</td>\n+          <td class=\"result__total\">${results.livesScore}</td>\n+        </tr>\n+        ` : ``}\n+        ${results.slowAnswers > 0 ? `\n+        <tr>\n+          <td></td>\n+          <td class=\"result__extra\">Штраф за медлительность:</td>","path":"js/screens/stats.js","position":50,"original_position":50,"commit_id":"60410b4d230ee5b0d801ac9cd298e5a396225f6b","original_commit_id":"60410b4d230ee5b0d801ac9cd298e5a396225f6b","user":{"login":"dihar","id":12913462,"avatar_url":"https://avatars2.githubusercontent.com/u/12913462?v=4","gravatar_id":"","url":"https://api.github.com/users/dihar","html_url":"https://github.com/dihar","followers_url":"https://api.github.com/users/dihar/followers","following_url":"https://api.github.com/users/dihar/following{/other_user}","gists_url":"https://api.github.com/users/dihar/gists{/gist_id}","starred_url":"https://api.github.com/users/dihar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dihar/subscriptions","organizations_url":"https://api.github.com/users/dihar/orgs","repos_url":"https://api.github.com/users/dihar/repos","events_url":"https://api.github.com/users/dihar/events{/privacy}","received_events_url":"https://api.github.com/users/dihar/received_events","type":"User","site_admin":false},"body":"три одинаковых куска разметки, может можно более элегантно написать, не повторяя код","created_at":"2018-04-25T23:10:11Z","updated_at":"2018-04-25T23:10:51Z","html_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6#discussion_r184231660","pull_request_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/comments/184231660"},"html":{"href":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6#discussion_r184231660"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6","id":183411623,"html_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6","diff_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6.diff","patch_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6.patch","issue_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/6","number":6,"state":"closed","locked":false,"title":"Шаблонизируй это","user":{"login":"tved","id":25175225,"avatar_url":"https://avatars0.githubusercontent.com/u/25175225?v=4","gravatar_id":"","url":"https://api.github.com/users/tved","html_url":"https://github.com/tved","followers_url":"https://api.github.com/users/tved/followers","following_url":"https://api.github.com/users/tved/following{/other_user}","gists_url":"https://api.github.com/users/tved/gists{/gist_id}","starred_url":"https://api.github.com/users/tved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tved/subscriptions","organizations_url":"https://api.github.com/users/tved/orgs","repos_url":"https://api.github.com/users/tved/repos","events_url":"https://api.github.com/users/tved/events{/privacy}","received_events_url":"https://api.github.com/users/tved/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Шаблонизируй это](https://up.htmlacademy.ru/ecmascript/4/user/328713/tasks/7)\n\n:boom: https://htmlacademy-ecmascript.github.io/328713-pixel-hunter/6/","created_at":"2018-04-23T12:01:47Z","updated_at":"2018-04-25T23:10:51Z","closed_at":"2018-04-24T22:12:24Z","merged_at":"2018-04-24T22:12:24Z","merge_commit_sha":"758f949ae8dfdc2dab8183f7e63ed43b4ad6d4c1","assignee":{"login":"dihar","id":12913462,"avatar_url":"https://avatars2.githubusercontent.com/u/12913462?v=4","gravatar_id":"","url":"https://api.github.com/users/dihar","html_url":"https://github.com/dihar","followers_url":"https://api.github.com/users/dihar/followers","following_url":"https://api.github.com/users/dihar/following{/other_user}","gists_url":"https://api.github.com/users/dihar/gists{/gist_id}","starred_url":"https://api.github.com/users/dihar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dihar/subscriptions","organizations_url":"https://api.github.com/users/dihar/orgs","repos_url":"https://api.github.com/users/dihar/repos","events_url":"https://api.github.com/users/dihar/events{/privacy}","received_events_url":"https://api.github.com/users/dihar/received_events","type":"User","site_admin":false},"assignees":[{"login":"dihar","id":12913462,"avatar_url":"https://avatars2.githubusercontent.com/u/12913462?v=4","gravatar_id":"","url":"https://api.github.com/users/dihar","html_url":"https://github.com/dihar","followers_url":"https://api.github.com/users/dihar/followers","following_url":"https://api.github.com/users/dihar/following{/other_user}","gists_url":"https://api.github.com/users/dihar/gists{/gist_id}","starred_url":"https://api.github.com/users/dihar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dihar/subscriptions","organizations_url":"https://api.github.com/users/dihar/orgs","repos_url":"https://api.github.com/users/dihar/repos","events_url":"https://api.github.com/users/dihar/events{/privacy}","received_events_url":"https://api.github.com/users/dihar/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/6/comments","statuses_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/statuses/60410b4d230ee5b0d801ac9cd298e5a396225f6b","head":{"label":"tved:module4-task1","ref":"module4-task1","sha":"60410b4d230ee5b0d801ac9cd298e5a396225f6b","user":{"login":"tved","id":25175225,"avatar_url":"https://avatars0.githubusercontent.com/u/25175225?v=4","gravatar_id":"","url":"https://api.github.com/users/tved","html_url":"https://github.com/tved","followers_url":"https://api.github.com/users/tved/followers","following_url":"https://api.github.com/users/tved/following{/other_user}","gists_url":"https://api.github.com/users/tved/gists{/gist_id}","starred_url":"https://api.github.com/users/tved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tved/subscriptions","organizations_url":"https://api.github.com/users/tved/orgs","repos_url":"https://api.github.com/users/tved/repos","events_url":"https://api.github.com/users/tved/events{/privacy}","received_events_url":"https://api.github.com/users/tved/received_events","type":"User","site_admin":false},"repo":{"id":126872932,"name":"328713-pixel-hunter","full_name":"tved/328713-pixel-hunter","owner":{"login":"tved","id":25175225,"avatar_url":"https://avatars0.githubusercontent.com/u/25175225?v=4","gravatar_id":"","url":"https://api.github.com/users/tved","html_url":"https://github.com/tved","followers_url":"https://api.github.com/users/tved/followers","following_url":"https://api.github.com/users/tved/following{/other_user}","gists_url":"https://api.github.com/users/tved/gists{/gist_id}","starred_url":"https://api.github.com/users/tved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tved/subscriptions","organizations_url":"https://api.github.com/users/tved/orgs","repos_url":"https://api.github.com/users/tved/repos","events_url":"https://api.github.com/users/tved/events{/privacy}","received_events_url":"https://api.github.com/users/tved/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tved/328713-pixel-hunter","description":"Татьяна Веденёва","fork":true,"url":"https://api.github.com/repos/tved/328713-pixel-hunter","forks_url":"https://api.github.com/repos/tved/328713-pixel-hunter/forks","keys_url":"https://api.github.com/repos/tved/328713-pixel-hunter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tved/328713-pixel-hunter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tved/328713-pixel-hunter/teams","hooks_url":"https://api.github.com/repos/tved/328713-pixel-hunter/hooks","issue_events_url":"https://api.github.com/repos/tved/328713-pixel-hunter/issues/events{/number}","events_url":"https://api.github.com/repos/tved/328713-pixel-hunter/events","assignees_url":"https://api.github.com/repos/tved/328713-pixel-hunter/assignees{/user}","branches_url":"https://api.github.com/repos/tved/328713-pixel-hunter/branches{/branch}","tags_url":"https://api.github.com/repos/tved/328713-pixel-hunter/tags","blobs_url":"https://api.github.com/repos/tved/328713-pixel-hunter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tved/328713-pixel-hunter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tved/328713-pixel-hunter/git/refs{/sha}","trees_url":"https://api.github.com/repos/tved/328713-pixel-hunter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tved/328713-pixel-hunter/statuses/{sha}","languages_url":"https://api.github.com/repos/tved/328713-pixel-hunter/languages","stargazers_url":"https://api.github.com/repos/tved/328713-pixel-hunter/stargazers","contributors_url":"https://api.github.com/repos/tved/328713-pixel-hunter/contributors","subscribers_url":"https://api.github.com/repos/tved/328713-pixel-hunter/subscribers","subscription_url":"https://api.github.com/repos/tved/328713-pixel-hunter/subscription","commits_url":"https://api.github.com/repos/tved/328713-pixel-hunter/commits{/sha}","git_commits_url":"https://api.github.com/repos/tved/328713-pixel-hunter/git/commits{/sha}","comments_url":"https://api.github.com/repos/tved/328713-pixel-hunter/comments{/number}","issue_comment_url":"https://api.github.com/repos/tved/328713-pixel-hunter/issues/comments{/number}","contents_url":"https://api.github.com/repos/tved/328713-pixel-hunter/contents/{+path}","compare_url":"https://api.github.com/repos/tved/328713-pixel-hunter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tved/328713-pixel-hunter/merges","archive_url":"https://api.github.com/repos/tved/328713-pixel-hunter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tved/328713-pixel-hunter/downloads","issues_url":"https://api.github.com/repos/tved/328713-pixel-hunter/issues{/number}","pulls_url":"https://api.github.com/repos/tved/328713-pixel-hunter/pulls{/number}","milestones_url":"https://api.github.com/repos/tved/328713-pixel-hunter/milestones{/number}","notifications_url":"https://api.github.com/repos/tved/328713-pixel-hunter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tved/328713-pixel-hunter/labels{/name}","releases_url":"https://api.github.com/repos/tved/328713-pixel-hunter/releases{/id}","deployments_url":"https://api.github.com/repos/tved/328713-pixel-hunter/deployments","created_at":"2018-03-26T18:32:55Z","updated_at":"2018-04-13T12:40:31Z","pushed_at":"2018-04-23T12:29:05Z","git_url":"git://github.com/tved/328713-pixel-hunter.git","ssh_url":"git@github.com:tved/328713-pixel-hunter.git","clone_url":"https://github.com/tved/328713-pixel-hunter.git","svn_url":"https://github.com/tved/328713-pixel-hunter","homepage":null,"size":738,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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-ecmascript:master","ref":"master","sha":"90e2e0d8ade89134c142fd0e35f3058885252104","user":{"login":"htmlacademy-ecmascript","id":22890904,"avatar_url":"https://avatars2.githubusercontent.com/u/22890904?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-ecmascript","html_url":"https://github.com/htmlacademy-ecmascript","followers_url":"https://api.github.com/users/htmlacademy-ecmascript/followers","following_url":"https://api.github.com/users/htmlacademy-ecmascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-ecmascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-ecmascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-ecmascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-ecmascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-ecmascript/repos","events_url":"https://api.github.com/users/htmlacademy-ecmascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-ecmascript/received_events","type":"Organization","site_admin":false},"repo":{"id":126872774,"name":"328713-pixel-hunter","full_name":"htmlacademy-ecmascript/328713-pixel-hunter","owner":{"login":"htmlacademy-ecmascript","id":22890904,"avatar_url":"https://avatars2.githubusercontent.com/u/22890904?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-ecmascript","html_url":"https://github.com/htmlacademy-ecmascript","followers_url":"https://api.github.com/users/htmlacademy-ecmascript/followers","following_url":"https://api.github.com/users/htmlacademy-ecmascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-ecmascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-ecmascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-ecmascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-ecmascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-ecmascript/repos","events_url":"https://api.github.com/users/htmlacademy-ecmascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-ecmascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter","description":"Татьяна Веденёва","fork":false,"url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter","forks_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/forks","keys_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/teams","hooks_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/events","assignees_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/tags","blobs_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/subscription","commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/merges","archive_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/downloads","issues_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/deployments","created_at":"2018-03-26T18:31:42Z","updated_at":"2018-04-24T22:12:26Z","pushed_at":"2018-04-24T22:12:24Z","git_url":"git://github.com/htmlacademy-ecmascript/328713-pixel-hunter.git","ssh_url":"git@github.com:htmlacademy-ecmascript/328713-pixel-hunter.git","clone_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter.git","svn_url":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter","homepage":"https://github.com/tved/328713-pixel-hunter","size":763,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6"},"html":{"href":"https://github.com/htmlacademy-ecmascript/328713-pixel-hunter/pull/6"},"issue":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/6"},"comments":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-ecmascript/328713-pixel-hunter/statuses/60410b4d230ee5b0d801ac9cd298e5a396225f6b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dihar"}}