Skip to content

Commit

Permalink
feat: ui/ux approvements
Browse files Browse the repository at this point in the history
  • Loading branch information
invakid404 committed Apr 16, 2022
1 parent deadf4e commit deadd31
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
14 changes: 5 additions & 9 deletions dashboard/src/components/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="avatar">
<img class="avatar" src={avatar} alt={username} />
</div>
<h2 class="card-title">{username.split('#')[0]}</h2>
<h2 class="card-title">{username}</h2>
<div class="card-count">{count}</div>
</div>
{/each}
Expand All @@ -20,6 +20,7 @@
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 2em;
align-items: center;
margin: 0 auto;
width: 100%;
Expand All @@ -35,24 +36,19 @@
position: relative;
padding: 1rem;
height: 100%;
width: 30%;
flex-basis: 30%;
display: flex;
flex-direction: column;
align-items: center;
}
.card-count::before {
content: 'Kek count: ';
display: inline-block;
font-weight: 500;
}
.card-count {
font-size: 1.2rem;
font-weight: 700;
font-weight: 300;
width: fit-content;
margin: 0 auto auto;
text-align: center;
}
.crown-0 {
Expand Down
21 changes: 18 additions & 3 deletions dashboard/src/routes/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,27 @@
<title>kekboard</title>
</svelte:head>
<Header />
<div class="top-scores">
<Card data={topScorers} />

<div class="container">
<div class="wrapper">
<div class="top-scores">
<Card data={topScorers} />
</div>
<DataTable {headers} {rows} />
</div>
</div>
<DataTable {headers} {rows} />

<style>
.container {
width: 100%;
display: flex;
justify-content: center;
}
.wrapper {
width: min(100%, 50rem);
}
.top-scores {
margin-top: 2rem;
margin-bottom: 2rem;
Expand Down

0 comments on commit deadd31

Please sign in to comment.