Skip to content

Commit

Permalink
chore: update components
Browse files Browse the repository at this point in the history
  • Loading branch information
rxyhn committed Sep 24, 2024
1 parent 485ff74 commit a5ba6e0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/components/Button.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const { icon, href, label } = Astro.props;
<a
href={href}
target="_blank"
class="group flex w-fit items-center gap-2 rounded border border-neutral-300 px-3 py-2 hover:bg-neutral-200 dark:border-neutral-700 dark:hover:bg-neutral-800"
class="group flex w-fit items-center rounded border border-neutral-300 px-3 py-2 hover:bg-neutral-200 dark:border-neutral-700 dark:hover:bg-neutral-800"
aria-label={label}
>
<span
Expand Down
2 changes: 1 addition & 1 deletion src/components/Photo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function Photo({ imageSrc, imageAlt }: PhotoProps) {
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ delay: 2.4, duration: 0.4, ease: "easeInOut" }}
className="absolute h-[298px] w-[298px] p-10 xl:h-[498px] xl:w-[498px]"
className="absolute h-[298px] w-[298px] p-10 mix-blend-lighten xl:h-[498px] xl:w-[498px]"
>
<img
src={imageSrc}
Expand Down
45 changes: 13 additions & 32 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
import Button from "@/components/Button.astro";
import Container from "@/components/Container.astro";
import Photo from "@/components/Photo";
import PageLayout from "@/layouts/PageLayout.astro";
import { SITE } from "@/consts";
Expand All @@ -10,36 +9,19 @@ const { name, label, summary, socials } = basics;

<PageLayout title="Home" description={SITE.DESCRIPTION}>
<section class="h-full">
<Container size="xl">
<div class="my-24 flex h-screen items-center justify-center xl:my-0">
<div
class="flex flex-col-reverse items-center justify-between xl:flex-row"
>
<div class="flex h-full items-center justify-center">
<div class="container mx-auto">
<div class="flex flex-col items-center justify-between xl:flex-row">
<!-- Text Section -->
<div class="w-full text-justify xl:w-1/2 xl:text-start">
<div class="flex flex-col items-start gap-2">
<p
class="text-md tracking-tight text-neutral-900 dark:text-neutral-50 xl:text-xl"
>
Hi, my name is
</p>
<h1
class="bg-gradient-to-b from-neutral-900 to-neutral-600 bg-clip-text text-start text-4xl font-bold tracking-tight text-transparent dark:from-neutral-50 dark:to-neutral-400 xl:text-8xl"
>
{name}.
</h1>
</div>
<p
class="text-md mt-2 font-medium text-black/75 dark:text-white/75 xl:text-xl"
>
{label}.
</p>
<p
class="text-md mt-2 font-medium text-black/75 dark:text-white/75 xl:text-xl"
<div class="order-2 text-center xl:order-none xl:text-left">
<span class="text-xl">Hi, my name is</span>
<h1 class="mb-6 text-[48px] font-bold leading-[1.1] xl:text-[80px]">
{name}
</h1>
<p class="mb-8 max-w-[500px] text-white/80">{label} {summary}</p>
<div
class="flex flex-row items-center justify-center gap-8 xl:justify-start"
>
{summary}.
</p>
<div class="mt-5 flex flex-wrap items-center gap-6">
{
socials.map((item) => (
<Button
Expand All @@ -51,13 +33,12 @@ const { name, label, summary, socials } = basics;
}
</div>
</div>

<!-- Photo Section -->
<div class="mb-8 xl:mb-0">
<div class="order-1 mb-8 xl:order-none xl:mb-0">
<Photo client:load imageSrc="/assets/photo.png" imageAlt={name} />
</div>
</div>
</div>
</Container>
</div>
</section>
</PageLayout>

0 comments on commit a5ba6e0

Please sign in to comment.