Replies: 1 comment
-
Thank you, that's exactly what I was looking for. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This can be removed if deemed not relevant, but it might be useful for people that run into the same 'issue'. On a website we have a bunch of links. Sometimes links that point to another page, but also links that point towards an external website. It is helpful for users (accessibility reasons) to know when a link will open a page on another website. This is oftentimes done with an external link icon.
This person created a nice render hook that checks if a link is external (by looking at an http or https string in the link) and then adds an external link icon. Attention was also paid to best practices such as the aria attributes. Unfortunately this example makes use of font awesome instead of tabler.io like we use in Doks. I therefore adjusted the code so that it uses the default external tabler icon and also looks good with the standard scss.
Example

Code render-link.html:
Beta Was this translation helpful? Give feedback.
All reactions