diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-24 15:15:09 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-07-24 15:15:42 +0200 |
commit | 33664eff2c93136658b7f863c95e1bfda91141ee (patch) | |
tree | acda060d878b557e58db042a3bb30ff4212c17b1 /web/pw-server/src/lib | |
parent | 4a582e8079178a7ac11f2a492e7988fcdaa210cd (diff) | |
download | planetwars.dev-33664eff2c93136658b7f863c95e1bfda91141ee.tar.xz planetwars.dev-33664eff2c93136658b7f863c95e1bfda91141ee.zip |
basic user profile pages
Diffstat (limited to 'web/pw-server/src/lib')
-rw-r--r-- | web/pw-server/src/lib/components/Leaderboard.svelte | 8 | ||||
-rw-r--r-- | web/pw-server/src/lib/components/navbar/UserControls.svelte | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/web/pw-server/src/lib/components/Leaderboard.svelte b/web/pw-server/src/lib/components/Leaderboard.svelte index 75e4807..8582198 100644 --- a/web/pw-server/src/lib/components/Leaderboard.svelte +++ b/web/pw-server/src/lib/components/Leaderboard.svelte @@ -44,7 +44,8 @@ <td class="leaderboard-bot">{entry["bot"]["name"]}</td> <td class="leaderboard-author"> {#if entry["author"]} - {entry["author"]["username"]} + <!-- TODO: remove duplication --> + <a href="/users/{entry["author"]["username"]}">{entry["author"]["username"]}</a> {/if} </td> </tr> @@ -69,4 +70,9 @@ .leaderboard-rank { color: #333; } + + .leaderboard-author a{ + text-decoration: none; + color: black; + } </style> diff --git a/web/pw-server/src/lib/components/navbar/UserControls.svelte b/web/pw-server/src/lib/components/navbar/UserControls.svelte index 0b8413d..a9bd87b 100644 --- a/web/pw-server/src/lib/components/navbar/UserControls.svelte +++ b/web/pw-server/src/lib/components/navbar/UserControls.svelte @@ -36,9 +36,9 @@ <div class="user-controls"> {#if $currentUser} - <div class="current-user-name"> - {$currentUser["username"]} - </div> + <a class="current-user-name" href="/users/{$currentUser["username"]}"> + {$currentUser["username"]} + </a> <div class="sign-out" on:click={signOut}>Sign out</div> {:else} <a class="account-href" href="login">Sign in</a> @@ -61,6 +61,7 @@ .current-user-name { @include navbar-item; + text-decoration: none; color: #fff; } |