feat: open terminal ctrl-click in a new tab
This commit is contained in:
parent
617c2e69ea
commit
e0936be05b
1 changed files with 17 additions and 1 deletions
|
|
@ -15,7 +15,12 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<a href="/" class="home-link" style="text-decoration: none; color: inherit">
|
<a
|
||||||
|
href="/"
|
||||||
|
id="home-link"
|
||||||
|
class="home-link"
|
||||||
|
style="text-decoration: none; color: inherit"
|
||||||
|
>
|
||||||
<div class="terminal-container">
|
<div class="terminal-container">
|
||||||
<span class="terminal-prompt">{promptText}</span>
|
<span class="terminal-prompt">{promptText}</span>
|
||||||
<span class="terminal-cursor"></span>
|
<span class="terminal-cursor"></span>
|
||||||
|
|
@ -49,4 +54,15 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<script is:inline>
|
||||||
|
const homeLink = document.getElementById("home-link");
|
||||||
|
|
||||||
|
homeLink.addEventListener("click", (e) => {
|
||||||
|
if (e.ctrlKey || e.metaKey) {
|
||||||
|
e.preventDefault();
|
||||||
|
window.open("/", "_blank", "noopener");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script src="/scripts/index.js" is:inline></script>
|
<script src="/scripts/index.js" is:inline></script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue