diff options
Diffstat (limited to '')
| -rw-r--r-- | src/routes/+page.svelte | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 83f505b..d9ec52f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -3,17 +3,9 @@ import { base } from '$app/paths' import { socials } from '$lib/socials.json' - import SteamIcon from '$lib/assets/steam.svg?src' - import GithubIcon from '$lib/assets/github.svg?src' - import DevIcon from '$lib/assets/dev.svg?src' - import TelegramIcon from '$lib/assets/telegram.svg?src' - import EnvelopeIcon from '$lib/assets/envelope.svg?src' - - const icons: string[] = [GithubIcon, DevIcon, SteamIcon, TelegramIcon, EnvelopeIcon] - type Social = { - link: string, - iconIndex: number + name: string, + link: string } const socialsList: Social[] = socials @@ -27,9 +19,11 @@ <h1>pml68</h1> <p>Just your average IT student</p> <div class="socials"> - {#each socialsList as {link, iconIndex}} - <a href={link} target="_blank" class="icon"> - {@html icons[iconIndex]} + {#each socialsList as {name, link}} + <a href={link} target="_blank" class="icon" aria-label={name}> + <svg viewBox="0 0 512 512" class="social-icon"> + <use href={`/${name}.svg#${name}`} /> + </svg> </a> {/each} </div> |
