From 33664eff2c93136658b7f863c95e1bfda91141ee Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sun, 24 Jul 2022 15:15:09 +0200 Subject: basic user profile pages --- .../src/lib/components/Leaderboard.svelte | 8 ++- .../src/lib/components/navbar/UserControls.svelte | 7 +- web/pw-server/src/routes/users/[user_name].svelte | 84 ++++++++++++++++++++++ 3 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 web/pw-server/src/routes/users/[user_name].svelte (limited to 'web') 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 @@ {entry["bot"]["name"]} {#if entry["author"]} - {entry["author"]["username"]} + + {entry["author"]["username"]} {/if} @@ -69,4 +70,9 @@ .leaderboard-rank { color: #333; } + + .leaderboard-author a{ + text-decoration: none; + color: black; + } 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 @@
{#if $currentUser} -
- {$currentUser["username"]} -
+ + {$currentUser["username"]} +
Sign out
{:else} @@ -61,6 +61,7 @@ .current-user-name { @include navbar-item; + text-decoration: none; color: #fff; } diff --git a/web/pw-server/src/routes/users/[user_name].svelte b/web/pw-server/src/routes/users/[user_name].svelte new file mode 100644 index 0000000..fab3a96 --- /dev/null +++ b/web/pw-server/src/routes/users/[user_name].svelte @@ -0,0 +1,84 @@ + + + + +
+
+

{userName}

+
+

Bots

+
    + {#each bots as bot} +
  • + {bot['name']} +
  • + {/each} +
+
+ + \ No newline at end of file -- cgit v1.2.3