Skip to content
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

Add conditional support for target attribute on links in buttons in partial #3144

Open
2 tasks done
tratamentes opened this issue Sep 23, 2024 · 1 comment
Open
2 tasks done

Comments

@tratamentes
Copy link

Prerequisites

  • I have searched for duplicate or closed feature requests
  • I am mindful of the project scope

Proposal

Can we add the option to have the target="_blank" rel="noopener noreferrer" active in case necessary.

<a href="{{ .url }}"
{{ with .target }}target="{{ . }}" rel="noopener noreferrer"{{ end }}
class="mt-3 inline-flex items-center text-white bg-primary-700 hover:bg-primary-800 focus:ring-4 focus:ring-primary-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:focus:ring-primary-900">
{{ .text }}

It should work either for:

button:
target: _blank
text: ""
url: ""

OR

button:
text: ""
url: ""

Motivation and context

Not always, but I have found in my case that I am using a thirdparty service and I need it to open on a new window or tab. most of the time new tab, and I believe I'm not

Copy link

This issue is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the main branch, consider contributing a Pull Request with a fix.

If this is a feature request, and you feel that it is still relevant and valuable, consider contributing a Pull Request for review.

This issue will automatically close soon if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant