Skip to content

Commit e6dfb56

Browse files
added better mobile experience
1 parent 8da1496 commit e6dfb56

File tree

17 files changed

+573
-207
lines changed

17 files changed

+573
-207
lines changed

bun.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"astro": "^5.10.0",
1414
"caniuse-lite": "^1.0.30001698",
1515
"clsx": "^2.1.1",
16+
"hamburger-react": "^2.5.2",
1617
"moment": "^2.30.1",
1718
"moment-timezone": "^0.6.0",
1819
"motion": "^12.23.12",
@@ -522,6 +523,8 @@
522523

523524
"h3": ["[email protected]", "", { "dependencies": { "cookie-es": "^1.2.2", "crossws": "^0.3.5", "defu": "^6.1.4", "destr": "^2.0.5", "iron-webcrypto": "^1.2.1", "node-mock-http": "^1.0.2", "radix3": "^1.1.2", "ufo": "^1.6.1", "uncrypto": "^0.1.3" } }, "sha512-z5cFQWDffyOe4vQ9xIqNfCZdV4p//vy6fBnr8Q1AWnVZ0teurKMG66rLj++TKwKPUP3u7iMUvrvKaEUiQw2QWQ=="],
524525

526+
"hamburger-react": ["[email protected]", "", { "peerDependencies": { "react": "^16.8 || ^17 || ^18 || ^19" } }, "sha512-xsv/I7wQX1RDaulDnvMVCXMMRXnkwnUnkE8seD5eNVZJ4nIrjtK5LLA20l5x/pJ+mPWOzlFxW32VJ86Gbo2Njw=="],
527+
525528
"hast-util-from-html": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0", "devlop": "^1.1.0", "hast-util-from-parse5": "^8.0.0", "parse5": "^7.0.0", "vfile": "^6.0.0", "vfile-message": "^4.0.0" } }, "sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw=="],
526529

527530
"hast-util-from-parse5": ["[email protected]", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "hastscript": "^9.0.0", "property-information": "^7.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0", "web-namespaces": "^2.0.0" } }, "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg=="],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"astro": "^5.10.0",
2020
"caniuse-lite": "^1.0.30001698",
2121
"clsx": "^2.1.1",
22+
"hamburger-react": "^2.5.2",
2223
"moment": "^2.30.1",
2324
"moment-timezone": "^0.6.0",
2425
"motion": "^12.23.12",
10.5 KB
Loading
File renamed without changes.

src/components/contact/ContactComponent.astro

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,24 @@ import { AnimatedTooltip } from "@/components/ui/AnimatedToolTip";
55
---
66

77
<div
8-
class="relative flex h-[400px] w-full flex-col-reverse items-start justify-center gap-10 lg:flex-row"
8+
class="relative flex w-full flex-col-reverse items-center justify-start gap-10 lg:h-[400px] lg:flex-row lg:items-start lg:justify-center"
99
>
10-
<div class="relative flex w-1/2 items-end justify-end">
10+
<div
11+
class="relative flex aspect-[3/4] w-[300px] items-end justify-end lg:w-1/2"
12+
>
1113
<Image
1214
src={contactPhoto}
1315
alt="Ryan"
1416
width={300}
15-
class="absolute top-0 right-0 aspect-[3/4] -translate-x-7 translate-y-3 rounded-3xl object-cover"
17+
class="absolute top-1/2 left-1/2 aspect-[3/4] -translate-1/2 rounded-3xl object-cover lg:top-0 lg:right-0 lg:-translate-x-10 lg:translate-y-5"
1618
/>
1719
<div
18-
class="absolute top-0 right-0 -z-10 aspect-[3/4] w-[300px] -translate-x-10 translate-y-5 rounded-3xl bg-[#c98703]"
20+
class="absolute top-1/2 left-1/2 -z-10 aspect-[3/4] w-[300px] -translate-1/2 rounded-3xl bg-[#c98703] blur-lg lg:top-0 lg:right-0 lg:-translate-x-10 lg:translate-y-5"
1921
>
2022
</div>
2123
</div>
2224
<div
23-
class="flex h-full w-1/2 flex-col items-start justify-center text-left"
25+
class="flex w-full flex-col items-center justify-start text-left lg:h-full lg:w-1/2 lg:items-start lg:justify-center"
2426
>
2527
<h1
2628
class="[font-family:'Antonio',sans-serif] text-5xl leading-14 font-bold uppercase"

src/components/global/NavBar.astro

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
import { HoverNavigation } from "@/components/ui/HoverNavigation";
2+
import { HoverNavigation } from "@/components/ui/NavigationBar";
33
import { Image } from "astro:assets";
44
import pfp from "@/components/images/contact_photo_small.webp";
55
@@ -27,9 +27,8 @@ const navLinks = [
2727
];
2828
---
2929

30-
<div
31-
class="bg-secondary/90 fixed top-5 left-1/2 z-30 box-border flex -translate-x-1/2 items-center justify-center overflow-auto rounded-full border-2 border-solid border-gray-700 px-5 py-3"
32-
>
33-
<Image src={pfp} alt="Ryan" width={50} class="mr-3 rounded-full" />
34-
<HoverNavigation items={navLinks} client:load />
35-
</div>
30+
<HoverNavigation
31+
items={navLinks}
32+
client:load
33+
transition:name="hover-navigation"
34+
/>
Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
<script lang="ts">
2-
import { onMount } from "svelte";
3-
import Socials from "../socials/Socials.svelte";
2+
import { onMount } from "svelte";
3+
import Socials from "../socials/Socials.svelte";
44
5-
// Roles
6-
const typingInterval: number = 50;
5+
// Roles
6+
const typingInterval: number = 50;
77
8-
function addCharacter(str1: string, str2: string) {
9-
// str1: incomplete string, add a character after this
10-
// str2: complete string, add a character from this
8+
function addCharacter(str1: string, str2: string) {
9+
// str1: incomplete string, add a character after this
10+
// str2: complete string, add a character from this
1111
12-
let str1Length = str1.length;
13-
let str2Length = str2.length;
12+
let str1Length = str1.length;
13+
let str2Length = str2.length;
1414
15-
if (str1Length < str2Length) {
16-
return str1 + str2[str1Length];
17-
} else {
18-
return str1;
19-
}
20-
}
15+
if (str1Length < str2Length) {
16+
return str1 + str2[str1Length];
17+
} else {
18+
return str1;
19+
}
20+
}
2121
22-
function sleep(ms: number) {
23-
return new Promise((resolve) => setTimeout(resolve, ms));
24-
}
22+
function sleep(ms: number) {
23+
return new Promise((resolve) => setTimeout(resolve, ms));
24+
}
2525
26-
// Greeting
27-
let date = new Date();
28-
let hour = date.getHours();
26+
// Greeting
27+
let date = new Date();
28+
let hour = date.getHours();
2929
30-
let greeting: string = "";
30+
let greeting: string = "";
3131
32-
if (hour >= 0 && hour < 12) {
33-
greeting = "morning";
34-
} else if (hour >= 12 && hour < 18) {
35-
greeting = "afternoon";
36-
} else if (hour >= 18) {
37-
greeting = "evening";
38-
}
32+
if (hour >= 0 && hour < 12) {
33+
greeting = "morning";
34+
} else if (hour >= 12 && hour < 18) {
35+
greeting = "afternoon";
36+
} else if (hour >= 18) {
37+
greeting = "evening";
38+
}
3939
40-
let greetingState: string = $state("");
41-
let greetingPulse: HTMLElement;
40+
let greetingState: string = $state("");
41+
let greetingPulse: HTMLElement;
4242
43-
async function animateGreeting(greeting: string) {
44-
for (let i = 0; i < greeting.length; i++) {
45-
greetingState = addCharacter(greetingState, greeting);
43+
async function animateGreeting(greeting: string) {
44+
for (let i = 0; i < greeting.length; i++) {
45+
greetingState = addCharacter(greetingState, greeting);
4646
47-
if (i === greeting.length - 1) {
48-
greetingPulse.classList.remove("animate-pulse");
49-
greetingPulse.classList.add("hidden");
50-
}
47+
if (i === greeting.length - 1 && greetingPulse) {
48+
greetingPulse.classList.remove("animate-pulse");
49+
greetingPulse.classList.add("hidden");
50+
}
5151
52-
await sleep(typingInterval);
53-
}
54-
}
52+
await sleep(typingInterval);
53+
}
54+
}
5555
56-
// after window finish loading, call animateRoles()
57-
onMount(async () => {
58-
await sleep(500);
59-
animateGreeting(greeting);
60-
});
56+
// after window finish loading, call animateRoles()
57+
onMount(async () => {
58+
await sleep(500);
59+
animateGreeting(greeting);
60+
});
6161
</script>
6262

6363
<span>
64-
Good {greetingState}<span
65-
bind:this={greetingPulse}
66-
class="animate-pulse font-extralight">|</span
67-
></span
64+
Good {greetingState}<span
65+
bind:this={greetingPulse}
66+
class="animate-pulse font-extralight">|</span
67+
></span
6868
>

src/components/home/Intro.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Greeting from "./Greeting.svelte";
1111
<div class="flex h-20 flex-row">
1212
<div class="mr-1 flex w-20 items-center justify-center">
1313
<img
14-
src="/images/pfp_new.webp"
14+
src="/images/profile/pfp_new.webp"
1515
alt="Ryan"
1616
width="80"
1717
height="80"

src/components/skills/MoreSkills.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Skill from "./Skill.astro";
1616
{
1717
text: "DaVinci Resolve",
1818
bgColor: "white",
19-
hoverTextColor: "black",
19+
textColor: "black",
2020
},
2121
{
2222
text: "Twitch",
@@ -29,7 +29,7 @@ import Skill from "./Skill.astro";
2929
{
3030
text: "CapCut",
3131
bgColor: "white",
32-
hoverTextColor: "black",
32+
textColor: "black",
3333
},
3434
]}
3535
/>

0 commit comments

Comments
 (0)