Commit 5b1eeb4

HPCesia <me@hpcesia.com>
2025-02-19 15:03:54
feat: external links
Add target="_blank" to external links in PageFooter and ProfileCard
1 parent 01b7424
Changed files (2)
src/components/aside/ProfileCard.astro
@@ -19,7 +19,12 @@ import { Icon } from 'astro-icon/components';
     <div class="flex flex-row flex-wrap items-center justify-center gap-2">
       {
         profileConfig.socialLinks.map((link) => (
-          <Button href={link.url} title={link.name} class="btn-circle btn-ghost text-2xl">
+          <Button
+            href={link.url}
+            title={link.name}
+            target="_blank"
+            class="btn-circle btn-ghost text-2xl"
+          >
             <Icon name={link.icon} />
           </Button>
         ))
src/components/PageFooter.astro
@@ -25,7 +25,7 @@ const currentYear = new Date().getFullYear();
             if (typeof c === 'string') return <span>{c}</span>;
             else if ('link' in c)
               return (
-                <a href={c.link} class={c.class || ''}>
+                <a href={c.link} class={c.class || ''} target="_blank">
                   {c.text}
                 </a>
               );