Closed tylersticka closed 8 years ago
@tylersticka @erikjung
Trying to work through this one. My thought was to do something like this:
<h2 id="{{data.name}}">
{{data.name}}
</h2>
The issue with this is the data.name
could be something like List Elements
. It should instead be list-elements
. I imagine I need to create a handlebars helper to take care of this? If so, where does the helper get registered? I don't see (within Drizzle
) any Handlebars helpers registered at all. Looking for some guidance. 😄
@mrgerardorodriguez I believe we manage that in a separate repo, and I think there may already be a helper for it: https://github.com/cloudfour/core-hbs-helpers/blob/master/lib/toSlug.js
@tylersticka Bahahaha! Well then, thank you! 😁
and perhaps some anchor helpers
Can you expand on this @tylersticka?
@mrgerardorodriguez Certainly!
Basically, I'm wondering if it would be beneficial to include some sort of <a>
for the permalink to allow for easy copy-paste of the hash URLs.
I know we've already got text and labels and all sorts of stuff going on, so it may or may not be a good fit for something like this:
It could be as simple as linking the pattern headings and creating a utility to override link styles until hover...
.u-hiddenLink:not(:hover, :focus, :active) {
color: inherit !important;
text-decoration: none !important;
}
Anyway, just some ideas!
It'd be nice to be able to link to a specific pattern heading on a collections page using a
#
hash URL.