Skip to content

Commit

Permalink
added animating lines (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
nahiyankhan authored Oct 9, 2024
1 parent 16c6b7f commit d7de04d
Show file tree
Hide file tree
Showing 17 changed files with 240 additions and 306 deletions.
Binary file modified public/nahiyankhan_resume.pdf
Binary file not shown.
4 changes: 4 additions & 0 deletions src/alpine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ export default (Alpine: Alpine) => {
this.open = !this.open
},
} as Settings)

Alpine.store('container', {
width: 0
})
}
33 changes: 13 additions & 20 deletions src/components/About.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Education from "@/assets/education.svg?raw";
import Mantras from "@/assets/mantras.svg?raw";
import JHULogo from "@/assets/jhu.svg?raw";
import MacalesterLogo from "@/assets/macalester.svg?raw";
import Subtitle from "./Subtitle.astro";
---

<Section title="about">
Expand All @@ -19,12 +20,8 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
step to being sorta good at something.
</p>
</div>

<div
class="redact redact-show relative mb-12 inline-flex w-[fit-content] border-t text-textProminent sm:mb-24 [&>svg]:h-5 sm:[&>svg]:h-12"
>
<Fragment set:html={Education} />
</div>

<Subtitle title="education" />

<div class="mb-2 sm:mb-8 sm:w-1/2">
<div class="mb-2 flex flex-col sm:mb-4 sm:flex-row [&>svg]:w-12 sm:[&>svg]:w-16">
Expand Down Expand Up @@ -54,16 +51,12 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
<p class="">Math Major, Computer Science and Art Minors</p>
</div>

<div
class="redact redact-show relative mb-12 inline-flex w-[fit-content] border-t text-textProminent sm:mb-16 [&>svg]:h-5 sm:[&>svg]:h-12"
>
<Fragment set:html={Mantras} />
</div>
<Subtitle title="mantras" />

<div class="mb-2 text-base font-medium sm:text-xl">Work</div>

<ul class="mb-4 sm:mb-8 sm:w-1/2">
<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand All @@ -72,10 +65,10 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
name="mdi:circle-small"
/>
</div>
<p class="pl-4">Work in the open</p>
<p class="pl-4">Trust by default</p>
</li>

<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand All @@ -84,10 +77,10 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
name="mdi:circle-small"
/>
</div>
<p class="pl-4">Document it all</p>
<p class="pl-4">Work in the open</p>
</li>

<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand All @@ -96,14 +89,14 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
name="mdi:circle-small"
/>
</div>
<p class="pl-4">Trust by default</p>
<p class="pl-4">Document it all</p>
</li>
</ul>

<div class="mb-2 text-base font-medium sm:text-xl">Personal</div>

<ul class="mb-8 sm:mb-16 sm:w-1/2">
<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand All @@ -115,7 +108,7 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
<p class="pl-4">Sucking at something is the first step to being sorta good at something</p>
</li>

<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand All @@ -127,7 +120,7 @@ import MacalesterLogo from "@/assets/macalester.svg?raw";
<p class="pl-4">Don’t let your dreams be dreams (to justify my 3am purchases)</p>
</li>

<li class="mb-1 flex items-center sm:mb-2">
<li class="flex items-center">
<div class="full justify-left flex items-center">
<Icon
aria-hidden="true"
Expand Down
28 changes: 28 additions & 0 deletions src/components/BoxLines.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
const random = Math.floor(Math.random() * 10000);
const boxLineRef = `boxLines${random}`;
---

<div
x-data="{ inview: false }"
x-ref={boxLineRef}
@scroll.window=`inview = $refs.${boxLineRef}.getBoundingClientRect().top <= (window.innerHeight * 3/4)`
x-init=`inview = $refs.${boxLineRef}.getBoundingClientRect().top <= (window.innerHeight * 3/4)`
class="absolute h-full w-full"
>
<div
class="absolute right-0 top-0 h-full w-[1px] bg-divider transition-all duration-1000"
:style="inview && { height: `calc(100% + 64px)`, transform: `translateY(-32px)` }"
>
</div>
<div
class="absolute left-0 top-0 h-[1px] w-full bg-divider transition-all duration-1000"
:style="inview && { width: `calc(100% + 32px)` }"
>
</div>
<div
class="absolute bottom-0 left-0 h-[1px] w-full bg-divider transition-all duration-1000"
:style="inview && { width: `calc(100% + 32px)` }"
>
</div>
</div>
33 changes: 9 additions & 24 deletions src/components/Experiences.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,21 @@ import Community from "@/assets/community.svg?raw";
import Section from "./Section.astro";
import { Icon } from "astro-icon/components";
import ExperienceSneak from "@/assets/experience.gif";
import Subtitle from "./Subtitle.astro";
import BoxLines from "./BoxLines.astro";
---

<Section title="experiences">
<div class="mb-12 mt-2 sm:mb-24 sm:mt-4 sm:w-3/5">
<p class="leading-[1.6] sm:leading-[1.75]">A.K.A The things I am more than sorta good at.</p>

<div class="mt-10">
<div class="relative mt-10 w-max">
<BoxLines />
<img src={ExperienceSneak.src} class="" height={ExperienceSneak.height} alt="" />
</div>
</div>

<div class="border-t">
<div
class="redact redact-show relative mb-12 inline-flex w-[fit-content] text-textProminent sm:mb-24 [&>svg]:h-5 sm:[&>svg]:h-12"
>
<Fragment set:html={Current} />
</div>
</div>
<Subtitle title="current" />

<div class="mb-12 sm:mb-20 sm:w-3/5">
<div class="mb-2 flex flex-col sm:mb-4 sm:flex-row [&>svg]:w-12 sm:[&>svg]:w-16">
Expand All @@ -42,20 +39,14 @@ import ExperienceSneak from "@/assets/experience.gif";
</div>

<p class="leading-[1.6] sm:leading-[1.75]">
Brought design's high bar of craft to code and stood up Cash App's design system function. Set
up cross-platform design infrastructures, brought parity between design and code vernacular,
Stood up Cash App's design system function to deliver a high bar of design craft. Set up
cross-platform design infrastructure, brought parity between design and code vernacular,
evangelized modular development, and supported 40+ components being built and tested. Kicked
off migration efforts to adopt the new system across 145+ flows covering 85% of app traffic.
</p>
</div>

<div class="border-t">
<div
class="redact redact-show relative mb-12 inline-flex w-[fit-content] text-textProminent sm:mb-24 [&>svg]:h-5 sm:[&>svg]:h-12"
>
<Fragment set:html={Past} />
</div>
</div>
<Subtitle title="past" />

<div class="mb-12 sm:mb-20 sm:w-3/5">
<div class="mb-2 flex flex-col sm:mb-4 sm:flex-row [&>svg]:w-12 sm:[&>svg]:w-16">
Expand Down Expand Up @@ -110,13 +101,7 @@ import ExperienceSneak from "@/assets/experience.gif";
</p>
</div>

<div class="border-t">
<div
class="redact redact-show relative mb-12 inline-flex w-[fit-content] text-textProminent sm:mb-24 [&>svg]:h-5 sm:[&>svg]:h-12"
>
<Fragment set:html={Community} />
</div>
</div>
<Subtitle title="community" />

<div class="mb-12 sm:mb-20 sm:w-3/5">
<div class="mb-2 flex flex-col sm:mb-4 sm:flex-row">
Expand Down
30 changes: 19 additions & 11 deletions src/components/Intro.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@
import NahiyanKhan from "@/assets/nahiyankhan.svg?raw";
import { Icon } from "astro-icon/components";
import AboutSneak from "@/assets/about.gif";
import BoxLines from "./BoxLines.astro";
---

<div x-data class="w-full border-b transition-all">
<div class="container flex min-h-[50vh] flex-col border-x sm:mx-auto">
<div
class="redact redact-show relative mb-2 w-[fit-content] pt-2 text-textProminent sm:mb-4 [&>svg]:h-7 sm:[&>svg]:h-24"
x-ref="introNK"
x-init="$store.header.introNKHeight = $refs.introNK.getBoundingClientRect().height"
x-resize="$store.header.introNKHeight = $height"
>
<Fragment set:html={NahiyanKhan} />
<div
x-data
class="border-x border-transparent [transition:border-color_.3s_.7s]"
:style="{ borderColor: `hsl(var(--border-divider))` }"
>
<div class="flex min-h-[50vh] flex-col">
<div class="w-full">
<div
class="relative mb-2 w-[fit-content] text-textProminent sm:mb-4 [&>svg]:h-7 sm:[&>svg]:h-24"
x-ref="introNK"
x-init="$store.header.introNKHeight = $refs.introNK.getBoundingClientRect().height"
x-resize="$store.header.introNKHeight = $height"
>
<Fragment set:html={NahiyanKhan} />
</div>
</div>
<p class="subtitle-large">(na-he-yahn). Or Khan. 🖖🏽</p>

<div class="mb-16 sm:mb-24 sm:w-3/5">
<div class="mb-8 mt-10 sm:mb-16">
<div class="relative mb-8 mt-10 w-max sm:mb-16">
<BoxLines />
<img src={AboutSneak.src} class="" height={AboutSneak.height} alt="" />
</div>

Expand All @@ -27,7 +35,7 @@ import AboutSneak from "@/assets/about.gif";
</p>

<p class="subtitle-large mb-4 sm:mb-6">
But 9 to 5, I am in my zone leading design system strategy and building out design infras.
But 9 to 5, I lead design system strategy and build design infrastructures.
</p>

<a
Expand Down
69 changes: 69 additions & 0 deletions src/components/Lines.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<div
class="fixed left-0 top-0 z-10"
x-data="{ v2: 0 }"
x-on:load.window="v2 = (window.innerWidth - $store.container.width)/2 + $store.container.width"
>
<!-- v1: vertical-left -->
<div
class="initial-v1-position pointer-events-none fixed left-0 top-0 h-0 w-[1px] bg-divider opacity-100 [transition:height_.4s_cubic-bezier(0.85,0,0.15,1)_0.3s,opacity_.3s_1s] [will-change:transform]"
:style="{ height: `100%`, opacity: '0' }"
>
</div>

<!-- v2: vertical-right -->
<div
class="initial-v2-position pointer-events-none fixed right-0 top-0 h-0 w-[1px] bg-divider opacity-100 [transition:height_.4s_cubic-bezier(0.85,0,0.15,1)_0.3s,opacity_.3s_1s] [will-change:transform]"
:style="{ height: `100%`, opacity: '0' }"
>
</div>

<!-- h1: horizontal-top -->
<div
class="pointer-events-none fixed left-0 top-0 h-[1px] w-0 bg-divider opacity-100 [transition:width_.4s_cubic-bezier(0.85,0,0.15,1)_0.3s,opacity_.3s_1s] [will-change:transform] sm:translate-y-[95px]"
:style="{ width: `100%`, opacity: '0' }"
>
</div>
</div>

<style>
:root {
--initial-v-position: 0;
}

@media (min-width: 640px) {
:root {
--initial-v-position: 640px;
}
}

@media (min-width: 768px) {
:root {
--initial-v-position: 768px;
}
}

@media (min-width: 1024px) {
:root {
--initial-v-position: 1024px;
}
}

@media (min-width: 1280px) {
:root {
--initial-v-position: 1280px;
}
}

@media (min-width: 1536px) {
:root {
--initial-v-position: 1536px;
}
}
.initial-v1-position {
transform: translateX(calc((100vw - var(--initial-v-position)) / 2));
}

.initial-v2-position {
transform: translateX(calc(((100vw - var(--initial-v-position)) / 2) * -1));
}
</style>
5 changes: 1 addition & 4 deletions src/components/Projects.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import Section from "./Section.astro";

<Section title="projects">
<div class="mb-12 mt-4 sm:mb-24 sm:mt-8 sm:w-1/2">
<p class="leading-[1.6] sm:leading-[1.75]">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Ad, alias, iste ex, quas nesciunt
reiciendis accusamus nam nemo consectetur.
</p>
<p class="leading-[1.6] sm:leading-[1.75]">Bite size samplings of a greater whole</p>
</div>
</Section>
Loading

0 comments on commit d7de04d

Please sign in to comment.