diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-01-04 12:36:55 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-01-04 12:36:55 +0800 |
| commit | b5cd652ea30532c6839c7e7fad6baf58dd6fc54a (patch) | |
| tree | 8ebb16d713532844e04c6220277820675da972fb /public | |
| parent | 8f2fc0f4200fa665e3736215b78e3f7df3063c9b (diff) | |
update
Diffstat (limited to 'public')
| -rw-r--r-- | public/js/getrepo.js | 2 | ||||
| -rw-r--r-- | public/js/mouseblob.js | 21 |
2 files changed, 16 insertions, 7 deletions
diff --git a/public/js/getrepo.js b/public/js/getrepo.js index 3cfc14e5..c1995466 100644 --- a/public/js/getrepo.js +++ b/public/js/getrepo.js @@ -39,7 +39,7 @@ var getProfile = function () { getProfile(); var displayProfile = function displayProfile(profile) { var userInfo = document.querySelector('.user-info'); - userInfo.innerHTML = "\n\t\t<figure class=\"floattext\">\n\t\t\t<a href=".concat(profile.html_url, "><img alt=\"user avatar\" src=").concat(profile.avatar_url, "></a>\n\t\t</figure>\n\t\t<div class=\"floattext\">\n\t\t\t<!-- <h2><a href=").concat(profile.blog, "><strong>").concat(profile.name, "</strong></a></h2> -->\n\t\t\t<h2><a href=/><strong data-value=\"").concat(profile.name, "\" class=\"usertitle hacktype\">").concat(profile.name, "</strong></a></h2>\n\t\t\t<!-- <h2><a href=").concat(profile.html_url, "><strong>").concat(profile.name, "</strong></a></h2> -->\n\t\t\t<p>").concat(profile.bio, "</p>\n\t\t\t<p>\n\t\t\t<strong>Mail:</strong> ").concat(profile.email, "\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<strong>Location:</strong> ").concat(profile.location, "\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<strong>@").concat(profile.login, " </strong>\n\t\t\t\tRepos: ").concat(profile.public_repos, "\n\t\t\t\tGists: ").concat(profile.public_gists, "\n\t\t\t</p>\n\t\t</div>\n\t"); + userInfo.innerHTML = "\n\t\t<figure class=\"floattext\">\n\t\t\t<a href=".concat(profile.html_url, "><img alt=\"user avatar\" class=\"tilt\" data-tilt-reverse=\"false\" src=").concat(profile.avatar_url, "></a>\n\t\t</figure>\n\t\t<div class=\"floattext\">\n\t\t\t<!-- <h2><a href=").concat(profile.blog, "><strong>").concat(profile.name, "</strong></a></h2> -->\n\t\t\t<h2><a href=/><strong data-value=\"").concat(profile.name, "\" class=\"usertitle hacktype\">").concat(profile.name, "</strong></a></h2>\n\t\t\t<!-- <h2><a href=").concat(profile.html_url, "><strong>").concat(profile.name, "</strong></a></h2> -->\n\t\t\t<p>").concat(profile.bio, "</p>\n\t\t\t<p>\n\t\t\t<strong>Mail:</strong> ").concat(profile.email, "\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<strong>Location:</strong> ").concat(profile.location, "\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<strong>@").concat(profile.login, " </strong>\n\t\t\t\tRepos: ").concat(profile.public_repos, "\n\t\t\t\tGists: ").concat(profile.public_gists, "\n\t\t\t</p>\n\t\t</div>\n\t"); }; var getRepos = function () { var _ref2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee2() { diff --git a/public/js/mouseblob.js b/public/js/mouseblob.js index 69cbacac..32e082e9 100644 --- a/public/js/mouseblob.js +++ b/public/js/mouseblob.js @@ -1,15 +1,24 @@ "use strict"; window.onpointermove = function (event) { - var x = event.pageX; - var y = event.pageY; + var pageX = event.pageX, + pageY = event.pageY; + var momentumX = pageX + pageX - blob.offsetLeft; + var momentumY = pageY + pageY - blob.offsetTop; blob.animate({ - left: "".concat(x, "px"), - top: "".concat(y, "px") + left: "".concat(momentumX, "px"), + top: "".concat(momentumY, "px") + }, { + duration: 1500, + fill: "forwards" + }); + blob.animate({ + left: "".concat(pageX, "px"), + top: "".concat(pageY, "px") }, { duration: 1000, fill: "forwards" }); - blob.style.left = x + 'px'; - blob.style.top = y + 'px'; + blob.style.left = "".concat(pageX, "px"); + blob.style.top = "".concat(pageY, "px"); };
\ No newline at end of file |
