Skip to content

Commit a1d830e

Browse files
committed
fix: make links external
1 parent 6b9f954 commit a1d830e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

apps/trialanderror.org/src/app/Card.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export function Card({ card, delay = 0 }: { card: Card; delay?: number }) {
7676
<h2 className="my-2 text-xl font-bold leading-tight tracking-tight text-blue-500 md:text-2xl">
7777
<Link
7878
className="link-overlay"
79+
target="_blank"
7980
href={
8081
card.type === 'post' ? `https://blog.trialanderror.org/${card.url}` : card.url
8182
}

apps/trialanderror.org/src/app/Footer.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ const navigation = {
2727
projects: [
2828
{ name: 'Journal', href: 'https://blog.trialanderror.org' },
2929
{ name: 'Blog', href: 'https://journal.trialanderror.org' },
30+
{ name: 'Development', href: 'https://github.com/trialanderrororg' },
3031
],
31-
company: [
32-
{ name: 'About', href: '/about' },
33-
{ name: 'Blog', href: 'https://blog.trialanderror.org' },
34-
{ name: 'Jobs', href: 'https://positions.trialanderror.org' },
35-
],
32+
company: [{ name: 'Jobs', href: 'https://positions.trialanderror.org' }],
3633
legal: [
3734
{ name: 'Non-profit Status', href: 'https://journal.trialanderror.org/legal-status' },
3835
// { name: 'Privacy', href: '#' },
@@ -96,6 +93,7 @@ export function Footer() {
9693
<li key={item.name}>
9794
<Link
9895
href={item.href}
96+
target={item.href.startsWith('http') ? '_blank' : undefined}
9997
className="text-base text-slate-300 transition-colors hover:text-orange-500"
10098
>
10199
{item.name}
@@ -144,7 +142,12 @@ export function Footer() {
144142
<div className="mt-8 border-t border-gray-200 pt-8 md:flex md:items-center md:justify-between">
145143
<div className="flex space-x-6 text-white md:order-2">
146144
{social.map((item) => (
147-
<a key={item.name} href={item.href} className="text-slate-100 hover:text-orange-500">
145+
<a
146+
key={item.name}
147+
href={item.href}
148+
target={item.href.startsWith('http') ? '_blank' : undefined}
149+
className="text-slate-100 hover:text-orange-500"
150+
>
148151
<span className="sr-only">{item.name}</span>
149152
<item.icon //className="h-6 w-6 text-white"
150153
// aria-hidden="true"

apps/trialanderror.org/src/app/Navigation.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ const HoverPopover = ({
217217
{subItems.map((item) => (
218218
<Link
219219
key={item.name}
220+
target={item.href.startsWith('http') ? '_blank' : undefined}
220221
href={item.href}
221222
scroll={false}
222223
className="sleek-underline-blue -m-3 block rounded-md p-3 hover:bg-blue-50/50"

0 commit comments

Comments
 (0)