aboutsummaryrefslogtreecommitdiff
path: root/src/components/glyph/glyph.svelte
blob: 98d1c6e5d96b456b1147c2d6a21af24426e3e478 (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" aria-hidden="true" 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>