Skip to content

Commit 884aaf2

Browse files
committed
only conditionally hide from crawlers
1 parent fbe3328 commit 884aaf2

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/lib/components/contact.svelte

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import type { ContactData } from '$lib/data/contacts';
44
import { hover3dFactory } from '$lib/utils/hooks/transformHover3d';
55
6+
$: hideFromCrawler = contact.hideFromCrawler;
7+
68
export let contact: ContactData;
79
export let isActivated : boolean = false;
810
let activated: boolean = false;
@@ -17,8 +19,14 @@
1719
class:externally-activated={isActivated}
1820
>
1921
<div id="a" >
20-
<!-- href={contact.link} -->
21-
<i id="icon" class={contact.iconClass} class:colored={activated} />
22+
<!-- -->
23+
{#if !hideFromCrawler}
24+
<a href={contact.link}>
25+
<i id="icon" class={contact.iconClass} class:colored={activated} />
26+
</a>
27+
{:else}
28+
<i id="icon" class={contact.iconClass} class:colored={activated} />
29+
{/if}
2230
<!-- <h2 id="name">{contact.name}</h2> -->
2331
</div>
2432
</div>
@@ -48,7 +56,7 @@
4856
z-index: 5;
4957
}
5058
51-
#a {
59+
#a , a{
5260
text-decoration: none;
5361
color: inherit;
5462
transform: translateZ(20px);

src/lib/data/contacts.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export interface ContactData {
22
name: string;
33
iconClass: string;
44
link: string;
5+
hideFromCrawler?: boolean;
56
}
67

78
//linkedin
@@ -29,7 +30,8 @@ export const email: ContactData = {
2930
export const telegram: ContactData = {
3031
name: 'Telegram',
3132
iconClass: 'fa-brands fa-telegram',
32-
link: 'https://t.me/hannepps'
33+
link: 'https://t.me/hannepps',
34+
hideFromCrawler: true,
3335
}
3436

3537

0 commit comments

Comments
 (0)