-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7801109
commit 9ac5d73
Showing
13 changed files
with
226 additions
and
14 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
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
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
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,12 @@ | ||
import { api } from '$lib/server/api' | ||
|
||
export async function load() { | ||
let trophies = await api.trophy.getList() | ||
if (!trophies || trophies instanceof Error) { | ||
trophies = [] | ||
} | ||
|
||
return { | ||
trophies, | ||
} | ||
} |
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,95 @@ | ||
<script> | ||
import Trophy from 'lucide-svelte/icons/trophy' | ||
export let data | ||
</script> | ||
|
||
<section class='hero'> | ||
<h1>Трофеи</h1> | ||
<h2>Столько всего можно сделать...</h2> | ||
</section> | ||
|
||
<section class='trophies'> | ||
{#each data.trophies as trophy} | ||
<div class='trophy-block'> | ||
<div class='info'> | ||
<p class='name'>{trophy.name}</p> | ||
<p class='description'>{trophy.description}</p> | ||
</div> | ||
<div class='completion'> | ||
<div class='trophy'> | ||
<Trophy size='64' /> | ||
</div> | ||
<div> | ||
<p class='points'>{trophy.points}</p> | ||
<p>Очков</p> | ||
</div> | ||
</div> | ||
</div> | ||
{/each} | ||
</section> | ||
|
||
<style> | ||
.hero { | ||
padding-top: 4em; | ||
padding-bottom: 4em; | ||
max-width: 64em; | ||
} | ||
.hero h1 { | ||
margin-bottom: 0.25em; | ||
} | ||
section { | ||
text-align: center; | ||
padding: 2em 1em; | ||
margin: 0 auto; | ||
max-width: 42em; | ||
} | ||
.trophy-block { | ||
background-color: #FFEFD6; | ||
border: 2px solid var(--color-border); | ||
display: grid; | ||
grid-template-columns: 2fr 1fr; | ||
margin-bottom: 0.5em; | ||
} | ||
.trophy-block .info { | ||
position: relative; | ||
padding: 0.5em 1em; | ||
} | ||
.trophy-block .info .name { | ||
font-weight: 600; | ||
font-size: 1.1rem; | ||
opacity: 0.8; | ||
} | ||
.trophy-block .info .description { | ||
font-size: 0.9rem; | ||
} | ||
.trophy-block .completion { | ||
position: relative; | ||
padding: 0.5em 1em; | ||
color: #A07553; | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: nowrap; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 0.5em; | ||
} | ||
.trophy-block .completion .points { | ||
font-size: 1.5rem; | ||
font-weight: 600; | ||
line-height: 1.2; | ||
} | ||
.trophy-block .completion .trophy { | ||
opacity: 0.3; | ||
color: #AD7F58; | ||
} | ||
</style> |
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