Skip to content

Commit

Permalink
only conditionally hide from crawlers
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesGitH committed Jan 26, 2024
1 parent fbe3328 commit 884aaf2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/lib/components/contact.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import type { ContactData } from '$lib/data/contacts';
import { hover3dFactory } from '$lib/utils/hooks/transformHover3d';
$: hideFromCrawler = contact.hideFromCrawler;
export let contact: ContactData;
export let isActivated : boolean = false;
let activated: boolean = false;
Expand All @@ -17,8 +19,14 @@
class:externally-activated={isActivated}
>
<div id="a" >
<!-- href={contact.link} -->
<i id="icon" class={contact.iconClass} class:colored={activated} />
<!-- -->
{#if !hideFromCrawler}
<a href={contact.link}>
<i id="icon" class={contact.iconClass} class:colored={activated} />
</a>
{:else}
<i id="icon" class={contact.iconClass} class:colored={activated} />
{/if}
<!-- <h2 id="name">{contact.name}</h2> -->
</div>
</div>
Expand Down Expand Up @@ -48,7 +56,7 @@
z-index: 5;
}
#a {
#a , a{
text-decoration: none;
color: inherit;
transform: translateZ(20px);
Expand Down
4 changes: 3 additions & 1 deletion src/lib/data/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface ContactData {
name: string;
iconClass: string;
link: string;
hideFromCrawler?: boolean;
}

//linkedin
Expand Down Expand Up @@ -29,7 +30,8 @@ export const email: ContactData = {
export const telegram: ContactData = {
name: 'Telegram',
iconClass: 'fa-brands fa-telegram',
link: 'https://t.me/hannepps'
link: 'https://t.me/hannepps',
hideFromCrawler: true,
}


Expand Down

0 comments on commit 884aaf2

Please sign in to comment.