Skip to content

Commit bd64e8e

Browse files
authored
Merge pull request #50 from ethmarks/remove-target-blank
remove target blank and rel noopener
2 parents 38468de + 5bb432d commit bd64e8e

4 files changed

Lines changed: 16 additions & 18 deletions

File tree

assets/js/ethmarks-components.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class EthmarksHeader extends HTMLElement {
1414
</nav>
1515
</header>`;
1616

17-
const activeLink = this.getAttribute('active');
17+
const activeLink = this.getAttribute("active");
1818
if (activeLink) {
19-
const targetLink = this.querySelector('#nav-' + activeLink.toLowerCase());
19+
const targetLink = this.querySelector("#nav-" + activeLink.toLowerCase());
2020
if (targetLink) {
21-
targetLink.classList.add('active');
21+
targetLink.classList.add("active");
2222
}
2323
}
2424
}
@@ -29,17 +29,17 @@ class EthmarksFooter extends HTMLElement {
2929
this.innerHTML = `
3030
<footer>
3131
<span id="source">
32-
<a href="https://github.com/ethmarks/ethmarks.github.io" id="sourcelink" target="_blank">Website Source</a>
32+
<a href="https://github.com/ethmarks/ethmarks.github.io" id="sourcelink">Website Source</a>
3333
</span>
3434
<span id="copyright"><a href="https://ethmarks.github.io/about/">Ethan Marks</a>, &copy;2026</span>
3535
<span id="email">
36-
<a href="mailto:ethmarks.dev@gmail.com" target="_blank">Contact</a>
36+
<a href="mailto:ethmarks.dev@gmail.com">Contact</a>
3737
</span>
3838
</footer>`;
3939

40-
const sourceLink = this.getAttribute('source');
40+
const sourceLink = this.getAttribute("source");
4141
if (sourceLink) {
42-
const sourceAnchor = this.querySelector('a#sourcelink');
42+
const sourceAnchor = this.querySelector("a#sourcelink");
4343
if (sourceAnchor) {
4444
sourceAnchor.href = sourceLink;
4545
}
@@ -51,10 +51,12 @@ class EthmarksFooter extends HTMLElement {
5151
const containerHeight = window.innerHeight;
5252
const contentHeight = Math.max(
5353
document.documentElement.scrollHeight,
54-
document.body.scrollHeight
54+
document.body.scrollHeight,
5555
);
5656

57-
if (contentHeight === 0) { return; }
57+
if (contentHeight === 0) {
58+
return;
59+
}
5860

5961
if (contentHeight > containerHeight) {
6062
body.classList.add(heightOverflowClass);
@@ -73,5 +75,5 @@ class EthmarksFooter extends HTMLElement {
7375
}
7476

7577
// Register the custom elements
76-
customElements.define('ethmarks-header', EthmarksHeader);
77-
customElements.define('ethmarks-footer', EthmarksFooter);
78+
customElements.define("ethmarks-header", EthmarksHeader);
79+
customElements.define("ethmarks-footer", EthmarksFooter);

content/about/_index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,28 +178,24 @@ I have a cat named Toby. He is 17 years old and blind.
178178
<a
179179
class="external-link"
180180
href="https://github.com/ethmarks"
181-
target="_blank"
182181
>
183182
<img src="/media/icons/github.svg" alt="GitHub icon" />
184183
</a>
185184
<a
186185
class="external-link"
187186
href="https://news.ycombinator.com/user?id=ethmarks"
188-
target="_blank"
189187
>
190188
<img src="/media/icons/hn.svg" alt="Hacker News icon" />
191189
</a>
192190
<a
193191
class="external-link"
194192
href="https://ethmarks.itch.io/"
195-
target="_blank"
196193
>
197194
<img src="/media/icons/itchio.svg" alt="Itch.io icon" />
198195
</a>
199196
<a
200197
class="external-link"
201198
href="mailto:ethmarks.dev@gmail.com"
202-
target="_blank"
203199
>
204200
<img src="/media/icons/email.svg" alt="Email icon" />
205201
</a>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML -}}</a>
1+
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} {{ end }}>{{ .Text | safeHTML -}}</a>

layouts/partials/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<footer>
22
<span id="source">
3-
<a href="https://github.com/ethmarks/ethmarks.github.io" id="sourcelink" target="_blank">Website Source</a>
3+
<a href="https://github.com/ethmarks/ethmarks.github.io" id="sourcelink">Website Source</a>
44
</span>
55
<span id="copyright"><a href="/about/">Ethan Marks</a>, &copy;2026</span>
66
<span id="email">
7-
<a href="mailto:ethmarks.dev@gmail.com" target="_blank">Contact</a>
7+
<a href="mailto:ethmarks.dev@gmail.com">Contact</a>
88
</span>
99
</footer>

0 commit comments

Comments
 (0)