Skip to content

Commit

Permalink
chore: update Navigation links
Browse files Browse the repository at this point in the history
 - improve CTA logic
  • Loading branch information
at-the-vr committed Aug 28, 2024
1 parent 57942c1 commit 0de2424
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "website",
"type": "module",
"version": "0.6.3",
"version": "0.6.4",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"format": "biome check --write ./ && prettier -w \"**/*\" --ignore-unknown --cache",
"lint": "biome check .",
"lint:fix": "biome check --write .",
"lint": "biome lint .",
"lint:fix": "biome lint --write .",
"format:ci": "pnpm run biome:write && pnpm run prettier:write",
"biome:write": "biome check --write ./",
"prettier:write": "prettier -w ./"
Expand Down
17 changes: 13 additions & 4 deletions src/components/CTA.astro
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
---
interface Props {
type Props = {
url: string;
text?: string;
}
const { url = "/", text } = Astro.props;
text: string;
ext?: boolean;
};
const {
url = "/",
text = "Click here",
ext = true
} = Astro.props;
const relAtt = ext ? "noopener noreferrer" : undefined;
---

<section>
<div class="mx-auto max-w-7xl border-x border-white/20">
<div class="group duration-200 hover:bg-primary">
<a
href={url}
rel={relAtt}
class="hover:rounded-0 inline-flex w-full items-center justify-center rounded-full bg-primary px-4 py-6 text-center text-3xl font-medium duration-200 hover:text-black focus:ring-0 lg:py-12 lg:text-6xl"
>{text}</a
>
Expand Down
1 change: 1 addition & 0 deletions src/components/CopyButton.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const { text } = Astro.props;
<button
id="copy-btn"
class="duration-200 hover:text-white/45 active:translate-y-2"
title="Copy to Clipboard"
>
<Icon name="copy" />
</button>
Expand Down
5 changes: 2 additions & 3 deletions src/components/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
>Atharva Types
</a>
<a
href="https://github.com/at-the-vr"
rel="noopener noreferrer"
href="/contact"
class="w-full bg-white px-6 py-4 text-lg text-black duration-200 hover:bg-black hover:text-white sm:rounded-full md:text-lg lg:ml-auto lg:w-auto"
>Github</a
>Contact</a
><a
href="/blog"
class="w-full bg-primary px-6 py-4 text-lg text-black duration-200 hover:bg-black hover:text-white sm:rounded-full md:text-lg lg:w-auto"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const description = "Sorry, couldn't find the page you're looking for.";
</div>
</div>
</section>
<CTA url="/" text="Home" />
<CTA url="/" text="Home" ext={false} />
</BaseLayout>
2 changes: 1 addition & 1 deletion src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ const description =
<Projects />
<OpenSource />
<Intro />
<CTA url="/contact" text="hit me up" />
<CTA url="https://github.com/at-the-vr" text="github" />
</BaseLayout>

0 comments on commit 0de2424

Please sign in to comment.