|
10 | 10 | > |
11 | 11 | <div class="card flex-fill {{#if color}}bg-{{color}}-lt{{/if}}"> |
12 | 12 | <div class="card-body d-flex flex-column"> |
| 13 | + |
13 | 14 | {{#if title}} |
14 | 15 | <div class="d-flex align-items-center"> |
15 | | - <div class="subheader text-truncate me-2">{{title}}</div> |
| 16 | + <!-- Otsikko (title): mahdollisuus linkkiin ja targetiin --> |
| 17 | + <div class="subheader text-truncate me-2"> |
| 18 | + {{#if title_link}} |
| 19 | + <a href="{{title_link}}" |
| 20 | + class="text-decoration-none" |
| 21 | + {{#if title_target}} target="{{title_target}}" rel="noopener noreferrer" {{/if}}> |
| 22 | + {{title}} |
| 23 | + </a> |
| 24 | + {{else}} |
| 25 | + {{title}} |
| 26 | + {{/if}} |
| 27 | + </div> |
| 28 | + |
16 | 29 | {{#if dropdown_item}} |
17 | 30 | <div class="ms-auto lh-1"> |
18 | 31 | <div class="dropdown"> |
|
31 | 44 | {{/if}} |
32 | 45 | </div> |
33 | 46 | {{/if~}} |
| 47 | + |
34 | 48 | <div class="d-flex align-items-center mt-1"> |
35 | | - <div class="h1 {{#if description}}mb-3{{else}}mb-0{{/if}} mt-auto text-nowrap text-truncate">{{value}}{{#if unit}} {{unit}}{{/if}}</div> |
| 49 | + <!-- Arvo (value): mahdollisuus linkkiin ja targetiin --> |
| 50 | + <div class="h1 {{#if description}}mb-3{{else}}mb-0{{/if}} mt-auto text-nowrap text-truncate"> |
| 51 | + {{#if value_link}} |
| 52 | + <a href="{{value_link}}" |
| 53 | + class="text-decoration-none" |
| 54 | + {{#if value_target}} target="{{value_target}}" rel="noopener noreferrer" {{/if}}> |
| 55 | + {{value}}{{#if unit}} {{unit}}{{/if}} |
| 56 | + </a> |
| 57 | + {{else}} |
| 58 | + {{value}}{{#if unit}} {{unit}}{{/if}} |
| 59 | + {{/if}} |
| 60 | + </div> |
| 61 | + |
36 | 62 | {{#if (and change_percent (not description))}} |
37 | 63 | <div class="ms-auto"> |
38 | 64 | {{#if change_percent}} |
|
48 | 74 | </div> |
49 | 75 | {{/if}} |
50 | 76 | </div> |
| 77 | + |
51 | 78 | {{~#if description}} |
52 | 79 | <div class="d-flex flex-wrap mb-2" title="{{description}}"> |
53 | 80 | <div class="text-truncate me-2">{{description}}</div> |
|
65 | 92 | {{~/if~}} |
66 | 93 | </div> |
67 | 94 | {{~/if~}} |
| 95 | + |
68 | 96 | {{~#if progress_percent~}} |
69 | 97 | <div class="progress progress-sm"> |
70 | 98 | <div class="progress-bar bg-{{progress_color}}" style="width: {{progress_percent}}%" role="progressbar" aria-valuenow="{{progress_percent}}" aria-valuemin="0" aria-valuemax="100" aria-label="{{progress_percent}}% Complete"> |
71 | 99 | <span class="visually-hidden">{{progress_percent}}% Complete</span> |
72 | 100 | </div> |
73 | 101 | </div> |
74 | 102 | {{~/if}} |
| 103 | + |
75 | 104 | </div> |
76 | 105 | </div> |
77 | 106 | </div> |
|
0 commit comments