-
-
Notifications
You must be signed in to change notification settings - Fork 364
feat: Add search as a shortcode #534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for hugo-hextra ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
thanks! I think this is very nice to have, which helps address #380 more easily |
|
I take recommendations on how to deal with the My own solution was to set it's width to I'm not sure I can handle extending and positioning without Javasript. |
|
In the end I set the width of the results to 100%, without JS I'm not sure I can make it dynamic enough, only more opinionated. unique styling classes are exposed for each shortcode to make styling them easier, although I could expose a "class" parameter too. Please see the documentation to decide if the exposed interface is good enough, although it feels like it's worth differentiating between the shortcode and the elements in the navbar even more. |
Again, I'm not sure if it's particularly useful, but I opened it because maybe it's desired. I wish I could make the shortcode more convenient. It can be closed if it's not needed.
Maybe this is not even the best way to do this, I'm not sure.
Changes:
nameas a required parameternot-proseto some search elements to prevent.contentstyling them over incorrectlysearch-(wrapper|input|results)-XKnown issues:
nameis required, but it could be generated (not random!)hx-max-w-[min(calc(100vw-2rem),calc(100%+20rem))]), the+20remis the problem, so currently manual adjustment is needed incustom.css.