Skip to content

Commit

Permalink
fix: Add missing socials (#174)
Browse files Browse the repository at this point in the history
Co-authored-by: Ushie <[email protected]>
  • Loading branch information
oSumAtrIX and Ushie authored Mar 3, 2024
1 parent 1ad639d commit daae03b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
11 changes: 3 additions & 8 deletions src/layout/Hero/SocialButton.svelte
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
<script lang="ts">
import type { Social } from '$lib/types';
export let social = '';
export let data: Social[];
export let social: Social;
</script>

<a
href={data.find((jsonSocial) => jsonSocial.name.toLowerCase() === social.toLowerCase())?.url}
rel="noreferrer"
target="_blank"
>
<a href={social.url} rel="noreferrer" target="_blank">
<div>
<img src="socials/{social}.svg" alt={social} />
<img src="socials/{social.name.toLowerCase()}.svg" alt={social.name} />
</div>
</a>

Expand Down
8 changes: 4 additions & 4 deletions src/layout/Hero/SocialHost.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
<div class="social-host">
<Query {query} let:data>
{#if data}
<SocialButton social="github" data={data.socials} />
<SocialButton social="discord" data={data.socials} />
<SocialButton social="reddit" data={data.socials} />
<SocialButton social="telegram" data={data.socials} />
{#each data.socials.filter((s) => s.name != 'Website') as social}
<SocialButton {social} />
{/each}
{/if}
</Query>
</div>
Expand All @@ -36,6 +35,7 @@
left: 0;
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
}
Expand Down
6 changes: 6 additions & 0 deletions static/socials/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions static/socials/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit daae03b

Please sign in to comment.