Skip to content

Commit

Permalink
added buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ajolipa committed Mar 5, 2024
1 parent 41d8300 commit b341282
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions astro-web/src/components/Button.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
export interface Props {
light?: boolean
href?: string
}
const { light, href } = Astro.props
const className = `inline-flex center items-center justify-center rounded-full pr-4 pl-4 lg:pl-6 lg:pr-6 py-3 text-sm font-semibold transition ${ light ? 'bg-white text-neutral-dark hover:bg-neutral' : 'bg-neutral-dark text-white hover:bg-neutral-gray'}`;
---
<a href={ href || '#' }>
<button class={className}>
<slot />
</button>
</a>
8 changes: 7 additions & 1 deletion astro-web/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Hero from "../components/Hero.astro";
import Container from "../components/Container.astro";
import FeatureTabs from "../components/FeatureTabs";
import ProjectCard from "../components/ProjectCard.astro";
import Button from "../components/Button.astro";
import lizard from "../assets/footer/MKLizard.png";
import nsf from "../assets/footer/NSF.png";
import pss from "../assets/footer/Performant_Logo.svg";
Expand All @@ -20,7 +21,9 @@ import { Image } from "astro:assets";
<p class="text-neutral-gray">
EditionCrafter is an easy-to-use tool for scholars, educators, and research institutions to publish digital critical editions in a low-cost and sustainable manner.
</p>
<!-- button -->
<Button>
Get Started &rarr;
</Button>
</div>
</Hero>

Expand Down Expand Up @@ -88,6 +91,9 @@ import { Image } from "astro:assets";
<p class="text-neutral-gray">
Lorem ipsum dolor sit amet consectetur. Auctor quam arcu magna curabitur pulvinar. Volutpat mauris faucibus nunc leo nullam nulla. Ultrices orci nulla elementum tincidunt non odio volutpat. Tincidunt mauris justo nam.
</p>
<Button>
Get Started &rarr;
</Button>
</div>
<div class="flex flex-col gap-6 md:w-1/2">
<div class="w-full">
Expand Down

0 comments on commit b341282

Please sign in to comment.