From 56b0af45f04b4b905933ccbece554068e2a0a121 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Thu, 4 Jan 2024 23:25:22 +0800 Subject: change input/search repo's text color -> white --- public/js/getrepo.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'public/js') diff --git a/public/js/getrepo.js b/public/js/getrepo.js index c1995466..b78eb30a 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
\n\t\t\t\"user\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

").concat(profile.name, "

\n\t\t\t\n\t\t\t

").concat(profile.bio, "

\n\t\t\t

\n\t\t\tMail: ").concat(profile.email, "\n\t\t\t

\n\t\t\t

\n\t\t\t\tLocation: ").concat(profile.location, "\n\t\t\t

\n\t\t\t

\n\t\t\t\t@").concat(profile.login, " \n\t\t\t\tRepos: ").concat(profile.public_repos, "\n\t\t\t\tGists: ").concat(profile.public_gists, "\n\t\t\t

\n\t\t
\n\t"); + userInfo.innerHTML = "\n\t\t
\n\t\t\t\"user\n\t\t
\n\t\t
\n\t\t\t\n\t\t\t

").concat(profile.name, "

\n\t\t\t\n\t\t\t

").concat(profile.bio, "

\n\t\t\t

\n\t\t\tMail: ").concat(profile.email, "\n\t\t\t

\n\t\t\t

\n\t\t\t\tLocation: ").concat(profile.location, "\n\t\t\t

\n\t\t\t

\n\t\t\t\t@").concat(profile.login, " \n\t\t\t\tRepos: ").concat(profile.public_repos, "\n\t\t\t\tGists: ").concat(profile.public_gists, "\n\t\t\t

\n\t\t
\n\t"); }; var getRepos = function () { var _ref2 = _asyncToGenerator(_regeneratorRuntime().mark(function _callee2() { @@ -90,7 +90,7 @@ var displayRepos = function displayRepos(repos) { var starsUrl = "".concat(userHome, "/").concat(repo.name, "/stargazers"); var forksUrl = "".concat(userHome, "/").concat(repo.name, "/network/members"); var listItem = document.createElement('li'); - listItem.classList.add('repo'); + listItem.classList.add('repo', 'animate', 'zoomIn'); listItem.innerHTML = "\n\t\t\t

".concat(repo.name, "

\n\t\t\t").concat(repo.description ? "".concat(repo.description, "") : '', "

"); if (repo.stargazers_count > 0) { listItem.innerHTML += "\n\t\t\t\u2B50 ").concat(repo.stargazers_count, ""); @@ -102,9 +102,9 @@ var displayRepos = function displayRepos(repos) { listItem.innerHTML += "\n\t\t\t").concat(devicons["Git"], " ").concat(repo.forks_count, ""); } if (repo.homepage && repo.homepage !== "") { - listItem.innerHTML += "

\n\t\t\tCode ").concat(devicons["Github"], "\n\t\t\tLive ").concat(devicons["Chrome"], "
"); + listItem.innerHTML += "

\n\t\t\tCode ").concat(devicons["Github"], "\n\t\t\tLive ").concat(devicons["Chrome"], "
"); } else { - listItem.innerHTML += "

\n\t\t\tView Project ").concat(devicons["Github"], "
"); + listItem.innerHTML += "

\n\t\t\tView Project ").concat(devicons["Github"], "
"); } repoList.append(listItem); } @@ -130,7 +130,11 @@ filterInput.addEventListener('input', function (e) { } else { repo.classList.add('hide'); repo.addEventListener('animationend', function () { - repo.style.position = 'absolute'; + if (searchLowerText != '') { + repo.style.position = 'absolute'; + } else { + repo.style.position = 'relative'; + } }); } }; -- cgit v1.2.3