Skip to content

Commit

Permalink
button display fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorobreza committed Jan 16, 2024
1 parent ae87a6a commit 45fe405
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/projects/IntroProjectsSection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Props {
description?: string;
}
const currentPath = Astro.url.pathname;
console.log(currentPath);
const { allPostsButton, mainTitle, description } = Astro.props;
---

Expand Down
46 changes: 41 additions & 5 deletions src/components/projects/ProjectsCardList.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
import PrimaryButton from "../buttons/PrimaryButton.astro";
import SecondaryButton from "../buttons/SecondaryButton.astro";
interface Props {
title: string;
}
const { title } = Astro.props;
const currentPath = Astro.url.pathname;
---

<div
Expand All @@ -13,11 +15,45 @@ const { title } = Astro.props;
<h2>{title}</h2>
<div class="flex flex-col gap-y-6 divide-y divide-ghost-white/35 w-full">
<slot />
<div class="self-center w-full flex justify-center pt-6">
<PrimaryButton href="/">
<p class="text-sm">Home</p>
</PrimaryButton>
</div>

{
currentPath.includes("projects-tags") ? (
<div class=" flex pt-6">
<SecondaryButton href="/projects">
<div class="flex gap-x-1">
<svg
xmlns="http://www.w3.org/2000/svg"
class="icon icon-tabler icon-tabler-arrow-badge-left-filled"
width="20"
height="20"
viewBox="0 0 24 24"
stroke-width="2"
stroke="currentColor"
fill="none"
stroke-linecap="round"
stroke-linejoin="round"
>
<>
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path
d="M17 6h-6a1 1 0 0 0 -.78 .375l-4 5a1 1 0 0 0 0 1.25l4 5a1 1 0 0 0 .78 .375h6l.112 -.006a1 1 0 0 0 .669 -1.619l-3.501 -4.375l3.5 -4.375a1 1 0 0 0 -.78 -1.625z"
stroke-width="0"
fill="currentColor"
/>
</>
</svg>
<p class="text-sm">All Projects</p>
</div>
</SecondaryButton>
</div>
) : (
<div class="self-center w-full flex justify-center pt-6">
<PrimaryButton href="/">
<p class="text-sm">Home</p>
</PrimaryButton>
</div>
)
}
</div>
</div>
</div>

0 comments on commit 45fe405

Please sign in to comment.