besteadfast / carbon

Steadfast's starter project - Craft CMS, Vite, and DDEV
3 stars 2 forks source link

Add default "Jump to Content" button #56

Open btbunze opened 5 months ago

DrewTJohnson commented 5 months ago

I went ahead and added an example Skip to Content button to Carbon. It translates on focus and has a small drop shadow. Right now I have it so it's the height of the default carbon navigation height. We would have to change it in the future to adapt to new repos or calculate the header height. Here's a screenshot of how that looks.

Screenshot 2024-01-11 at 9 43 07 AM
DrewTJohnson commented 5 months ago

The default state is no show (of course). We could also have the skip to content button be above the nav, but I think this achieves the same goal and gives us an option to do some styles to the button to better adapt to some of the client sites.