aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/glyph/glyph.svelte
blob: 89bc10c9735cfd856755f3b7115c2c3ad97d8535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<script lang="ts">
	import { _ } from 'svelte-i18n';
	import { getGlyphHash } from '$lib/utils/glyph_hash';

	export let uuid: string;
</script>

<div
	class="inline-block w-12 h-12 mt-1 bg-white border border-black border-solid p-0.5 box-content glyphicon"
	role="img"
	aria-label={$_('glyph.title')}
	title={$_('glyph.title')}
>
	{#each getGlyphHash(uuid) as fragment}
		<span
			class="block text-2xl float-left w-6 h-6 text-center leading-6 {fragment.glyph}"
			style="color: {fragment.color} "
		>
			{fragment.glyph}
		</span>
	{/each}
</div>

<style>
	.glyphicon {
		border: 1px solid black;
	}

	.☽ {
		font-size: 2rem;
		line-height: 19px;
	}
</style>