-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub user pages at /user/github/{username}
- Loading branch information
1 parent
b41faa2
commit cb1bb77
Showing
15 changed files
with
442 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" type="text/css" href="/styles/tailwind.css"> | ||
<link rel="stylesheet" href="/styles/profile-styles.css"> | ||
<link rel="stylesheet" | ||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" /> | ||
<link rel="icon" type="images/svg" href="/images/logo.svg"> | ||
<link rel="stylesheet" type='text/css' href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css"> | ||
|
||
<title>My Profile | FetchCV</title> | ||
</head> | ||
|
||
<body class="px-8 flex justify-center bg-zinc-50 dark:bg-zinc-900 dark:text-white"> | ||
<div class="mb-20"> | ||
<!-- top bar --> | ||
<div class="flex my-2"> | ||
<a href="/"> | ||
<div | ||
class="inline-flex justify-center transition-all p-2 mr-2 shadow-lg bg-zinc-100 dark:bg-zinc-800 border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 hover:bg-zinc-200 dark:hover:bg-zinc-700 rounded-md dark:text-white"> | ||
<span class="material-symbols-rounded text-public">home</span> | ||
</div> | ||
</a> | ||
<!-- User search (will be replaced when accounts are added) --> | ||
<div | ||
class="flex w-full justify-center items-center shadow-lg bg-zinc-100 dark:bg-zinc-800 border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 rounded-md"> | ||
<input class="px-6 py-2 text-base bg-transparent w-[100%]" type="text" id="username" | ||
placeholder="Enter a GitHub username"> | ||
<span tabindex="0" class="material-symbols-rounded text-public mr-2" | ||
onclick="newUsername()">person_search</span> | ||
</div> | ||
<script> | ||
let usernameJSON = `<%- JSON.stringify(username) %>`; | ||
let username = JSON.parse(usernameJSON); | ||
</script> | ||
</div> | ||
<!-- Error box - hidden by default --> | ||
<div | ||
class="error-box shadow-2xl py-4 px-8 my-2 border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 rounded-md hidden bg-blue-800 bg-red-800 bg-green-800"> | ||
<h1 class="error-title text-2xl font-mono">Oh no! Token retrival error</h1> | ||
<h1 class="error-text font-mono">We could not fetch your data</h1> | ||
</div> | ||
|
||
|
||
<!-- this should be working --> | ||
<div id="root"></div> | ||
|
||
|
||
<!-- Profile Card --> | ||
<div | ||
class="shadow-2xl py-4 px-8 my-2 bg-zinc-100 dark:bg-zinc-800 border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 rounded-md hidden user-info"> | ||
<div class="grid gap-6" style="grid-template-columns: 300px auto;"> | ||
<img | ||
class="profile-picture w-[300px] shadow-2xl border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 rounded-full" | ||
alt="Profile Picture"> | ||
<div class="max-w-[45vw]"> | ||
<h1 class="profile-name text-3xl font-bold">Name</h1> | ||
<h1 class="profile-handle text-xl dark:text-zinc-600 font-bold">handle</h1> | ||
<div class="profile-langs py-2 align-top"></div> | ||
<p class="profile-desc text-lg"></p> | ||
<br> | ||
<hr> | ||
<br> | ||
<div> | ||
<p><span class="profile-repos"></span> repositories</p> | ||
</div> | ||
<br> | ||
<hr> | ||
<br> | ||
<p><span class="profile-followers"></span> followers</p> | ||
<p><span class="profile-following"></span> following</p> | ||
<p><span class="profile-stars"></span> stars</p> | ||
<p>location: <span class="profile-location"></span></p> | ||
<p class="profile-email">Email</p> | ||
<a class="profile-website text-theme underline">Website (ur/)</a><br> | ||
<a class="profile-github text-theme underline">Github</a><br> | ||
<br> | ||
<div class="github-stats"></div> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Branding --> | ||
<div | ||
class="flex w-full py-4 justify-center items-center shadow-lg dark:bg-zinc-800 border-[1px] border-zinc-300 dark:border-zinc-700 border-t-zinc-100 dark:border-t-zinc-600 rounded-md"> | ||
<p>Created with <code class="text-theme">FetchCV</code></p> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
<style> | ||
p { | ||
max-width: 700px; | ||
} | ||
</style> | ||
|
||
<script src="/scripts/user-profile.js"></script> | ||
<script src="/scripts/user-profile-github.js"></script> | ||
<script src="/scripts/gitlab.js"></script> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//=============================================== | ||
// Username search | ||
//=============================================== | ||
|
||
function newUsername() { | ||
let usernameElement = document.getElementById("username") as HTMLInputElement; | ||
if (usernameElement) { | ||
username = usernameElement.value; | ||
window.location.href = window.location.origin + "/user/github/" + username; | ||
} | ||
} | ||
|
||
const usernameInput = document.getElementById("username"); | ||
if (usernameInput) { | ||
usernameInput.addEventListener("keydown", function (event) { | ||
if (event.key == "Enter") { | ||
newUsername(); | ||
} | ||
}); | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.