Skip to content

Commit

Permalink
Change all external link targets from ext to _blank (#340)
Browse files Browse the repository at this point in the history
* Change all external link targets from ext to _blank

* Add missing `rel`s
  • Loading branch information
Aquaj authored Nov 21, 2023
1 parent 51703cf commit 58c2167
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/components/footer/copyright_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= link_to "Pilou", "slack://user?team=T02NE0241&id=URZ0F4TEF", class: "link-slack" %> &
<%= link_to "Aquaj", "slack://user?team=T02NE0241&id=U0J5GUEAW", class: "link-slack" %>
<%= link_to "https://github.com/pil0u/lewagon-aoc", target: :ext, class: "link-external hover:text-other-green" do %>
<%= link_to "https://github.com/pil0u/lewagon-aoc", target: :_blank, rel: "noopener", class: "link-external hover:text-other-green" do %>
<i class="fab fa-github"></i>
<% end %>
</p>
2 changes: 1 addition & 1 deletion app/views/days/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<% if @day <= Aoc.latest_day %>
<span>·</span>
<%= link_to "link to puzzle", Aoc.url(@day), target: :ext, class: "link-explicit link-external" %>
<%= link_to "link to puzzle", Aoc.url(@day), target: :_blank, rel: "noopener", class: "link-explicit link-external" %>
<% end %>
</div>

Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/code_of_conduct.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<h3 class="strong">Please, don't try to break in</h3>
<p>
Attempting to access the platform in unauthorized ways is not permitted and is not fun for the community or the
Admins. The platform's code is <%= link_to "open", "https://github.com/pil0u/lewagon-aoc/", target: :ext, class: "link-explicit link-external" %>
Admins. The platform's code is <%= link_to "open", "https://github.com/pil0u/lewagon-aoc/", target: :_blank, rel: "noopener", class: "link-explicit link-external" %>
and all the data you can find here is available upon request. Also, scores are computed from AoC's data, so they
cannot be changed by breaking in <em>here</em> anyway.
</p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/faq.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<div class="flex flex-col gap-y-2 text-justify">
<p>
<%= link_to "Advent of Code", "https://adventofcode.com/", target: :ext, class: "link-explicit link-external" %>
<%= link_to "Advent of Code", "https://adventofcode.com/", target: :_blank, rel: "noopener", class: "link-explicit link-external" %>
is an Advent calendar of small programming puzzles that you can solve in any programming language.
</p>
<p>
Expand Down
9 changes: 6 additions & 3 deletions app/views/pages/setup.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<%= link_to(
"Log in to Advent of Code",
"https://adventofcode.com/auth/login",
target: :ext,
target: :_blank,
rel: "noopener",
class: "link-explicit link-external"
) %>, using either your GitHub account or another OAuth option.
</li>
Expand All @@ -40,7 +41,8 @@
<%= link_to(
"Go to this page",
"https://adventofcode.com/leaderboard/private",
target: :ext,
target: :_blank,
rel: "noopener",
class: "link-explicit link-external"
) %>, enter the following code <code class="strong"><%= current_user.private_leaderboard %></code> and click [Join].
</p>
Expand All @@ -54,7 +56,8 @@
<%= link_to(
"your settings",
"https://adventofcode.com/settings",
target: :ext,
target: :_blank,
rel: "noopener",
class: "link-explicit link-external"
) %>. It's the number next to <code>anonymous user #<span class="strong">XXXXXXX</span></code>.
</li>
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/welcome.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="flex flex-col text-justify max-w-prose mx-auto gap-y-6">
<p>
<%= link_to "Advent of Code", "https://adventofcode.com/", target: :ext, class: "link-explicit link-external" %>
<%= link_to "Advent of Code", "https://adventofcode.com/", target: :_blank, rel: "noopener", class: "link-explicit link-external" %>
is an Advent calendar of small programming puzzles that can be solved in any programming language you like.
</p>

Expand Down

0 comments on commit 58c2167

Please sign in to comment.