Skip to content

Commit

Permalink
< 2%
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet committed Oct 16, 2024
1 parent 8c18816 commit 972b015
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@
"title_element": {
// double backticks: convert to a single line without newlines and extra spaces
"title": ``
[% dash = "-" %]
[% dash = "" %]
[% dash.repeat(panel.level) %]

[% display_taxonomy_tag_name("ingredients", panel.ingredient_id) %]
[% IF panel.ingredient.percent.defined %]
([% round(panel.ingredient.percent) %]%)
([% sprintf("%.1f", panel.ingredient.percent) %]%)
[% ELSIF panel.ingredient.percent_estimate.defined %]
([% round(panel.ingredient.percent_estimate) %]% [% lang("estimate") %])
[% IF panel.ingredient.percent_estimate < 2 %]
(< 2% [% lang("estimate") %])
[% ELSE %]
([% sprintf("%.1f", panel.ingredient.percent_estimate) %]% [% lang("estimate") %])
[% END %]
[% END %]
``,
},
Expand Down

0 comments on commit 972b015

Please sign in to comment.