aboutsummaryrefslogtreecommitdiff
path: root/src/components/glyph/glyph.svelte
blob: 60f99ebf8efb9cea546438fe2cbb57cab4e425d3 (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
34
35
36
37
38
39
40
41
<script>
	import { _ } from 'svelte-i18n';
	import { getGlyphHash } from '$/utils/glyph_hash';

	export let uuid;
</script>

<div class="glyphicon" role="img" aria-label={$_('glyph.title')} title={$_('glyph.title')}>
	{#each getGlyphHash(uuid) as fragment}
		<span class={fragment.glyph} style="color: {fragment.color} ">
			{fragment.glyph}
		</span>
	{/each}
</div>

<style>
	.glyphicon {
		border: 1px solid black;
		display: inline-block;
		font-size: 1.4rem;
		height: 48px;
		margin-top: 5px;
		width: 48px;
		background-color: white;
		padding: 2px;
	}

	span {
		display: block;
		float: left;
		width: 24px;
		height: 24px;
		text-align: center;
		line-height: 24px;
	}

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