Compare commits

5 Commits

Author SHA1 Message Date
5de68bf11a Yandex workplace
All checks were successful
Deploy / build-and-publish (push) Successful in 6m52s
Deploy / deploy (push) Successful in 35s
2025-08-20 21:32:34 +03:00
4e63ea50af Fix locale switch on prefetch
All checks were successful
Deploy / build-and-publish (push) Successful in 2m13s
Deploy / deploy (push) Successful in 12s
2025-07-06 21:33:14 +03:00
e4392a6781 Offload stars counter to ycl function
All checks were successful
Deploy / build-and-publish (push) Successful in 5m9s
Deploy / deploy (push) Successful in 40s
2025-07-06 19:34:59 +03:00
530c3b0a93 Update degree status
All checks were successful
Deploy / build-and-publish (push) Successful in 1m51s
Deploy / deploy (push) Successful in 11s
2025-06-10 14:27:21 +03:00
e5230a6f27 Justify text in blog
All checks were successful
Deploy / build-and-publish (push) Successful in 2m2s
Deploy / deploy (push) Successful in 20s
2025-05-19 22:51:19 +03:00
8 changed files with 19 additions and 58 deletions

6
package-lock.json generated
View File

@@ -2361,9 +2361,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001663", "version": "1.0.30001721",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001721.tgz",
"integrity": "sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA==", "integrity": "sha512-cOuvmUVtKrtEaoKiO0rSc29jcjwMwX5tOHDy4MgVFEWiUXj4uBMJkwI8MDySkgXidpMiHUcviogAvFi4pA2hDQ==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {

View File

@@ -6,12 +6,8 @@
"about": { "about": {
"h": "About me", "h": "About me",
"text": "<p>Fullstack developer from St. Petersburg.</p> <p>I&nbsp;like to&nbsp;explore new technologies, find unusual approaches to&nbsp;solving problems and work at&nbsp;the intersection of&nbsp;fields.</p>", "text": "<p>Fullstack developer from St. Petersburg.</p> <p>I&nbsp;like to&nbsp;explore new technologies, find unusual approaches to&nbsp;solving problems and work at&nbsp;the intersection of&nbsp;fields.</p>",
"career": "Career:", "career_value": "Yandex",
"career_value": "Selectel", "masters_value": "ITMO"
"bachelors": "BSIT:",
"bachelors_value": "SPBSUT",
"masters": "MS:",
"masters_value": "ITMO (in progress)"
}, },
"projects": { "projects": {
"h": "Projects", "h": "Projects",

View File

@@ -1,33 +1,5 @@
export default async function getStarsForUser(username: string) { export default async function getStars(username: string) {
const userResponse = await request(`/users/${username}`); const resp = await fetch(`https://user-stars.kopyl.dev/${username}`)
if (!userResponse || !userResponse.public_repos) { const body = await resp.json()
throw new Error(userResponse ? userResponse.message : 'User not found.'); return body.stars
}
const pages = Math.ceil(userResponse.public_repos / 100);
let repos = [];
const fetchReposPromises = [];
for (let i = 1; i <= pages; i++) {
fetchReposPromises.push(request(`/users/${username}/repos?per_page=100&page=${i}`));
}
const reposResponses = await Promise.all(fetchReposPromises);
repos = reposResponses.flat();
return starSum(repos);
}
async function request(url) {
const headers= {
'User-Agent': 'GitHub StarCounter',
// Authorization: `Basic ${Buffer.from(auth).toString('base64')}`
};
const response = await fetch(`https://api.github.com${url}`, { headers });
return response.json()
}
async function starSum(repos) {
return repos.reduce((acc, curr) => acc + curr.stargazers_count, 0);
} }

View File

@@ -6,12 +6,8 @@
"about": { "about": {
"h": "Обо мне", "h": "Обо мне",
"text": "<p>Fullstack разработчик из&nbsp;Санкт-Петербурга.</p> <p>Люблю разбираться в&nbsp;новых технологиях, находить необычные подходы к&nbsp;решению проблем и&nbsp;работать на&nbsp;пересечении областей.</p>", "text": "<p>Fullstack разработчик из&nbsp;Санкт-Петербурга.</p> <p>Люблю разбираться в&nbsp;новых технологиях, находить необычные подходы к&nbsp;решению проблем и&nbsp;работать на&nbsp;пересечении областей.</p>",
"career": "Работа:", "career_value": "Яндекс",
"career_value": "Selectel", "masters_value": "ИТМО"
"bachelors": "Бакалавриат:",
"bachelors_value": "СПбГУТ",
"masters": "Магистратура:",
"masters_value": "ИТМО (в процессе)"
}, },
"projects": { "projects": {
"h": "Проекты", "h": "Проекты",

View File

@@ -2,10 +2,9 @@ import {loadTranslations} from '$lib/translations';
import type {LayoutLoad} from "./$types"; import type {LayoutLoad} from "./$types";
export const load: LayoutLoad = async ({ url, data }) => { export const load: LayoutLoad = async ({ url, data }) => {
const { pathname } = url;
const { locale } = data.i18n const { locale } = data.i18n
await loadTranslations(locale, pathname); await loadTranslations(locale);
return {}; return {};
}; };

View File

@@ -17,19 +17,11 @@
<div class="grid gap-x-2 grid-cols-[auto_1fr] h-fit items-center text-slate-400"> <div class="grid gap-x-2 grid-cols-[auto_1fr] h-fit items-center text-slate-400">
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<MaterialSymbolsWork></MaterialSymbolsWork> <MaterialSymbolsWork></MaterialSymbolsWork>
{$t('about.career')}
</div> </div>
{$t('about.career_value')} {$t('about.career_value')}
<div class="flex gap-2 items-center"> <div class="flex gap-2 items-center">
<MaterialSymbolsSchool></MaterialSymbolsSchool> <MaterialSymbolsSchool></MaterialSymbolsSchool>
{$t('about.bachelors')}
</div>
{$t('about.bachelors_value')}
<div class="flex gap-2 items-center">
<MaterialSymbolsSchool></MaterialSymbolsSchool>
{$t('about.masters')}
</div> </div>
{$t('about.masters_value')} {$t('about.masters_value')}
</div> </div>

View File

@@ -92,4 +92,8 @@ import { page } from '$app/stores';
content: '+'; content: '+';
} }
} }
:global(article p) {
text-align: justify;
}
</style> </style>

View File

@@ -13,7 +13,9 @@
}, },
"include": [ "include": [
"*.config.ts", "*.config.ts",
"src/**/*.svx", "src/blog/**/*.svx",
"src/**/*.svelte",
"src/**/*.ts",
"rehype/**/*.ts" "rehype/**/*.ts"
] ]
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias