Skip to content

Commit 3657469

Browse files
committed
feat: Small whitespace updates
1 parent 966d680 commit 3657469

5 files changed

Lines changed: 35 additions & 26 deletions

File tree

145 KB
Binary file not shown.

src/components/BitSection.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ const { name, description } = Astro.props;
66
<div class="p-2 grow flex flex-col h-full gap-6">
77
<h3 class="text-xl font-medium">{name}</h3>
88

9-
{description && <p>{description}</p>}
9+
{description && <p class="font-sans-snd">{description}</p>}
1010
</div>
1111
</div>

src/components/BitTreeScene.astro

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
0.1,
3838
1000,
3939
);
40-
camera.position.z = 2;
40+
camera.position.z = 1.7;
4141
camera.position.y = 40;
4242

4343
const directionalLight = new THREE.DirectionalLight(0xffffff, 2);
@@ -61,12 +61,17 @@
6161
);
6262

6363
window.addEventListener("resize", () => {
64-
const width = container.clientWidth;
65-
const height = container.clientHeight;
64+
const ratio = window.devicePixelRatio;
65+
66+
const width = container.clientWidth * ratio;
67+
const height = container.clientHeight * ratio;
6668

6769
renderer.setSize(width, height);
6870
camera.aspect = width / height;
6971
camera.updateProjectionMatrix();
72+
73+
canvas.style.width = `${container.clientWidth}px`;
74+
canvas.style.height = `${container.clientHeight}px`;
7075
});
7176

7277
const targetRotationY = 0.4;
@@ -82,20 +87,10 @@
8287
});
8388

8489
const swayIntensity = 0.2;
85-
const maxWidth = 800;
8690

8791
function animate() {
8892
requestAnimationFrame(animate);
8993

90-
const cameraZoomProportion =
91-
maxWidth / Math.min(container.clientWidth, maxWidth);
92-
93-
camera.position.z = THREE.MathUtils.lerp(
94-
camera.position.z,
95-
cameraZoomProportion * 1.5,
96-
lerpFactor,
97-
);
98-
9994
// Lerp the camera position toward the target based on mouse
10095
camera.position.x = THREE.MathUtils.lerp(
10196
camera.position.x,

src/pages/index.astro

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ const navLinks = [
188188
>
189189
Studencka przestrzeń do wymiany wiedzy i testowania pomysłów.
190190
</h1>
191-
<div class="h-128 w-full" id="bit-scene-canvas-container">
191+
<div class="h-64 md:h-128 w-full" id="bit-scene-canvas-container">
192192
<BitTreeScene />
193193
</div>
194194
<div class="flex items-center justify-center h-12 gap-12">
195-
<div class="w-2/5 flex justify-end">
195+
<div class="w-1/3 flex justify-end">
196196
<a href="/">
197197
<img
198198
class="w-14"
@@ -201,7 +201,7 @@ const navLinks = [
201201
/>
202202
</a>
203203
</div>
204-
<div class="w-1/5 flex justify-center">
204+
<div class="w-1/3 flex justify-center">
205205
<a
206206
href="https://www.informatyka.agh.edu.pl/pl/"
207207
target="_blank"
@@ -213,7 +213,7 @@ const navLinks = [
213213
/>
214214
</a>
215215
</div>
216-
<div class="w-2/5 flex justify-start">
216+
<div class="w-1/3 flex justify-start">
217217
<a href="https://www.agh.edu.pl/" target="_blank">
218218
<img class="w-8" alt="Logo AGH" src={aghLogo.src} />
219219
</a>
@@ -223,9 +223,9 @@ const navLinks = [
223223
</main>
224224
<Section class="bg-stone-100" id="about">
225225
<Container class="grid gap-8 relative">
226-
<div class="flex flex-col gap-8">
226+
<div class="flex flex-col gap-4">
227227
<h2 class="text-2xl font-medium">O nas</h2>
228-
<p class="text-xl max-w-200">
228+
<p class="text-xl max-w-200 font-sans-snd">
229229
W Kole Naukowym BIT studenci AGH wspólnie rozwijają i dzielą
230230
się swoimi pasjami. Skupiamy osoby zafascynowane nowoczesnym
231231
tworzeniem oprogramowania, technologiami webowymi,
@@ -274,9 +274,9 @@ const navLinks = [
274274
</Container>
275275
</Section>
276276
<Section id="groups">
277-
<Container class="flex flex-col gap-8">
277+
<Container class="flex flex-col gap-4">
278278
<h2 class="text-2xl font-medium">Sekcje</h2>
279-
<p class="text-xl max-w-200">
279+
<p class="text-xl max-w-200 font-sans-snd">
280280
Poza realizacją własnych zainteresowań wspieramy się w nauce.
281281
Organizujemy zajęcia z matematyki i informatyki dla
282282
początkujących, aby wspólnie wymieniać się doświadczeniami i
@@ -364,7 +364,10 @@ const navLinks = [
364364
const gallery = document.querySelectorAll("#gallery > *");
365365

366366
gsap.from(gallery, {
367-
scrollTrigger: "#gallery",
367+
scrollTrigger: {
368+
trigger: "#gallery",
369+
start: "top 70%",
370+
},
368371
opacity: 0,
369372
y: 50,
370373
duration: 0.5,
@@ -378,7 +381,7 @@ const navLinks = [
378381
gsap.from(sections, {
379382
scrollTrigger: {
380383
trigger: "#sections",
381-
start: "top 95%",
384+
start: "top 70%",
382385
},
383386
opacity: 0,
384387
duration: 1,
@@ -393,7 +396,7 @@ const navLinks = [
393396
gsap.from(pills, {
394397
scrollTrigger: {
395398
trigger: ".board-scroll-trigger",
396-
start: "top 95%",
399+
start: "top 85%",
397400
},
398401
opacity: 0,
399402
duration: 1,

src/styles/global.css

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ html {
1616
font-display: swap;
1717
}
1818

19+
@font-face {
20+
font-family: "Exo";
21+
src: url("/fonts/Exo-VariableFont_wght.ttf") format("truetype");
22+
23+
font-weight: 100 900;
24+
font-stretch: 50% 200%;
25+
font-style: normal;
26+
font-display: swap;
27+
}
28+
1929
@theme {
20-
--font-sans: "Geist";
30+
--font-sans: "Exo", sans-serif;
31+
--font-sans-snd: "Geist", sans-serif;
2132
}

0 commit comments

Comments
 (0)