Merge pull request #38 from barrett-ruth/feat/open-terminal-click-new-tab
feat: open terminal ctrl-click in a new tab
This commit is contained in:
commit
5dcf03af9e
4 changed files with 21 additions and 6 deletions
3
.github/workflows/aws.yaml
vendored
3
.github/workflows/aws.yaml
vendored
|
|
@ -1,8 +1,7 @@
|
|||
name: Deploy to AWS S3
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
|
|
|||
4
.github/workflows/ci.yaml
vendored
4
.github/workflows/ci.yaml
vendored
|
|
@ -2,9 +2,9 @@ name: CI
|
|||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"check": "astro check"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,ts,jsx,tsx,json,css,scss,md,astro,html}": [
|
||||
"*.{js,ts,jsx,tsx,json,css,scss,md,astro,html,yaml,yml}": [
|
||||
"prettier --write",
|
||||
"astro check"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,12 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
|
|||
---
|
||||
|
||||
<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">
|
||||
<span class="terminal-prompt">{promptText}</span>
|
||||
<span class="terminal-cursor"></span>
|
||||
|
|
@ -49,4 +54,15 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
|
|||
}
|
||||
</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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue