-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
28 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
<script lang="ts"> | ||
import { getTecnology } from '$lib/Tecnologies'; | ||
import type { Tecnology } from '$lib/types'; | ||
import { getTechnology } from '$lib/technologies'; | ||
import type { Technology } from '$lib/types'; | ||
export let openNewTab: boolean = true; | ||
export let name: string | null = null; | ||
export let tecnology: Tecnology | null = null; | ||
export let technology: Technology | null = null; | ||
$: { | ||
if (name) { | ||
tecnology = getTecnology(name); | ||
technology = getTechnology(name); | ||
} | ||
} | ||
export let padding = 'px-1 py-0.5'; | ||
export let color = ''; | ||
if (color === '' && tecnology?.color) { | ||
color = tecnology.color; | ||
if (color === '' && technology?.color) { | ||
color = technology.color; | ||
} | ||
</script> | ||
|
||
{#if tecnology} | ||
<a href={tecnology.website ?? '#'} target={openNewTab ? '_blank' : '_self'} class="inline-block"> | ||
{#if technology} | ||
<a href={technology.website ?? '#'} target={openNewTab ? '_blank' : '_self'} class="inline-block"> | ||
<div | ||
class="flex {padding} gap-2 bg-stone-100 text-normal dark:bg-stone-800 dark:text-white rounded-md border-b-2 border-stone-300 hover:bg-stone-200 dark:hover:bg-stone-700 dark:border-stone-900 dark:hover:border-stone-800 hover:translate-y-1 duration-200 align-baseline" | ||
> | ||
{#if tecnology.iconSlug} | ||
{#if technology.iconSlug} | ||
<img | ||
height="24" | ||
width="24" | ||
src="https://cdn.simpleicons.org/{tecnology.iconSlug}/{color}" | ||
alt={tecnology.name} | ||
src="https://cdn.simpleicons.org/{technology.iconSlug}/{color}" | ||
alt={technology.name} | ||
class="align-baseline" | ||
/> | ||
{/if} | ||
|
||
<span class="self-baseline">{tecnology.name}</span> | ||
<span class="self-baseline">{technology.name}</span> | ||
</div> | ||
</a> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters