Skip to content

Commit

Permalink
chore: some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hmbanan666 committed Jul 6, 2024
1 parent 902270a commit 2503144
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 11 deletions.
3 changes: 0 additions & 3 deletions src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

<footer>
<ul>
<li>
<a href={config.githubRepoUrl} target='_blank'>{t.footer.github}</a>
</li>
<li>
<a href={config.discordServerInviteUrl} target='_blank'>Discord</a>
</li>
Expand Down
1 change: 0 additions & 1 deletion src/lib/components/Profile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
url.searchParams.set('client_id', config.twitch.clientId)
url.searchParams.set('redirect_uri', config.signInRedirectUrl)
url.searchParams.set('response_type', 'token')
url.searchParams.set('scope', 'chat:read channel:read:redemptions')
const isSignedIn = !!$page.data.profile
Expand Down
1 change: 0 additions & 1 deletion src/lib/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const en = {
},
footer: {
text: 'Created with thrill and ❤️',
github: 'Source on GitHub',
donate: 'Donate',
},
}
1 change: 0 additions & 1 deletion src/lib/translations/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const ru = {
},
footer: {
text: 'Создается с трепетом и ❤️',
github: 'Код на GitHub',
donate: 'Донат',
},
} satisfies Dictionary
17 changes: 12 additions & 5 deletions src/routes/[lang]/(website)/about/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import wagon from '$lib/assets/website/wagon-full.png'
import { page } from '$app/stores'
</script>

<svelte:head>
Expand Down Expand Up @@ -51,12 +52,12 @@
</div>
</div>

<section>
<section class='thanks'>
<h3 class='mb-2'>Благодарности</h3>
<p>Спасибо моим зрителям: <b>sava5621</b> за вкусные шавухи, <b>BezSovesty</b> за помощь на
старте, <b>flack_zombi</b> за упорство в рубке деревьев, <b>hywax</b> за open-source вклад, <b>PeregonStream</b> и <b>siberiacancode</b> за крутые рейды.
Спасибо <b>tozikab_</b>, <b>6alt1ca</b>, <b>derailon</b>, <b>sloghniy</b>, <b>MaN0ol</b>, <b>dO_Oy</b>, <b>VombatDrago</b>,
<b>sleeplessness8</b>.
<p>Спасибо моим зрителям: <a href='/{$page.data.locale}/p/sava5621'>sava5621</a> за вкусные шавухи, <a href='/{$page.data.locale}/p/bezsovesty'>BezSovesty</a> за помощь на
старте, <a href='/{$page.data.locale}/p/flack_zombi'>flack_zombi</a> за упорство в рубке деревьев, <a href='/{$page.data.locale}/p/a_hywax'>a_hywax</a> за помощь с open source, <a href='/{$page.data.locale}/p/peregonstream'>PeregonStream</a> и <a href='/{$page.data.locale}/p/siberiacancode'>siberiacancode</a> за крутые рейды.
Спасибо <a href='/{$page.data.locale}/p/tozikab_'>tozikab_</a>, <a href='/{$page.data.locale}/p/6alt1ca'>6alt1ca</a>, <a href='/{$page.data.locale}/p/derailon'>derailon</a>, <a href='/{$page.data.locale}/p/sloghniy'>sloghniy</a>, <a href='/{$page.data.locale}/p/man0ol'>MaN0ol</a>, <a href='/{$page.data.locale}/p/do_oy'>dO_Oy</a>, <a href='/{$page.data.locale}/p/vombatdrago'>VombatDrago</a>,
<a href='/{$page.data.locale}/p/sleeplessness8'>sleeplessness8</a>.
<br>Вы все крутые!</p>
</section>

Expand Down Expand Up @@ -142,4 +143,10 @@
width: 60vw;
max-width: fit-content;
}
.thanks {
a {
font-weight: 600;
}
}
</style>
1 change: 1 addition & 0 deletions src/routes/[lang]/(website)/p/[userName]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export async function load({ params }) {
if (!trophies || trophies instanceof Error) {
trophies = []
}
trophies = trophies.filter((t) => t.status === 'COMPLETED')

return {
pageProfile: profile,
Expand Down
92 changes: 92 additions & 0 deletions src/routes/[lang]/(website)/p/[userName]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,59 @@
TimeAgo.addLocale(ru)
const timeAgo = new TimeAgo('ru-RU')
const levelProgress = [
{ level: 1, points: 0 }, // x2
{ level: 2, points: 25 },
{ level: 3, points: 50 },
{ level: 4, points: 100 },
{ level: 5, points: 200 },
{ level: 6, points: 400 },
{ level: 7, points: 800 },
{ level: 8, points: 1600 },
{ level: 9, points: 3200 },
{ level: 10, points: 6400 },
{ level: 11, points: 9600 }, // x1.5
{ level: 12, points: 14400 },
{ level: 13, points: 21600 },
{ level: 14, points: 32400 },
{ level: 15, points: 48600 },
{ level: 16, points: 72900 },
{ level: 17, points: 110000 },
{ level: 18, points: 165000 },
{ level: 19, points: 247000 },
{ level: 20, points: 370000 },
{ level: 21, points: 444000 }, // x1.2
{ level: 22, points: 532000 },
{ level: 23, points: 638000 },
{ level: 24, points: 765000 },
{ level: 25, points: 918000 },
{ level: 26, points: 1100000 },
{ level: 27, points: 1320000 },
{ level: 28, points: 1580000 },
{ level: 29, points: 1890000 },
{ level: 30, points: 2260000 },
{ level: 31, points: 2480000 }, // x1.1
{ level: 32, points: 2720000 },
{ level: 33, points: 2990000 },
{ level: 34, points: 3200000 },
{ level: 35, points: 3500000 },
{ level: 36, points: 3800000 },
{ level: 37, points: 4100000 },
{ level: 38, points: 4500000 },
{ level: 39, points: 4900000 },
{ level: 40, points: 5300000 },
{ level: 41, points: 5800000 },
{ level: 42, points: 6300000 },
{ level: 43, points: 6900000 },
{ level: 44, points: 7500000 },
{ level: 45, points: 8200000 },
{ level: 46, points: 9000000 },
{ level: 47, points: 9900000 },
{ level: 48, points: 11000000 },
{ level: 49, points: 13000000 },
{ level: 50, points: 15000000 },
]
</script>

<section class='hero'>
Expand Down Expand Up @@ -76,6 +129,12 @@
</section>

<section class='trophies'>
<h2>Последние полученные трофеи</h2>

{#if !data.trophies.length}
<p>Пока нет</p>
{/if}

{#each data.trophies as progress}
<div class='trophy-block'>
<div class='info'>
Expand All @@ -96,6 +155,16 @@
{/each}
</section>

<section class='levels'>
<h2>Прокачка уровня профиля</h2>
<p>Развивая титулы "Рассказчик", "Создатель квестов", "Охотник за трофеями", "Меценат" ты получаешь очки. При накоплении очков профиль получает новый уровень.</p>
<ul>
{#each levelProgress as level}
<li>{level.level} уровень: {level.points} очков</li>
{/each}
</ul>
</section>

<div class='profile-id'>
{data.pageProfile.id}
</div>
Expand Down Expand Up @@ -241,4 +310,27 @@
margin-top: 2em;
text-align: center;
}
.trophies {
h2 {
margin-bottom: 0.5em;
}
}
.levels {
margin-top: 1em;
ul {
text-align: left;
list-style: image-set(url($lib/assets/website/coin-16.png));
li {
margin-bottom: 0.5em;
}
}
h2 {
margin-bottom: 0.25em;
}
}
</style>

0 comments on commit 2503144

Please sign in to comment.