mirror of
https://github.com/mat-1/matdoesdev.git
synced 2025-08-02 14:46:04 +00:00
Add language icons
This commit is contained in:
parent
6a91b1cb7b
commit
e1320733ae
9 changed files with 36 additions and 6 deletions
|
@ -72,3 +72,7 @@ hr {
|
|||
width: 90%;
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
||||
img {
|
||||
max-height: 100%;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,11 @@
|
|||
transition: opacity 200ms;
|
||||
display: inline-block;
|
||||
}
|
||||
.icon:hover {
|
||||
.icon :global(img) {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
:global(a) .icon:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<script lang="ts">
|
||||
import GitHubIcon from '$lib/Icon/GitHub.svelte'
|
||||
import ButtonRow from './ButtonRow.svelte'
|
||||
import Icon from './Icon/Icon.svelte'
|
||||
import IconButtonRow from './IconButtonRow.svelte'
|
||||
|
||||
export let name: string
|
||||
export let nextName: string | undefined
|
||||
export let href: string | undefined = undefined
|
||||
export let languages: string[] = []
|
||||
|
||||
/** A link to where the code is hosted. */
|
||||
export let source: string | undefined = undefined
|
||||
|
@ -32,8 +34,8 @@
|
|||
{:else}
|
||||
<h2 class="no-link">{name}</h2>
|
||||
{/if}
|
||||
{#if source}
|
||||
<IconButtonRow>
|
||||
<IconButtonRow>
|
||||
{#if source}
|
||||
<a href={source} class="source">
|
||||
{#if source.startsWith('https://github.com/')}
|
||||
<GitHubIcon />
|
||||
|
@ -41,8 +43,23 @@
|
|||
<GitHubIcon />
|
||||
{/if}
|
||||
</a>
|
||||
</IconButtonRow>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if languages.includes('python')}
|
||||
<Icon><img src="/icons/python.svg" alt="Python" /></Icon>
|
||||
{/if}
|
||||
{#if languages.includes('svelte')}
|
||||
<Icon><img src="/icons/svelte.svg" alt="Svelte" /></Icon>
|
||||
{/if}
|
||||
{#if languages.includes('rust')}
|
||||
<Icon><img src="/icons/rust.svg" alt="Rust" /></Icon>
|
||||
{/if}
|
||||
{#if languages.includes('typescript')}
|
||||
<Icon><img src="/icons/typescript.svg" alt="TypeScript" /></Icon>
|
||||
{/if}
|
||||
{#if languages.includes('javascript')}
|
||||
<Icon><img src="/icons/javascript.svg" alt="JavaScript" /></Icon>
|
||||
{/if}
|
||||
</IconButtonRow>
|
||||
<p class="project-description"><slot /></p>
|
||||
</div>
|
||||
{#if nextId}
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
name={project.name}
|
||||
href={project.href}
|
||||
source={project.source}
|
||||
languages={project.languages}
|
||||
nextName={projects[i + 1]?.name}
|
||||
>
|
||||
{project.description}
|
||||
|
|
1
static/icons/javascript.svg
Normal file
1
static/icons/javascript.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" cursor="default" viewBox="0 0 1052 1052"><path fill-rule="evenodd" fill="#fff" d="M0 526v526h1053V0H0v526m783-48c-37 3-69 17-92 40-24 24-36 53-36 91 0 41 12 73 39 98 20 20 43 34 93 56 55 23 70 33 78 49 6 12 6 27 0 39s-21 24-39 28c-12 2-38 2-50-1-26-6-47-21-65-48l-6-8-79 45c-1 1 0 3 4 10 9 15 16 24 29 37a212 212 0 0 0 147 55c27-1 45-4 69-11a134 134 0 0 0 90-94c2-11 2-13 2-33l-1-31c-5-26-17-48-35-67-21-21-48-37-103-61-42-18-55-25-64-35-9-9-13-21-12-34 1-10 4-18 11-25 9-10 20-14 37-14 12 0 20 1 30 6 8 4 21 17 27 27l7 8 75-49c0-2-16-25-25-34-26-27-56-41-99-44h-32M473 659l-2 184c-5 21-16 32-34 36-8 2-26 1-33-1-17-5-29-16-42-39l-6-9-40 24-40 24 4 9c19 35 48 60 85 72 41 14 94 12 131-4 39-17 63-49 73-98l2-191V483h-98v176"/></svg>
|
After Width: | Height: | Size: 771 B |
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="110.4" height="109.8" fill="#fff" xmlns:v="https://vecta.io/nano"><path d="M55 0C27 0 28.6 12.2 28.6 12.2v12.6h26.8v3.7H18s-18-2-18 26.3S15.8 82 15.8 82H25V69s-.5-15.6 15.4-15.6H67s15 .2 15-14.4V14.5S84.4-.2 55-.2zM40 8.5c2.7 0 4.8 2.2 4.8 4.8S42.7 18 40 18s-4.8-2.2-4.8-4.8 2-4.8 4.8-4.8zm15.6 101.3c28 0 26.3-12.2 26.3-12.2V85H55v-3.8h37.4s18 2 18-26.3-15.7-27.4-15.7-27.4h-9.3v13s.6 16-15.4 16H43.5s-15-.2-15 14.4v24s-2.3 14.7 27 14.7zm14.8-8.5c-2.7 0-4.8-2.2-4.8-4.8s2.2-4.8 4.8-4.8 4.8 2.2 4.8 4.8-2.2 4.8-4.8 4.8z"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="110.4" height="109.8" fill="#fff"><path d="M55 0C27 0 28.6 12.2 28.6 12.2v12.6h26.8v3.7H18s-18-2-18 26.3S15.8 82 15.8 82H25V69s-.5-15.6 15.4-15.6H67s15 .2 15-14.4V14.5S84.4-.2 55-.2zM40 8.5c2.7 0 4.8 2.2 4.8 4.8S42.7 18 40 18s-4.8-2.2-4.8-4.8 2-4.8 4.8-4.8zm15.6 101.3c28 0 26.3-12.2 26.3-12.2V85H55v-3.8h37.4s18 2 18-26.3-15.7-27.4-15.7-27.4h-9.3v13s.6 16-15.4 16H43.5s-15-.2-15 14.4v24s-2.3 14.7 27 14.7zm14.8-8.5c-2.7 0-4.8-2.2-4.8-4.8s2.2-4.8 4.8-4.8 4.8 2.2 4.8 4.8-2.2 4.8-4.8 4.8z"/></svg>
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 543 B |
1
static/icons/rust.svg
Normal file
1
static/icons/rust.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="16.47 16.57 109.07 108.88"><path fill="#fff" d="M71 23.7C45 23.7 23.8 45 23.8 71S45 118.2 71 118.2 118.3 97 118.3 71 97 23.7 71 23.7zm0 4.3a3.1 3.1 0 0 1 3 3.1 3.1 3.1 0 1 1-3-3.1zm7 5a38.3 38.3 0 0 1 26.2 18.7l-3.7 8.3c-.6 1.4 0 3 1.4 3.8l7 3a38.3 38.3 0 0 1 .1 6.6h-4c-.4 0-.5.3-.5.6v2c0 4.2-2.4 5.2-4.5 5.4-2 .2-4.2-.8-4.5-2-1.2-6.6-3-8-6.2-10.5 3.8-2.4 7.8-6 7.8-11 0-5.2-3.6-8.5-6-10a17 17 0 0 0-8.2-2.7H42.5A38.3 38.3 0 0 1 64 33l4.8 5c1 1 3 1.2 4 .1zM34 56a3.1 3.1 0 1 1-3.2 3.1A3.1 3.1 0 0 1 34 56zm74.2.1a3.1 3.1 0 1 1-3.2 3.1 3.1 3.1 0 0 1 3.2-3.1zm-68.3.5h5.4V81h-11A38.3 38.3 0 0 1 33 66.5l6.7-3c1.4-.6 2-2.3 1.4-3.7zm22.6.3h13c.7 0 4.7.8 4.7 3.8 0 2.5-3 3.4-5.7 3.4h-12zm0 17.6h10c1 0 4.8.3 6 5.3.4 1.5 1.3 6.6 1.8 8.2.6 1.8 3 5.4 5.5 5.4h16a38.3 38.3 0 0 1-3.5 4.1L91.8 96c-1.5-.3-3 .7-3.4 2.2l-1.6 7.3a38.3 38.3 0 0 1-31.9-.2L53.4 98c-.3-1.5-1.8-2.5-3.4-2.2l-6.4 1.4a38.3 38.3 0 0 1-3.3-3.9h31.3c.3 0 .6-.1.6-.4V82c0-.3-.2-.4-.6-.4h-9zM48 99.8a3.1 3.1 0 1 1-3.2 3.1 3.1 3.1 0 0 1 3.2-3.1zm46 .1a3.1 3.1 0 1 1-3.2 3.1 3.1 3.1 0 0 1 3.2-3.1z"/><path fill-rule="evenodd" fill="#fff" stroke="#fff" stroke-linejoin="round" stroke-width="3" d="M115.7 71a44.6 44.6 0 0 1-89.3 0 44.6 44.6 0 0 1 89.3 0zm-.8-4.3 7 4.3-7 4.3 6 5.6-7.7 3 4.8 6.7-8 1.3 3.4 7.5-8.2-.3 2 8-8-2 .3 8.2-7.5-3.4-1.3 8-6.7-4.8-3 7.7-5.6-6-4.3 7-4.3-7-5.6 6-3-7.7-6.6 4.8-1.3-8-7.5 3.4V105l-8 2 2-8-8.2.3 3.4-7.5-8-1.3 4.8-6.7-7.7-3 6-5.6-7-4.3 7-4.3-6-5.6 7.7-3-4.8-6.6 8-1.3-3.4-7.5 8.2.3-2-8 8 2v-8.2l7.5 3.4 1.3-8 6.6 4.8 3-7.7 5.6 6 4.3-7 4.3 7 5.6-6 3 7.7 6.7-4.8 1.3 8 7.5-3.4L99 37l8-2-2 8 8.2-.3-3.4 7.5 8 1.3-4.8 6.6 7.7 3z"/></svg>
|
After Width: | Height: | Size: 1.6 KiB |
1
static/icons/svelte.svg
Normal file
1
static/icons/svelte.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 9.8 KiB |
1
static/icons/typescript.svg
Normal file
1
static/icons/typescript.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 512 512"><path fill="#fff" d="M1 477V38l2-1C8 20 19 8 36 3l1-2h439l1 2c17 5 29 16 34 33l2 1v439l-2 1c-5 17-16 29-33 34l-1 2H38l-1-2c-17-5-29-16-34-33l-2-1m386-46c-25 2-48-6-69-22v42c0 8 0 8 7 11 32 11 64 12 97 4 39-10 55-41 47-79-4-18-16-30-32-39l-40-19c-7-4-15-8-21-14-9-9-8-22 4-29 4-3 9-5 14-6 16-3 32-1 47 4l20 9v-43l-4-4c-30-9-61-10-91-2-19 6-35 16-44 35a62 62 0 0 0 27 81c12 7 25 12 38 18 9 4 18 9 25 17 9 10 7 24-5 30-5 3-12 4-20 6m-204-71v108h51V285h64v-41H119v41h64v75z"/></svg>
|
After Width: | Height: | Size: 561 B |
Loading…
Add table
Reference in a new issue