Template:Infobox nutritional value: Difference between revisions

From IxWiki
Jump to navigation Jump to search
>Paul 012
Removing {{nowrap}} for user-input source, which could cause template to balloon excessively when multiple sources were entered.
 
m 1 revision imported
 
(One intermediate revision by one other user not shown)
Line 42: Line 42:
         | data1 = {{#if:{{{fat|}}} |<div style="position:relative;left:-0.65em;">{{{fat}}}</div>
         | data1 = {{#if:{{{fat|}}} |<div style="position:relative;left:-0.65em;">{{{fat}}}</div>
                   | {{#if:{{{satfat|}}}{{{transfat|}}}{{{monofat|}}}{{{polyfat|}}}{{{omega3fat|}}}{{{omega6fat|}}} |&thinsp;}} }}
                   | {{#if:{{{satfat|}}}{{{transfat|}}}{{{monofat|}}}{{{polyfat|}}}{{{omega3fat|}}}{{{omega6fat|}}} |&thinsp;}} }}
         | label2 = [[Saturated fat|Saturated]]
         | label2 = [[Fatty acid]]s
         | data2 = {{{satfat|}}}
        | label3 = [[Saturated fat|Saturated]]
         | label3 = [[Trans fat|Trans]]
         | data3 = {{{satfat|}}}
         | data3 = {{{transfat|}}}
         | label4 = [[Trans fat|Trans]]
         | label4 = [[Monounsaturated fat|Monounsaturated]]
         | data4 = {{{transfat|}}}
         | data4 = {{{monofat|}}}
         | label5 = [[Monounsaturated fat|Monounsaturated]]
         | label5 = [[Polyunsaturated fat|Polyunsaturated]]<!--
         | data5 = {{{monofat|}}}
         | label6 = [[Polyunsaturated fat|Polyunsaturated]]<!--
                     -->{{#if:{{{omega3fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;font-weight:normal;">[[Omega-3 fatty acid|omega‑3]]</div>}}<!--
                     -->{{#if:{{{omega3fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;font-weight:normal;">[[Omega-3 fatty acid|omega‑3]]</div>}}<!--
                     -->{{#if:{{{omega6fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;font-weight:normal;">[[Omega-6 fatty acid|omega‑6]]</div>}}
                     -->{{#if:{{{omega6fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;font-weight:normal;">[[Omega-6 fatty acid|omega‑6]]</div>}}
         | data5 = {{{polyfat|}}}<!--
         | data6 = {{{polyfat|}}}<!--
                     -->{{#if:{{{omega3fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;">{{{omega3fat}}}</div>}}<!--
                     -->{{#if:{{{omega3fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;">{{{omega3fat}}}</div>}}<!--
                     -->{{#if:{{{omega6fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;">{{{omega6fat}}}</div>}}
                     -->{{#if:{{{omega6fat|}}} |<div style="padding-left:0.65em;padding-top:0.25em;">{{{omega6fat}}}</div>}}
Line 94: Line 95:
         |datastyle=vertical-align:middle;padding-left:0.65em;line-height:1.1em;
         |datastyle=vertical-align:middle;padding-left:0.65em;line-height:1.1em;
         | label1 = <b style="margin-left:-0.65em>[[Vitamin]]s</b>
         | label1 = <b style="margin-left:-0.65em>[[Vitamin]]s</b>
         | data1 = '''Quantity''' {{right|{{abbr|'''%DV'''|Percentage of Daily Value}}<sup>†</sup>}}
         | data1 = '''Quantity''' {{align|right|{{abbr|'''%DV'''|Percentage of Daily Value}}<sup>†</sup>}}


         | label2 = [[Vitamin A|Vitamin A equiv.]]<!--
         | label2 = [[Vitamin A|Vitamin A equiv.]]<!--
Line 116: Line 117:
         | data6 = {{#if:{{{riboflavin_mg|}}} |{{align|right|{{#expr:{{{riboflavin_mg}}}/0.012 round 0}}%}} {{{riboflavin_mg}}} mg}}
         | data6 = {{#if:{{{riboflavin_mg|}}} |{{align|right|{{#expr:{{{riboflavin_mg}}}/0.012 round 0}}%}} {{{riboflavin_mg}}} mg}}


         | label7 = [[Niacin|Niacin (B{{lower|0.35em|3}})]]
         | label7 = [[Niacin (nutrient)|Niacin (B{{lower|0.35em|3}})]]
         | data7 = {{#if:{{{niacin_mg|}}} |{{align|right|{{#expr:{{{niacin_mg}}}/0.15 round 0}}%}} {{{niacin_mg}}} mg}}
         | data7 = {{#if:{{{niacin_mg|}}} |{{align|right|{{#expr:{{{niacin_mg}}}/0.15 round 0}}%}} {{{niacin_mg}}} mg}}


Line 161: Line 162:
         |datastyle=vertical-align:middle;padding-left:0.65em;line-height:1.1em;
         |datastyle=vertical-align:middle;padding-left:0.65em;line-height:1.1em;
         | label1 = <b style="margin-left:-0.65em>[[Mineral (nutrient)|Minerals]]</b>
         | label1 = <b style="margin-left:-0.65em>[[Mineral (nutrient)|Minerals]]</b>
         | data1 = '''Quantity''' {{right|{{abbr|'''%DV'''|Percentage of Daily Value}}<sup>†</sup>}}
         | data1 = '''Quantity''' {{align|right|{{abbr|'''%DV'''|Percentage of Daily Value}}<sup>†</sup>}}


         | label2 = [[Calcium in biology#Humans|Calcium]]
         | label2 = [[Calcium in biology#Humans|Calcium]]
Line 221: Line 222:
             | <hr/><div class="wrap" style="padding:0.3em;line-height:1.2em;{{{belowstyle|}}}">{{{notes|}}}{{{note|}}}</div> }}
             | <hr/><div class="wrap" style="padding:0.3em;line-height:1.2em;{{{belowstyle|}}}">{{{notes|}}}{{{note|}}}</div> }}


| data31 = <div class="plainlist" style="background:#e0e0e0;padding:0.15em;line-height:1.25em;">
| rowclass31=plainlist
| data31 = <div style="background:#e0e0e0;padding:0.15em;line-height:1.25em;">
* Units
* Units
* μg = [[microgram]]s{{•}}mg = [[milligram]]s
* μg = [[microgram]]s{{•}}mg = [[milligram]]s
Line 229: Line 231:
| belowclass = wrap
| belowclass = wrap
| belowstyle = background:#e0e0e0;padding:0.3em;line-height:1.5em;font-weight:normal;
| belowstyle = background:#e0e0e0;padding:0.3em;line-height:1.5em;font-weight:normal;
| below = {{#ifexpr:{{#if:{{{noRDA|}}}|0|1}}+{{#if:{{{source|}}}{{{source_usda|}}}{{{source_USDA}}}|1|0}} |<!--(i.e. if noRDA hasn't been set and/or any of source/source_usda/source_USDA has/have been set, then:)-->{{#if:{{{noRDA|}}} | |<sup>†</sup>Percentages are roughly approximated using [[Dietary Reference Intake|US&nbsp;recommendations]] for adults.}} {{#if:{{{source_usda|}}}{{{source_USDA|}}} |<br/>{{nowrap|Source: [https://fdc.nal.usda.gov/index.html USDA Nutrient Database]}} | {{#if:{{{source|}}} | <br/>Source: {{{source}}} }} }} }}  
| below = {{#ifexpr:{{#if:{{{noRDA|}}}|0|1}}+{{#if:{{{source|}}}{{{source_usda|}}}{{{source_USDA}}}|1|0}} |<!--(i.e. if noRDA hasn't been set and/or any of source/source_usda/source_USDA has/have been set, then:)-->{{#if:{{{noRDA|}}} | |<sup>†</sup>Percentages are roughly approximated using [[Dietary Reference Intake|US&nbsp;recommendations]] for adults.}} {{#if:{{{source_usda|}}}{{{source_USDA|}}} |<br/>{{nowrap|Source: [https://fdc.nal.usda.gov/index.html USDA FoodData Central]}} | {{#if:{{{source|}}} | <br/>Source: {{{source}}} }} }} }}  


}}<noinclude>{{documentation}}</noinclude>
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox nutritional value with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox nutritional value]] with unknown parameter "_VALUE_"|ignoreblank=y| alanine | alcohol | arginine | aspartic acid | belowstyle | betacarotene_ug | caffeine | calcium_mg | caption | carbs | cholesterol | choline_mg | copper_mg | cystine | fat | fiber | fibre | float | folate_ug | glutamic acid | glycine | histidine | hydroxyproline | image | image_alt | image_size | iron_mg | isoleucine | kcal | kJ | lactose | leucine | lutein_ug | lysine | magnesium_mg | manganese_mg | methionine | monofat | name | niacin_mg | noRDA | note | notes | omega3fat | omega6fat | opt1n | opt1v | opt2n | opt2v | opt3n | opt3v | opt4n | opt4v | pantothenic_mg | phenylalanine | phosphorus_mg | polyfat | potassium_mg | proline | protein | riboflavin_mg | satfat | selenium_ug | serine | serving_size | sodium_mg | source | source_usda | source_USDA | starch | sugars | thiamin_mg | threonine | transfat | tryptophan | tyrosine | valine | vitA_asbeta_iu | vitA_iu | vitA_ug | vitB6_mg | vitB12_ug | vitC_mg | vitD_iu | vitD_ug | vitE_iu | vitE_mg | vitK_ug | water | zinc_mg }}<noinclude>{{documentation}}</noinclude>

Latest revision as of 18:25, 29 June 2023

{{{name}}}
Percentages are roughly approximated using US recommendations for adults.