|
13 | 13 |
|
14 | 14 | {{#if title}} |
15 | 15 | <div class="d-flex align-items-center"> |
16 | | - <!-- Otsikko (title): mahdollisuus linkkiin ja targetiin --> |
17 | 16 | <div class="subheader text-truncate me-2"> |
| 17 | + {{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
18 | 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}}> |
| 19 | + <a href="{{title_link}}" class="text-decoration-none" |
| 20 | + {{#if title_link_new_tab}} |
| 21 | + target="_blank" rel="noopener noreferrer" |
| 22 | + {{/if}} |
| 23 | + > |
22 | 24 | {{title}} |
23 | 25 | </a> |
24 | 26 | {{else}} |
25 | 27 | {{title}} |
26 | 28 | {{/if}} |
27 | 29 | </div> |
28 | | - |
| 30 | + |
29 | 31 | {{#if dropdown_item}} |
30 | 32 | <div class="ms-auto lh-1"> |
31 | 33 | <div class="dropdown"> |
|
43 | 45 | </div> |
44 | 46 | {{/if}} |
45 | 47 | </div> |
46 | | - {{/if~}} |
| 48 | + {{/if}} |
47 | 49 |
|
48 | 50 | <div class="d-flex align-items-center mt-1"> |
49 | | - <!-- Arvo (value): mahdollisuus linkkiin ja targetiin --> |
50 | 51 | <div class="h1 {{#if description}}mb-3{{else}}mb-0{{/if}} mt-auto text-nowrap text-truncate"> |
| 52 | + {{!-- Introduced `title_link_new_tab` and `value_link_new_tab`. If set to a truthy value, opens the link in a new tab (target="_blank"). Otherwise, defaults to same tab (target="_self"). --}} |
51 | 53 | {{#if value_link}} |
52 | 54 | <a href="{{value_link}}" |
53 | 55 | class="text-decoration-none" |
54 | | - {{#if value_target}} target="{{value_target}}" rel="noopener noreferrer" {{/if}}> |
| 56 | + {{#if value_link_new_tab}} target="_blank" rel="noopener noreferrer" |
| 57 | + {{/if}} |
| 58 | + > |
55 | 59 | {{value}}{{#if unit}} {{unit}}{{/if}} |
56 | 60 | </a> |
57 | 61 | {{else}} |
58 | 62 | {{value}}{{#if unit}} {{unit}}{{/if}} |
59 | 63 | {{/if}} |
60 | 64 | </div> |
61 | | - |
| 65 | + |
62 | 66 | {{#if (and change_percent (not description))}} |
63 | 67 | <div class="ms-auto"> |
64 | 68 | {{#if change_percent}} |
|
75 | 79 | {{/if}} |
76 | 80 | </div> |
77 | 81 |
|
78 | | - {{~#if description}} |
| 82 | + {{#if description}} |
79 | 83 | <div class="d-flex flex-wrap mb-2" title="{{description}}"> |
80 | 84 | <div class="text-truncate me-2">{{description}}</div> |
81 | 85 | {{#if change_percent}} |
|
89 | 93 | {{/if}} |
90 | 94 | </span> |
91 | 95 | </div> |
92 | | - {{~/if~}} |
| 96 | + {{/if}} |
93 | 97 | </div> |
94 | | - {{~/if~}} |
95 | | - |
96 | | - {{~#if progress_percent~}} |
| 98 | + {{/if}} |
| 99 | + |
| 100 | + {{#if progress_percent}} |
97 | 101 | <div class="progress progress-sm"> |
98 | 102 | <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"> |
99 | 103 | <span class="visually-hidden">{{progress_percent}}% Complete</span> |
100 | 104 | </div> |
101 | 105 | </div> |
102 | | - {{~/if}} |
103 | | - |
| 106 | + {{/if}} |
104 | 107 | </div> |
105 | 108 | </div> |
106 | 109 | </div> |
|
0 commit comments