Skip to content

Commit 1d42d51

Browse files
committed
add
1 parent 77cc971 commit 1d42d51

36 files changed

Lines changed: 216 additions & 504 deletions

File tree

‎src/global.scss‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,4 @@ pre {
3535

3636
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
3737

38-
.post-list { display: grid; gap: 1rem; }
39-
40-
.post-card {
41-
display: block;
42-
padding: 1rem 0;
43-
border-bottom: 1px solid #ddd;
44-
color: inherit;
45-
}
46-
47-
.post-card:hover { text-decoration: none; }
48-
.post-card h2 { margin: 0; color: #852318; }
4938
.date { color: #666; }
50-
.summary { margin-bottom: 0; }

‎src/lib/Footer.svelte‎

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,60 @@
1-
<script>
2-
import { base } from '$app/paths';
3-
</script>
4-
51
<footer>
6-
<nav aria-label="VProg links">
7-
<a href="https://vprog.hu/discord">Discord</a>
8-
<a href="https://github.com/bmevprog">GitHub</a>
9-
<a href="https://www.youtube.com/@bmevprog">YouTube</a>
10-
<a href="{base}/feed.xml">RSS</a>
11-
</nav>
2+
<div class="footer-content">
3+
<a class="author" href="https://cs.bme.hu/~nemkin/">Viktória Nemkin</a>
4+
<nav aria-label="VProg links">
5+
<a href="https://vprog.hu/discord" aria-label="Discord" title="Discord">
6+
<img src="/icons/discord.svg" alt="" />
7+
</a>
8+
<a href="https://github.com/bmevprog" aria-label="GitHub" title="GitHub">
9+
<img src="/icons/github.png" alt="" />
10+
</a>
11+
<a href="https://www.youtube.com/@bmevprog" aria-label="YouTube" title="YouTube">
12+
<img src="/icons/youtube.png" alt="" />
13+
</a>
14+
</nav>
15+
</div>
1216
</footer>
1317

1418
<style>
1519
footer {
1620
margin-top: 4rem;
1721
padding: 1.5rem 1rem;
1822
border-top: 1px solid #ddd;
19-
text-align: center;
2023
}
21-
nav { display: flex; justify-content: center; gap: 1.25rem; }
24+
25+
.footer-content {
26+
display: flex;
27+
justify-content: space-between;
28+
max-width: 72rem;
29+
margin: 0 auto;
30+
gap: 1.5rem;
31+
}
32+
33+
.author { font-weight: 600; }
34+
nav {
35+
display: flex;
36+
align-items: center;
37+
gap: 1.25rem;
38+
}
39+
40+
nav a {
41+
display: flex;
42+
flex: 0 0 1.5rem;
43+
width: 1.5rem;
44+
height: 1.5rem;
45+
align-items: center;
46+
justify-content: center;
47+
}
48+
49+
nav img {
50+
display: block;
51+
max-width: 100%;
52+
max-height: 100%;
53+
object-fit: contain;
54+
}
55+
56+
@media (max-width: 36rem) {
57+
.footer-content { flex-direction: column; }
58+
nav { flex-wrap: wrap; }
59+
}
2260
</style>

‎src/lib/Header.svelte‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
class="logo"
1717
src="{base}/img/balloons-cartoon.png"
1818
loading="lazy"
19-
width="200"
20-
height="200"
19+
width="153"
20+
height="153"
2121
alt="VProg balloons logo"
2222
/>
2323
<div class="title">
@@ -37,11 +37,7 @@
3737
<ul id="main-menu" class="visible">
3838
<li><a href="{base}/">Home</a></li>
3939
<li><a href="{base}/join">Join</a></li>
40-
<li><a href="{base}/archives">Archives</a></li>
41-
<li><a href="{base}/categories">Categories</a></li>
42-
<li><a href="{base}/tags">Tags</a></li>
4340
<li><a href="{base}/icpc">ICPC</a></li>
44-
<li><a href="{base}/contact">Contact</a></li>
4541
</ul>
4642
</nav>
4743
</header>

‎src/lib/PostList.svelte‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎src/lib/posts.js‎

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
export const posts = [
2-
['2024-10-12-intro-week-3-solutions', 'VProg Intro : Week 3, Binary Search - Solutions', '2024-10-12', 'Solutions to the homeworks from Week 3.', ['vprog-intro'], ['vprog-intro', 'binsearch', 'solutions']],
3-
['2024-10-11-intro-week-2-solutions', 'VProg Intro : Week 2, Two Pointers - Solutions', '2024-10-11', 'Solutions to the homeworks from Week 2.', ['vprog-intro'], ['vprog-intro', 'twoptr', 'solutions']],
4-
['2024-09-28-intro-week-3', 'VProg Intro : Week 3, Binary Search', '2024-09-28', 'Video is out for Week 3!', ['vprog-intro'], ['vprog-intro', 'binsearch', 'video']],
5-
['2024-09-20-intro-week-2', 'VProg Intro : Week 2, Two Pointers', '2024-09-20', 'Video is out for Week 2!', ['vprog-intro'], ['vprog-intro', 'twoptr', 'video']],
6-
['2024-09-20-intro-week-1-solutions', 'VProg Intro : Week 1, Introduction - Solutions', '2024-09-20', 'Solutions to the homeworks from Week 1.', ['vprog-intro'], ['vprog-intro', 'implementation', 'solutions']],
7-
['2024-09-09-vprog-start', 'VProg Intro : Week 1, Introduction + VProg Advanced Student Club', '2024-09-09', 'Autumn 2024, VProg Intro video', ['vprog', 'vprog-intro', 'starting', 'introduction'], ['vprog', 'vprog-intro', 'starting', 'introduction', 'video']],
8-
['2024-08-10-non-academic-problem', 'Non-academic problem (Bridge Finding)', '2024-08-10', 'Solving CF 1986F with bridge finding.', ['codeforces', 'graph-theory'], ['codeforces', 'dfs', 'graph-theory', 'trees']],
9-
['2024-04-03-pure-math', 'Competitive programming for pure mathematics', '2024-04-03', 'On 10 April!', ['vprog', 'pure-math', 'projects'], ['vprog', 'pure-math', 'projects']],
10-
['2024-03-08-house-robbery', 'House Robbery (learning dynamic programming)', '2024-03-08', 'Solving LeetCode 198: House Robbery.', ['leetcode', 'dynamic-programming'], ['leetcode', 'dp'], true],
11-
['2024-03-04-vprolog', 'VProlog', '2024-03-04', 'On 6 March!', ['vprog', 'vprolog'], ['vprog', 'vprolog']],
12-
['2024-02-16-vprog-start', 'VProg Student Club', '2024-02-16', 'Spring 2024', ['vprog', 'starting'], ['vprog', 'starting']],
13-
['2023-09-01-vprog-start', 'VProg Student Club', '2023-09-01', 'Fall 2023', ['vprog', 'starting'], ['vprog', 'starting']],
14-
['2023-02-26-vprog-start', 'VProg Student Club', '2023-02-26', 'Spring 2023', ['vprog', 'starting'], ['vprog', 'starting']],
15-
['2022-09-01-vprog-start', 'VProg Student Club', '2022-09-01', 'Fall 2022', ['vprog', 'starting'], ['vprog', 'starting']],
16-
['2022-04-12-wish-i-knew-how-to-sort', 'Wish I Knew How to Sort (an exercise in probability)', '2022-04-12', 'In this post I would like to talk about solving 1753C: Wish I Knew How to Sort on Codeforces.', ['codeforces', 'probability-theory'], ['codeforces', 'probability-theory', 'expectation-value', 'markov-chain']],
17-
['2021-04-16-google-code-jam-qualification-round', 'Google Code Jam 2021 - Qualification Round', '2021-04-16', 'The 2021 Google Code Jam Qualification Round took place a few weeks ago.', ['competitions'], ['google', 'codejam']]
18-
].map(([slug, title, date, summary, categories, tags, hidden = false]) => ({
19-
slug, title, date, summary, categories, tags, hidden, url: `/posts/${slug}/`
2+
['2024-10-12-intro-week-3-solutions', 'VProg Intro : Week 3, Binary Search - Solutions', '2024-10-12', 'Solutions to the homeworks from Week 3.'],
3+
['2024-10-11-intro-week-2-solutions', 'VProg Intro : Week 2, Two Pointers - Solutions', '2024-10-11', 'Solutions to the homeworks from Week 2.'],
4+
['2024-09-20-intro-week-1-solutions', 'VProg Intro : Week 1, Introduction - Solutions', '2024-09-20', 'Solutions to the homeworks from Week 1.'],
5+
['2024-08-10-non-academic-problem', 'Non-academic problem (Bridge Finding)', '2024-08-10', 'Solving CF 1986F with bridge finding.'],
6+
['2024-04-03-pure-math', 'Competitive programming for pure mathematics', '2024-04-03', 'On 10 April!'],
7+
['2024-03-08-house-robbery', 'House Robbery (learning dynamic programming)', '2024-03-08', 'Solving LeetCode 198: House Robbery.', true],
8+
['2024-03-04-vprolog', 'VProlog', '2024-03-04', 'On 6 March!'],
9+
['2022-04-12-wish-i-knew-how-to-sort', 'Wish I Knew How to Sort (an exercise in probability)', '2022-04-12', 'In this post I would like to talk about solving 1753C: Wish I Knew How to Sort on Codeforces.'],
10+
['2021-04-16-google-code-jam-qualification-round', 'Google Code Jam 2021 - Qualification Round', '2021-04-16', 'The 2021 Google Code Jam Qualification Round took place a few weeks ago.']
11+
].map(([slug, title, date, summary, hidden = false]) => ({
12+
slug, title, date, summary, hidden, url: `/posts/${slug}/`
2013
}));
21-
22-
export function groupPosts(field) {
23-
const groups = new Map();
24-
for (const post of posts.filter((item) => !item.hidden)) {
25-
for (const value of post[field]) {
26-
const items = groups.get(value) ?? [];
27-
items.push(post);
28-
groups.set(value, items);
29-
}
30-
}
31-
return [...groups.entries()].sort(([a], [b]) => a.localeCompare(b));
32-
}

‎src/lib/redirects.js‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,24 @@ add('https://discord.gg/Vuw8yQUc5p', 'discord', 'dc');
2525
add('https://forms.gle/om4bBXurdSzMTFxb9', 'felveteli', 'kviz', 'nyiltnap');
2626
add('https://github.com/bmevprog', 'git', 'github', 'gh');
2727
add('https://cs.bme.hu/icpc', 'icpc', 'acm', 'bme');
28-
add(
29-
'https://drive.google.com/drive/folders/1gmDX3y6k5ywXF35FkECn9FLvkDQloHEr',
30-
'intro',
31-
'download',
32-
'intro-download'
33-
);
3428
add(
3529
'https://miro.com/welcome/c2Q5ZFEyc2JXRjNNVmZ3enY1S2RtN1JHcGJzQWhtcjBOa21KRXhXRkFHTjhVMm9MRjJJZUVQWDlYSThrbDBHTjNPa0ZwNktiZkJlVFpqYytXY0pEN1Z0Zlp3WGpZRTVXQXdMWk1JRFN4R0ZJZFVHQ2tKL0xtQ3FYU0NXNW1pWHlNakdSWkpBejJWRjJhRnhhb1UwcS9BPT0hdjE=?share_link_id=931117087673',
36-
'miro-team',
37-
'miro-inv',
38-
'miro-invite'
30+
'miro-team', 'miro-inv', 'miro-invite'
3931
);
4032
add(
4133
'https://miro.com/app/board/uXjVNXSGjJU=/?share_link_id=727722995947',
42-
'miro',
43-
'miro1',
44-
'whiteboard',
45-
'wb',
46-
'tabla',
47-
'firka'
34+
'miro', 'miro1', 'whiteboard', 'wb', 'tabla', 'firka'
4835
);
4936
add(
5037
'https://miro.com/app/board/uXjVLs3Q-HE=/?share_link_id=66278285665',
51-
'miro2',
52-
'whiteboard2',
53-
'wb2',
54-
'tabla2',
55-
'firka2'
38+
'miro2', 'whiteboard2', 'wb2', 'tabla2', 'firka2'
5639
);
5740
add(
5841
'https://miro.com/app/board/uXjVIGEl1TQ=/?share_link_id=769840908033',
59-
'miro3',
60-
'whiteboard3',
61-
'wb3',
62-
'tabla3',
63-
'firka3'
64-
);
65-
add(
66-
'https://docs.google.com/document/d/14k4Owuuvs1ilZ6aJVk1KsTVdBGogJPtBqWc8hKSHE3g/edit',
67-
'prolog',
68-
'pl'
42+
'miro3', 'whiteboard3', 'wb3', 'tabla3', 'firka3'
6943
);
7044
add('https://discord.gg/N8WbXhQGYq', 'voice', 'join-voice');
7145
add('https://www.youtube.com/@bmevprog', 'youtube', 'yt');
7246
add('https://us06web.zoom.us/j/86740035264', 'zoom');
73-
add('/feed.xml', 'rss');
7447

7548
export { redirects };

‎src/routes/+page.svelte‎

Lines changed: 148 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,154 @@
11
<script>
2-
import PostList from '$lib/PostList.svelte';
2+
import { base } from '$app/paths';
33
import { posts } from '$lib/posts.js';
4+
5+
const pageSize = 5;
6+
const entries = posts.filter((post) => !post.hidden);
7+
const pageCount = Math.ceil(entries.length / pageSize);
8+
let currentPage = 1;
9+
$: visibleEntries = entries.slice((currentPage - 1) * pageSize, currentPage * pageSize);
410
</script>
511

12+
<svelte:head>
13+
<title>VProg | Competitive programming at BME</title>
14+
<meta
15+
name="description"
16+
content="Notes about algorithms, problem solving, and competitive programming at BME."
17+
/>
18+
</svelte:head>
19+
620
<main>
7-
<h2>VProg</h2>
8-
<p>Competitive programming student club at BME. ICPC, Codeforces, LeetCode, and more.</p>
9-
<PostList items={posts.filter((post) => !post.hidden)} />
21+
<section aria-label="Blog entries">
22+
{#if pageCount > 1}
23+
<nav class="pagination" aria-label="Blog pages">
24+
<button disabled={currentPage === 1} on:click={() => currentPage -= 1}>newer</button>
25+
{#each Array(pageCount) as _, index}
26+
<button
27+
class:current={currentPage === index + 1}
28+
aria-current={currentPage === index + 1 ? 'page' : undefined}
29+
on:click={() => currentPage = index + 1}
30+
>
31+
{index + 1}
32+
</button>
33+
{/each}
34+
<button disabled={currentPage === pageCount} on:click={() => currentPage += 1}>older</button>
35+
</nav>
36+
{/if}
37+
38+
<div class="list-header" aria-hidden="true">
39+
<span>date</span>
40+
<span>entry</span>
41+
</div>
42+
43+
<div class="entries">
44+
{#each visibleEntries as post}
45+
<a class="entry" href={base + post.url}>
46+
<time datetime={post.date}>{post.date}</time>
47+
<span class="entry-copy">
48+
<strong>{post.title}</strong>
49+
{#if post.summary}<span class="summary">{post.summary}</span>{/if}
50+
</span>
51+
</a>
52+
{/each}
53+
</div>
54+
55+
</section>
1056
</main>
57+
58+
<style lang="scss">
59+
$mobile-breakpoint: 42rem;
60+
61+
main {
62+
max-width: none;
63+
margin: 0;
64+
padding: 1rem;
65+
font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
66+
}
67+
68+
.list-header,
69+
.entry {
70+
display: grid;
71+
grid-template-columns: 7.5rem minmax(0, 1fr);
72+
gap: 1rem;
73+
}
74+
75+
.list-header {
76+
padding: 0.4rem 0;
77+
border-bottom: 1px solid #aaa;
78+
color: #777;
79+
font-size: 0.68rem;
80+
letter-spacing: 0.08em;
81+
text-transform: uppercase;
82+
}
83+
84+
.entry {
85+
align-items: start;
86+
padding: 0.75rem 0;
87+
border-bottom: 1px solid #ddd;
88+
color: inherit;
89+
line-height: 1.25;
90+
91+
&:hover {
92+
background: #faf4f5;
93+
text-decoration: none;
94+
}
95+
96+
time {
97+
color: #777;
98+
font-size: 0.76rem;
99+
font-variant-numeric: tabular-nums;
100+
}
101+
}
102+
103+
.entry-copy {
104+
display: grid;
105+
gap: 0.2rem;
106+
}
107+
108+
.entry-copy strong { color: #852318; }
109+
110+
.summary {
111+
color: #656565;
112+
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
113+
font-size: 0.86rem;
114+
}
115+
116+
.pagination {
117+
display: flex;
118+
justify-content: flex-end;
119+
gap: 0.35rem;
120+
margin-bottom: 0.75rem;
121+
}
122+
123+
.pagination button {
124+
padding: 0.3rem 0.55rem;
125+
border: 1px solid #aaa;
126+
color: #242424;
127+
cursor: pointer;
128+
font: inherit;
129+
font-size: 0.76rem;
130+
131+
&.current {
132+
border-color: #852318;
133+
background: #852318;
134+
color: white;
135+
}
136+
137+
&:disabled {
138+
cursor: default;
139+
opacity: 0.35;
140+
}
141+
}
142+
143+
@media (max-width: $mobile-breakpoint) {
144+
.list-header { display: none; }
145+
146+
.entry {
147+
grid-template-columns: minmax(0, 1fr);
148+
gap: 0.35rem 0.75rem;
149+
}
150+
151+
.entry time { grid-column: 1; }
152+
.entry-copy { grid-column: 1; }
153+
}
154+
</style>

‎src/routes/archives/+page.svelte‎

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)