Template:Nutrition: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Robert W King
No edit summary
imported>Robert W King
No edit summary
 
(30 intermediate revisions by the same user not shown)
Line 1: Line 1:
temporarily reserving this page for a nutrional facts box.
{|border="1" white-space="nowrap" frame=box rules=none align="{{{align}}}" cellpadding="2" cellspacing="0" style="margin: 0 0 0 0; background:white; collapse=true"  
 
|
 
{|border="8" width=100% frame=below white-space="nowrap" rules=none align="center" style="margin: 0 0 0 0; background:white; collapse=true"
{|border="1" white-space="nowrap" width="225" align="{{{align}}}" cellpadding="5" cellspacing="1" style="margin: 0 0 0 0; background:white;"  
|colspan="3"|<font family="Helvetica Black" weight=900 size=6px align=justify>'''Nutrition Facts'''</font>
|colspan="4" width="100%"|<font family="Franklin Gothic Heavy" weight=900 size=6px align=justify>Nutrition Facts</font>
|-
|colspan="3"|<font family="Helvetica Regular" weight=200 size=2.5pt align="left">Serving Size  {{{servingsize}}} ({{{grams}}} g)</font>
|-
|colspan="3" nowrap="true"|Servings Per Container {{{percontainer}}}
|}
|-
|
{|border="4" width=100% frame=below white-space="nowrap" rules=row align="center" style="margin: 0 0 0 0; background:white; collapse=true"
|colspan="3"|'''Amount Per Serving'''
|-
|align="left" nowrap="true"|<font family="Helvetica Black">'''Calories''' {{{calories}}}</font>
|align="right" nowrap="true"|<font family="Helvetica Regular">Calories from Fat {{{fromfat}}}</font>
|}
|-
|
{|border="8" width=100% frame=below white-space="nowrap" rules=row align="center" style="margin: 0 0 0 0; background:white; collapse=true"
|-
|colspan="3" align="right" nowrap="true"|<font family="Helvetica Black" weight=900 size="2.8px">% Daily Value*</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Black">'''Total Fat''' {{{totalfat}}}g</font>
|align="right"|<font family="Helvetica Black">'''{{{percenttotalfat}}}%'''</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Regular">&nbsp;Saturated Fat {{{satfat}}}g</font>
|align="right"|<font family="Helvetica Black">'''{{{percentsatfat}}}%'''</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Black">'''Cholesterol''' {{{cholesterol}}}mg</font>
|align="right"|<font family="Helvetica Black">'''{{{percentcholesterol}}}%'''</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Black">'''Sodium''' {{{sodium}}}mg</font>
|align="right"|<font family="Helvetica Black">'''{{{percentsodium}}}%'''</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Black">'''Total Carbohydrate''' {{{carbs}}}g</font>
|align="right"|<font family="Helvetica Black">'''{{{percentcarbs}}}%'''</font>
|-
|align="left" nowrap="true" colspan="2"|<font family="Helvetica Regular">&nbsp;Dietary Fiber {{{fiber}}}g</font>
|align="right"|<font family="Helvetica Black">'''{{{percentfiber}}}%'''</font>
|-
|-
|colspan="4"|Serving Size  {{{servingsize}}} ({{{grams}}} g)
|align="left" nowrap="true" colspan="3"|<font family="Helvetica Regular">&nbsp;Sugars {{{sugar}}}g</font>
|-
|-
|colspan="4"|Servings Per Container {{{percontainer}}}
|align="left" nowrap="true" colspan="3"|<font family="Helvetica Black">'''Protein''' {{{protein}}}g</font>
|}
|-
|-
|colspan="4"|'''Amount Per Serving'''
|
{|border="1" bordercolor="white" width=100% white-space="nowrap" frame=void rules=row align="center" style="margin: 0 0 0 0; background:white; collapse=true"  
|-
|-
|colspan="1" align="left"|'''Calories''' {{{calories}}}
|align="left" nowrap="true"|<font family="Helvetica Regular">Vitamin A {{{A}}}%</font>
|&nbsp;
|align="center"|
|&nbsp;
|align="right" nowrap="true"|<font family="Helvetica Regular">Vitamin C {{{C}}}%</font>
|colspan="1" align="right"|Calories from Fat {{{fromfat}}}
|-
|-
|colspan="4" align="right"|'''% Daily Value*'''
|align="left" nowrap="true"|<font family="Helvetica Regular">Calcium {{{calcium}}}%</font>
|align="center"|•
|align="right" nowrap="true"|<font family="Helvetica Regular">Iron {{{iron}}}%</font>
|-
|}
|}


|}
<noinclude>
{{newtemplate
|description= Nutrition Facts label based on [http://osuextra.okstate.edu/pdfs/FAPC-119web.pdf this site at okstate.edu]
|execution= Pretty much just look at a food label, and copy the numbers!  use
<pre>
{{nutrition
|align=the side you want it on
|servingsize= how many servings for each unit?
|percontainer= how many servings in the total container
|grams= how many grams per serving
|calories= number of calories
|fromfat= calories from fat
|totalfat= total fat
|percenttotalfat= percentage of total fat
|satfat= saturated fat
|percentsatfat= percentage of saturated fat
|cholesterol= cholesterol
|percentcholesterol= percentage of cholesterol
|sodium= sodium
|percentsodium= percentage of sodium
|carbs= carbohydrates
|percentcarbs= percent of carbs
|fiber= dietary fibers
|percentfiber= percent of dietary fiber
|sugar= sugar in grams
|protein= protein in grams
|A= vitamin A percent
|C= vitamin C percent
|calcium= percent calcium
|iron= percent iron
}}</pre>
|sample={{Nutrition
|align=right
|servingsize=2 pieces
|percontainer=1000
|grams=3
|calories=5
|fromfat=100
|totalfat=13
|percenttotalfat=20
|satfat=5
|percentsatfat=10
|cholesterol=30
|percentcholesterol=10
|sodium=660
|percentsodium=28
|carbs=31
|percentcarbs=10
|fiber=0
|percentfiber=0
|sugar=5
|protein=5
|A=4
|C=2
|calcium=15
|iron=4
}}
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
 
|caveats=does not yet include logic to add or remove sections of the label as of 2008-02-24
|authors=--[[User:Robert W King|Robert W King]] 18:41, 24 February 2008 (CST)
}}
</noinclude>

Latest revision as of 20:08, 24 February 2008

Nutrition Facts
Serving Size {{{servingsize}}} ({{{grams}}} g)
Servings Per Container {{{percontainer}}}
Amount Per Serving
Calories {{{calories}}} Calories from Fat {{{fromfat}}}
% Daily Value*
Total Fat {{{totalfat}}}g {{{percenttotalfat}}}%
 Saturated Fat {{{satfat}}}g {{{percentsatfat}}}%
Cholesterol {{{cholesterol}}}mg {{{percentcholesterol}}}%
Sodium {{{sodium}}}mg {{{percentsodium}}}%
Total Carbohydrate {{{carbs}}}g {{{percentcarbs}}}%
 Dietary Fiber {{{fiber}}}g {{{percentfiber}}}%
 Sugars {{{sugar}}}g
Protein {{{protein}}}g
Vitamin A {{{A}}}% Vitamin C {{{C}}}%
Calcium {{{calcium}}}% Iron {{{iron}}}%




Template Description

Nutrition Facts label based on this site at okstate.edu

Execution

Pretty much just look at a food label, and copy the numbers! use

{{nutrition
|align=the side you want it on
|servingsize= how many servings for each unit?
|percontainer= how many servings in the total container
|grams= how many grams per serving
|calories= number of calories
|fromfat= calories from fat
|totalfat= total fat
|percenttotalfat= percentage of total fat
|satfat= saturated fat
|percentsatfat= percentage of saturated fat
|cholesterol= cholesterol
|percentcholesterol= percentage of cholesterol
|sodium= sodium
|percentsodium= percentage of sodium
|carbs= carbohydrates
|percentcarbs= percent of carbs
|fiber= dietary fibers 
|percentfiber= percent of dietary fiber
|sugar= sugar in grams
|protein= protein in grams
|A= vitamin A percent
|C= vitamin C percent
|calcium= percent calcium
|iron= percent iron
}}

Sample

Nutrition Facts
Serving Size 2 pieces (3 g)
Servings Per Container 1000
Amount Per Serving
Calories 5 Calories from Fat 100
% Daily Value*
Total Fat 13g 20%
 Saturated Fat 5g 10%
Cholesterol 30mg 10%
Sodium 660mg 28%
Total Carbohydrate 31g 10%
 Dietary Fiber 0g 0%
 Sugars 5g
Protein 5g
Vitamin A 4% Vitamin C 2%
Calcium 15% Iron 4%


























Caveats

does not yet include logic to add or remove sections of the label as of 2008-02-24

Authors

--Robert W King 18:41, 24 February 2008 (CST)