nutrition-label-jquery-plugin
Version:
To be able to create a FDA-style nutrition label with any nutrition data source
283 lines (252 loc) • 8.88 kB
HTML
<html lang="en">
<head>
<title>Legacy Version Demo Page</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-7s5uDGW3AHqw6xtJmNNtr+OBRJUlgkNJEo78P4b0yRw= sha512-nNo+yCHEyn0smMxSswnf/OnX6/KwJuZTlNZBjauKhTK0c+zT+q5JOCx0UFhXQ6rJR9jg6Es8gPuD2uZcYDLqSw==" crossorigin="anonymous">
<link rel='stylesheet' type='text/css' media='all' href='../../nutritionLabel-min.css'>
<link rel='stylesheet' type='text/css' media='all' href='./../css/demo.css'>
<!-- google webfont for nutrition label -->
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Archivo+Black" />
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-3 col-md-2 sidebar">
<ul class="nav nav-sidebar">
<li><a href="../demo.html"><i class="icon-chevron-right"></i> Back to Demo Page</a></li>
<li><a href="#test1"><i class="icon-chevron-right"></i> Example 1 - A</a></li>
<li><a href="#test2"><i class="icon-chevron-right"></i> Example 1 - B</a></li>
<li><a href="#test3"><i class="icon-chevron-right"></i> Example 1 - C</a></li>
<li><a href="#test4"><i class="icon-chevron-right"></i> Example 1 - D</a></li>
<li><a href="#test5"><i class="icon-chevron-right"></i> Example 2 - A</a></li>
<li><a href="#test6"><i class="icon-chevron-right"></i> Example 2 - B</a></li>
<li><a href="#test7"><i class="icon-chevron-right"></i> Example 2 - C</a></li>
<li><a href="#test8"><i class="icon-chevron-right"></i> Example 2 - D</a></li>
<li><a href="#test9"><i class="icon-chevron-right"></i> Example C - A</a></li>
<li><a href="#test10"><i class="icon-chevron-right"></i> Example C - B</a></li>
<li><a href="#test11"><i class="icon-chevron-right"></i> Example C - C</a></li>
<li><a href="#test12"><i class="icon-chevron-right"></i> Example C - D</a></li>
</ul>
</div>
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
<div class="row">
<div class="col-md-4">
<div id="test1"></div>
</div>
<div class="col-md-8">
<h3>Example #1 - A</h3>
<pre id="pre1">
$('#test1').nutritionLabel({
itemName : 'Garlic Parmesan Wings - 1 Wingette Or Drummette',
valueServingSizeUnit : 'wingette or drummette',
valueServingWeightGrams : 27,
allowCustomWidth : true,
widthCustom : '325.625px'
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test2"></div>
</div>
<div class="col-md-8">
<h3>Example #1 - B</h3>
<pre id="pre2">
$('#test2').nutritionLabel({
itemName : 'Garlic Parmesan Wings - 1 Wingette Or Drummette',
valueServingSizeUnit : 'wingette or drummette',
valueServingWeightGrams : 27,
allowCustomWidth : true,
widthCustom : '325.625px',
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test3"></div>
</div>
<div class="col-md-8">
<h3>Example #1 - C</h3>
<pre id="pre3">
$('#test3').nutritionLabel({
itemName : 'Garlic Parmesan Wings - 1 Wingette Or Drummette',
valueServingSizeUnit : 'wingette or drummette',
valueServingWeightGrams : 27
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test4"></div>
</div>
<div class="col-md-8">
<h3>Example #1 - D</h3>
<pre id="pre4">
$('#test4').nutritionLabel({
itemName : 'Garlic Parmesan Wings - 1 Wingette Or Drummette',
valueServingSizeUnit : 'wingette or drummette',
valueServingWeightGrams : 27,
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test5"></div>
</div>
<div class="col-md-8">
<h3>Example #2 - A</h3>
<pre id="pre5">
$('#test5').nutritionLabel({
itemName : 'Pork, fresh, loin, whole, separable lean and fat, raw - 1 chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingSizeUnit : 'chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingWeightGrams : 117.00,
allowCustomWidth : true,
widthCustom : '325.625px'
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test6"></div>
</div>
<div class="col-md-8">
<h3>Example #2 - B</h3>
<pre id="pre6">
$('#test6').nutritionLabel({
itemName : 'Pork, fresh, loin, whole, separable lean and fat, raw - 1 chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingSizeUnit : 'chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingWeightGrams : 117.00,
allowCustomWidth : true,
widthCustom : '325.625px',
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test7"></div>
</div>
<div class="col-md-8">
<h3>Example #2 - C</h3>
<pre id="pre7">
$('#test7').nutritionLabel({
itemName : 'Pork, fresh, loin, whole, separable lean and fat, raw - 1 chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingSizeUnit : 'chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingWeightGrams : 117.00
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test8"></div>
</div>
<div class="col-md-8">
<h3>Example #2 - D</h3>
<pre id="pre8">
$('#test8').nutritionLabel({
itemName : 'Pork, fresh, loin, whole, separable lean and fat, raw - 1 chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingSizeUnit : 'chop, excluding refuse (yield from 1 raw chop, with refuse, weighing 151 g)',
valueServingWeightGrams : 117.00,
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test9"></div>
</div>
<div class="col-md-8">
<h3>Example #3 - A</h3>
<pre id="pre9">
$('#test9').nutritionLabel({
itemName : 'Rolls, pumpernickel - 1 roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingSizeUnit : 'roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingWeightGrams : 28.00,
allowCustomWidth : true,
widthCustom : '325.625px'
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test10"></div>
</div>
<div class="col-md-8">
<h3>Example #3 - B</h3>
<pre id="pre10">
$('#test10').nutritionLabel({
itemName : 'Rolls, pumpernickel - 1 roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingSizeUnit : 'roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingWeightGrams : 28.00,
allowCustomWidth : true,
widthCustom : '325.625px',
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test11"></div>
</div>
<div class="col-md-8">
<h3>Example #3 - C</h3>
<pre id="pre11">
$('#test11').nutritionLabel({
itemName : 'Rolls, pumpernickel - 1 roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingSizeUnit : 'roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingWeightGrams : 28.00
});
</pre>
</div>
</div><br /><br /><br />
<div class="row">
<div class="col-md-4">
<div id="test12"></div>
</div>
<div class="col-md-8">
<h3>Example #3 - D</h3>
<pre id="pre12">
$('#test12').nutritionLabel({
itemName : 'Rolls, pumpernickel - 1 roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingSizeUnit : 'roll (pan, dinner, or small roll) (2" square, 2" high)',
valueServingWeightGrams : 28.00,
legacyVersion : 2
});
</pre>
</div>
</div><br /><br /><br />
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="../../nutritionLabel-min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
eval( eval( $('#pre1').html() ) );
eval( eval( $('#pre2').html() ) );
eval( eval( $('#pre3').html() ) );
eval( eval( $('#pre4').html() ) );
eval( eval( $('#pre5').html() ) );
eval( eval( $('#pre6').html() ) );
eval( eval( $('#pre7').html() ) );
eval( eval( $('#pre8').html() ) );
eval( eval( $('#pre9').html() ) );
eval( eval( $('#pre10').html() ) );
eval( eval( $('#pre11').html() ) );
eval( eval( $('#pre12').html() ) );
});
</script>
</body>
</html>