astro-theme-cactus icon indicating copy to clipboard operation
astro-theme-cactus copied to clipboard

Added Github card

Open Fabrizz opened this issue 11 months ago • 4 comments

What kind of changes does this PR include?

  • Added a Github Card (::github{repo="chrismwilliams/astro-theme-cactus" leaf directive) https://talk.commonmark.org/t/generic-directives-plugins-syntax/444#:~:text=2.%20Leaf%20Block%20Directives

Description

  • Added the remark plugin to handle leaf directives for the Github card. (Using the refractored remark-admonitions.ts as a template, no new deps)
  • Added the css to handle the card + inlined the icons
  • The card loads with a pulsating skeleton, when the content is fetched it gets populated. If it cant reach the Github API (connection, rete-limit, etc) only the title/link is shown.
  • Automatically converts a link or just the username/repo. image

Fabrizz avatar Dec 09 '24 00:12 Fabrizz

Deploy Preview for astro-theme-cactus ready!

Name Link
Latest commit 745451c294f5f8ecf648505f486e6ed1d9067bb2
Latest deploy log https://app.netlify.com/projects/astro-theme-cactus/deploys/6867cb01d1c9720008242e4f
Deploy Preview https://deploy-preview-335--astro-theme-cactus.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 09 '24 00:12 netlify[bot]

It seems that for some reason the remark-admonitions.ts transformUnhandledDirective function breaks the leaf directives. Putting it before the remarkAdmonitions plugin makes the plugin work.

Fabrizz avatar Dec 09 '24 05:12 Fabrizz

Hi @Fabrizz, thanks for doing this. I'll circle back round to look at this properly once I've updated the theme to tailwind v4. I'm hoping to remove tailwind.config.ts and convert it to css.

chrismwilliams avatar Jan 06 '25 11:01 chrismwilliams

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Feb 05 '25 23:02 github-actions[bot]

Tailwind has been updated. Maybe this PR can be merged soon.

metters avatar Jun 28 '25 06:06 metters

Think this is ready now. Took a lot more time than I anticipated

chrismwilliams avatar Jul 04 '25 14:07 chrismwilliams