-
+
+
+
+
{trophy.name}
+
{trophy.description}
-
-
{trophy.points}
-
Очков
+
+
+
+
+
+
{trophy.points}
+
Очков
+
-
+
{/each}
@@ -47,12 +50,22 @@
max-width: 42em;
}
-.trophy-block {
+ .trophies a {
+ text-decoration: none;
+ color: inherit;
+ }
+
+ .trophy-block {
background-color: #FFEFD6;
border: 2px solid var(--color-border);
display: grid;
grid-template-columns: 2fr 1fr;
margin-bottom: 0.5em;
+ transition: all 0.2s;
+ }
+
+ .trophy-block:hover {
+ transform: scale(0.98);
}
.trophy-block .info {
diff --git a/src/routes/[lang]/(website)/trophy/[id]/+page.server.ts b/src/routes/[lang]/(website)/trophy/[id]/+page.server.ts
new file mode 100644
index 00000000..2e5efaf8
--- /dev/null
+++ b/src/routes/[lang]/(website)/trophy/[id]/+page.server.ts
@@ -0,0 +1,13 @@
+import { error } from '@sveltejs/kit'
+import { api } from '$lib/server/api'
+
+export async function load({ params }) {
+ const trophy = await api.trophy.getById(params.id)
+ if (!trophy || trophy instanceof Error) {
+ error(404, 'Not found')
+ }
+
+ return {
+ trophy,
+ }
+}
diff --git a/src/routes/[lang]/(website)/trophy/[id]/+page.svelte b/src/routes/[lang]/(website)/trophy/[id]/+page.svelte
new file mode 100644
index 00000000..a80227fc
--- /dev/null
+++ b/src/routes/[lang]/(website)/trophy/[id]/+page.svelte
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
{data.trophy.description}
+
+
+
+
+
+
+
{data.trophy.points}
+
Очков
+
+
+
+
+
+
+ Кто получил этот трофей
+ Показаны последние профили, которые получили этот трофей.
+
+
+ {#each latestProfiles as progress}
+
+
+
+
+
+
+
+ {/each}
+
+
+
+
diff --git a/yarn.lock b/yarn.lock
index aab49ef4..8bf10775 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -528,10 +528,10 @@
resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843"
integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==
-"@hmbanan666/chat-game-api@^0.1.13":
- version "0.1.13"
- resolved "https://registry.yarnpkg.com/@hmbanan666/chat-game-api/-/chat-game-api-0.1.13.tgz#8552c79bc73aef9fb2b6bb8eb468c6e383f9916b"
- integrity sha512-SwjB2g3TQVqIsuNTP12gC+XCc8V0BAqvRt6LCmVKlemyn0JxFGcAT9WKaNSG/hCHXe1ZuMb1bSwG/Lq9v1rnqw==
+"@hmbanan666/chat-game-api@^0.1.15":
+ version "0.1.15"
+ resolved "https://registry.yarnpkg.com/@hmbanan666/chat-game-api/-/chat-game-api-0.1.15.tgz#4ca76ac95aa9e96554eef238de191bc02b13e742"
+ integrity sha512-NEehogrHYFrf2U/V+b8L7dRDXvhHZRoNdKUj2C4JHk1/EZjQEO3cD2+nVZGnQbvbi+VKP+4A2ofg2EsgihH4qg==
"@humanwhocodes/module-importer@^1.0.1":
version "1.0.1"