Template:Infobox food: Difference between revisions

Public wiki for the 1904 Louisiana Purchase Exposition
No edit summary
No edit summary
Tag: Manual revert
 
(23 intermediate revisions by the same user not shown)
Line 21: Line 21:


| label4  = Admission
| label4  = Admission
|  data4  = {{{Admission|}}}
|  data4  = {{{admission|}}}


| rowclass5 = note
| label5  = Profit
| label5  = Profit
|  data5  = {{{profit|}}}}}}
|  data5  = {{{profit|}}}


| rowclass7 = note
| label7  = Owner
| label7  = Region or state
|  data7  = {{{owner|}}}
| class7  = region
|  data7  = {{{region|}}}
 
| label9  = Associated [[:Category:Cuisine by country|national cuisine]]
|  data9  = {{{associated_cuisine|{{{national_cuisine|}}}}}}


| rowclass11 = note
| rowclass11 = note
Line 43: Line 37:
|  data13 = {{{year|}}}
|  data13 = {{{year|}}}


<!----------------------Cooking time----------------------->
| label15 = Cooking time
|  data15 = {{#if:{{{mintime|{{{time1|}}}}}}{{{maxtime|{{{time2|}}}}}}
            | {{nowrap
                | {{#iferror: <!--(display nothing if calculations below generate an error)-->
                    {{#if:{{{mintime|{{{time1|}}}}}}
                      | {{#ifexpr:{{#expr:{{{mintime|{{{time1|}}}}}}>60}}
                        <!----(time is "X hour/s Y min":)---->
                        | <!----hours:-->{{rounddown|{{#expr:{{{mintime|{{{time1|}}}}}}/60}}}} <!--
                                                      <!--(units:)-->[[hour]]{{#ifeq:{{rounddown|{{#expr:{{{mintime|{{{time1|}}}}}}/60}}}}|1 | |s}} <!--
                          <!--minutes:-->{{#ifeq:{{#expr:{{{mintime|{{{time1|}}}}}} mod 60}}|0 |<!--(omit if "0 min")-->
                                          | {{#expr:{{{mintime|{{{time1|}}}}}} mod 60}} [[Minute|min]]
                                          }}
                        <!----(else time is "X minute/s":)---->
                        | {{{mintime|{{{time1|}}}}}} <!--(units:)-->[[minute]]{{#ifeq:{{{mintime|{{{time1|}}}}}}|1 | |s}}
                  }} }} }}<!--
              -->{{#iferror:
                    {{#if:{{{maxtime|{{{time2|}}}}}}
                      | {{#if:{{{mintime|{{{time1|}}}}}} |<!--(then cooking time given is from min(imum)time to
                                                              max(imum), so insert the "to" before the maximum:)-->&nbsp;to}} <!--
                          -->{{#ifexpr:{{#expr:{{{maxtime|{{{time2|}}}}}}>60}} <!--("X hour/s Y min" as above)-->
                              | {{rounddown|{{#expr:{{{maxtime|{{{time2|}}}}}}/60}}}} hour{{#ifeq:{{rounddown|{{#expr:{{{maxtime|{{{time2|}}}}}}/60}}}}|1 | |s}} <!--
                                  -->{{#ifeq:{{#expr:{{{maxtime|{{{time2|}}}}}} mod 60}}|0 | |{{#expr:{{{maxtime|{{{time2|}}}}}} mod 60}} min}}
                              | {{{maxtime|{{{time2|}}}}}} minute{{#ifeq:{{{maxtime|{{{time2|}}}}}}|1 | |s}}
                  }} }}      }}<!--
        -->}} }}
<!--------------------------------------------------------->


| label17 = Serving temperature
| label17 = Serving temperature
Line 84: Line 51:
| label23 = Variations
| label23 = Variations
|  data23 = {{{variations|}}}
|  data23 = {{{variations|}}}
<!-----------------------Food energy----------------------->
| label25 = {{longitem|style=line-height:1.1em;white-space:nowrap;
            | 1 = [[Food energy]]<br/><span style="font-size:90%;font-weight:normal;"><!--
                    -->(per {{#switch:{{{serving_size|}}}
                              | 100 grams |100 [[Gram|g]] |100 g |100g = 100&nbsp;[[Gram|g]] serving)
                              | #default = {{{serving_size|}}} serving)
                            }}<!-----></span>
            }}
| class25 = nutrition
|  data25 = {{#if:{{{calories|}}}
            | {{{calories}}}&nbsp;[[Calorie|kcal]]<!--
                -->{{#iferror:&nbsp;({{#expr:{{{calories}}}*4.1868 round 0}} [[kilojoule|kJ]])}}<!--
                -->{{{calories_ref|}}}
            }}
<!--------------------Nutritional value-------------------->
| label27 = {{longitem|style=line-height:1.1em;white-space:nowrap;
            | 1 = [[Nutrition|Nutritional value]]<br/><span style="font-size:90%;font-weight:normal;"><!--
                    -->(per {{#switch:{{{serving_size|}}}
                              | 100 grams |100 [[Gram|g]] |100 g |100g = 100&nbsp;[[Gram|g]] serving)
                              | #default = {{{serving_size|}}} serving)
                            }}<!--                --></span>
            }}
|  data27 = {{#if:{{{protein|}}}{{{fat|}}}{{{carbohydrate|}}}
            | {{Infobox
                |bodystyle={{infobox subbox bodystyle}}
                |labelstyle=width:6.75em;padding-right:0.35em;<!--(to ensure some gap between "Carbohydrate" and any subsequent data)-->line-height:1.3em;font-weight:normal;
                |datastyle=line-height:1.3em;
                |label1=[[Protein (nutrient)|Protein]] |data1={{{protein}}}&nbsp;[[Gram|g]]
                |label2=[[Fat]]          |data2={{{fat}}}&nbsp;[[Gram|g]]
                |label3=[[Carbohydrate]] |data3={{{carbohydrate}}}&nbsp;[[Gram|g]]
            }} }}
<!--------------------Glycemic index----------------------->
| label32 = [[Glycemic index|{{allow wrap|Glycemic index}}]]
|  data32 = {{#iferror:
              {{#if:{{{glycemic_index|}}}
                | {{smaller
                  | {{#ifexpr:{{#expr:{{{glycemic_index}}}<56}}
                      | {{{glycemic_index}}}&nbsp;({{background|#ccffcc|low}})
                      | {{#ifexpr:{{#expr:{{{glycemic_index}}}<70}}
                        | {{{glycemic_index}}}&nbsp;({{background|#ffff99|medium}})
                        | {{{glycemic_index}}}&nbsp;({{background|#ffcc99|high}})
            }} }} }} }} }}
<!--------------------------------------------------------->


| label34 = Similar dishes
| label34 = Similar dishes
Line 139: Line 60:


| belowstyle = border-top:1px solid #aaa;padding-top:0.25em;{{{belowstyle|}}}
| belowstyle = border-top:1px solid #aaa;padding-top:0.25em;{{{belowstyle|}}}
| below = {{Unbulleted list
}}{{#invoke:check for unknown parameters|check
  | {{#if:{{Yesno|{{{no_recipes|}}}}} <includeonly>|</includeonly> |<!--
    -->{{#if:{{{cookbook|}}}|{{sister-inline|project=wikibooks|short=yes|links=[[:b:Cookbook:{{{cookbook}}}|Cookbook: {{{cookbook}}}]]}}| <!--
        -->{{#if:{{#invoke:WikidataIB|getSiteLink|wiki=enwikibooks|qid={{{qid|}}}}}|<!--
            -->{{sister-inline|project=wikibooks|short=yes|links=[[:b:{{#invoke:WikidataIB|getSiteLink|wiki=enwikibooks|qid={{{qid|}}}}}|Cookbook: {{if empty|{{{name|}}}|{{PAGENAME}}}}]]}}}}}}}}
  | {{#if:{{Yesno|{{{no_commons|}}}}} <includeonly>|</includeonly> |<!--
-->{{#if:{{{commons|}}}{{#invoke:Commons link|hasGalleryOrCategory|qid={{{qid|}}}}}|&nbsp;{{Commons-inline|short=yes|{{{commons|}}}|qid={{{qid|}}}|notrack=1|<!--
-->Media{{colon}} {{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}}} }} }}
}}}}{{#invoke:check for unknown parameters|check
|unknown={{main other|[[Category:Pages using infobox food with unknown parameters|_VALUE_]]}}
|unknown={{main other|[[Category:Pages using infobox food with unknown parameters|_VALUE_]]}}
|preview=unknown parameter "_VALUE_"
|preview=unknown parameter "_VALUE_"
|alt|alternate name|alternate_name|associated_cuisine|belowstyle|calories|calories_ref|caption|carbohydrate|commons|cookbook|country
|alt|alternate name|alternate_name|associated_cuisine|belowstyle|calories|calories_ref|caption|carbohydrate|commons|cookbook|country
|course|creator|fat|glycemic_index|image|image_alt|image_size|main_ingredient|maxtime|minor_ingredient|mintime
|course|creator|fat|glycemic_index|image|image_alt|image_size|main_ingredient|maxtime|minor_ingredient|mintime
|profit|cost|admission|owner
|name|name_italics|name_lang|national_cuisine|no_commons|no_recipes|other|place_of_origin|protein|qid|region|served|serving_size
|name|name_italics|name_lang|national_cuisine|no_commons|no_recipes|other|place_of_origin|protein|qid|region|served|serving_size
|similar_dish|time1|time2|type|variations|year}}<noinclude>{{Documentation}}</noinclude>
|similar_dish|time1|time2|type|variations|year}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 17:08, 8 November 2022