Skip to content

Add CTA buttons for adding projects and joining the webring#25

Open
davewjrh wants to merge 1 commit into
mainfrom
20-cta-buttons
Open

Add CTA buttons for adding projects and joining the webring#25
davewjrh wants to merge 1 commit into
mainfrom
20-cta-buttons

Conversation

@davewjrh

Copy link
Copy Markdown
Member

An "Add a project" button and "Join the webring" button have been added to their corresponding page header rows.

@davewjrh davewjrh left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The transition/hover properties were not working as expected until the line @custom-variant hover (&:hover); was added to global.css, as this would override Tailwinds @media (hover: hover) wrapper for touchscreen devices. The trade-off for this meant that hover effects can become 'stuck' if a tap event is triggered until a tap elsewhere is detected.

@davewjrh davewjrh linked an issue Jul 24, 2026 that may be closed by this pull request
7 tasks
Comment thread src/pages/projects.astro
</p>
</div>

<a

@AJaccP AJaccP Jul 25, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button looks good overall, but could you pull it out into a shared component at src/components/CTAButton.Astro that takes label and href as props. This helps prevent the two buttons' definitions from drifting (which they slightly have already)

  • /projects has duration-200, /webring doesn't — so the hover fade runs at 200ms on one page and Tailwind's default 150ms on the other.
  • One uses gap-1, the other gap-x-1.

They're minor differences and not actually noticeable right now, but it would still be nice to ensure that both stay consistent.

The frontmatter for the component would be something like:

import { Icon } from 'astro-icon/components';

interface Props {
  label: string;
  href: string;
}

const { label, href } = Astro.props;

The actual would be mostly the same, I'd say use what's on /projects now (the one with duration-200 and gap-1) and swap the hardcoded urls + labels for props ( {href} and {label} )

Then each page can just use the component in place of the , for example:

<CTAButton
  label="Add a project"
  href="https://github.com/CarletonComputerScienceSociety/showcase#adding-a-project"
/>

One more minor fix while you're making these changes:

  • opacity-100 as an explicit class can be removed since that's the default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add CTA buttons for adding projects and joining the webring

2 participants