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

Create links that open in new tab when clicked #18

Open
EmmaCartuyvels1 opened this issue Aug 25, 2020 · 6 comments
Open

Create links that open in new tab when clicked #18

EmmaCartuyvels1 opened this issue Aug 25, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@EmmaCartuyvels1
Copy link
Collaborator

Should be possible using this syntax:

link{target="_blank"}

@peterdesmet
Copy link
Member

It is generally considered better user experience if the choice to open a link in a new tab is left to the user (who can use Ctrl + click on Windows or Cmd + click on Mac). Forcing this can be annoying, especially on mobile devices, because it breaks the chain of Previous/Next page in your browser. It can work for some type of links, but then it has to be done very consistently.

I would therefore not implement this for the coding club website. Closing issue, but please reopen if you do not agree.

@EmmaCartuyvels1
Copy link
Collaborator Author

I should have specified better, I meant the link in the coding club presentations.

@damianooldoni damianooldoni reopened this Aug 25, 2020
@damianooldoni
Copy link
Member

Thanks @peterdesmet and @EmmaCartuyvels1!
Some observations:

  1. coding club slides are mainly used while programming, so using a laptop, I would be not so much concerned about side effects on mobile devices
  2. as @EmmaCartuyvels1 said, I would not apply it to ALL site, but only to the links in the slides, e.g. download cheatsheets, go to hackmd, open challenge file

It is at least worth a try.

@damianooldoni damianooldoni self-assigned this Aug 25, 2020
@damianooldoni damianooldoni added the enhancement New feature or request label Aug 25, 2020
@damianooldoni
Copy link
Member

@EmmaCartuyvels1 : I have just checked your option locally but I am afraid it doesn't work properly on GitHub Pages:

image

I will check further

@damianooldoni
Copy link
Member

damianooldoni commented Aug 25, 2020

It seems that there is no better way than using basic html syntax:

<a href="https://inbo.be" target="_blank" rel="noopener noreferrer">Inbo</a>

If somebody finds something else, please shoot it! The less code I have to write to make the slides, the better.

@florisvdh
Copy link
Member

Most posts at stackoverflow drop the rel attribute, but it seems better to keep it for security reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants