Added svelt for icons

This commit is contained in:
Rafael González
2022-01-18 18:44:26 -06:00
parent 399dec4e3f
commit 94149e8478
5 changed files with 143 additions and 59 deletions
+23
View File
@@ -0,0 +1,23 @@
<script>
export let perLink;
export let profileName;
function handleClick(event){
gtag('event', 'view_item', {
'event_category' : 'Links',
'event_label' : `Visit ${perLink.name} link`
});
}
</script>
<div class="p-2">
<a class="w-full flex flex-col justify-center items-center" href={perLink.url} target="_blank" rel="noopener" on:click={handleClick}>
<img
loading="lazy"
class="w-1/2 dark:invert"
src={perLink.iconUrl}
alt={`${perLink.name} ${profileName}`}
>
<h3 class="my-2 font-bold text-2xl dark:text-white">{perLink.name}</h3>
</a>
</div>