<commit_before><!doctype html>

<html>
{{> html-header}}

<body>
	{{> navbar}}
	Past Meals
	{{> navbar-hack}}

	<div class="container">
		
		<table class="table table-striped" sortable="sortable">
			<thead>
				<tr>
					<th>Date</th>
					<th>Meal</th>
					<th>Nutrition</th>
					<!-- <th>Totals</th> -->
				</tr>
			</thead>

			<!-- dynamic table how-to? -->
			<h4 id="welcome" align="center"></h4>

			<tbody>
				<col width="20%">
				<col width="45%">
				<col width="35%">

				<!-- any other <each> instances to "note"? -->
				{{#each users}}
					{{#if selected}}
						{{#if empty}}
							<tr>
								<td colspan="3" align="center"><hr/>
								<h5 style="color:#8382BF;">No meals input yet. Not feeling hungry?</h5>
								</td>
							</tr>
						{{else}} {{#each days}}
							<tr>
								<td>{{date}}
									{{#if snapshots}}
										{{#each meals}}
											{{#if pic}}
												<br/> <img src="{{pic}}" class="img-responsive img-rounded" width="60" height="60">
											{{/if}}
										{{/each}}
									{{else}}
										<br/> <img src="http://thumbs.dreamstime.com/m/refresh-ccw-flat-black-color-rounded-vector-icon-symbol-drawn-light-gray-background-57876713.jpg" class="img-responsive img-rounded" width="60" height="60">
									{{/if}}
								</td>

								<td>
									{{#each meals}}
										<!-- breakfast, lunch, etc. -->
										<u>{{time}}</u> <!-- at which place -->
											<br/> <b>{{servings1}} x</b> {{food1}}
										{{#if food2}}
											<br/> <b>{{servings2}} x</b> {{food2}}
										{{/if}}
										{{#if food3}}
											<br/> <b>{{servings3}} x</b> {{food3}}
										{{/if}}
										{{#if food4}}
											<br/> <b>{{servings4}} x</b> {{food4}}
										{{/if}}
										<br/><br/>
									{{/each}}
								</td>

								<td id="{{date}}"> 
									{{#each meals}}
										<!-- data injected from js/history.js -->
										<div class="nutrition-info">
											<!-- divs to get info -->
											<div class="foods">
												<div class="{{food1}}">
													<div class="{{servings1}}"></div>
												</div>
												{{#if food2}}
													<div class="{{food2}}">
														<div class="{{servings2}}"></div>
													</div>
												{{/if}}
												{{#if food3}}
													<div class="{{food3}}">
														<div class="{{servings3}}"></div>
													</div>
												{{/if}}
												{{#if food4}}
													<div class="{{food4}}">
														<div class="{{servings4}}"></div>
													</div>
												{{/if}}
											</div>

											<!-- stuff to display: -->
											<b>Calories: </b>
											<div class="calories" style="display:inline;">0</div><br/>
											<b>Total Fat: </b>
											<div class="total_fat" style="display:inline;">0</div>g<br/>
											<b>Protein: </b>
											<div class="protein" style="display:inline;">0</div>g<br/>
											<b>Fiber: </b>
											<div class="fiber" style="display:inline;">0</div>g<br/>

											<!-- data["dishes"][0]["menu"][i]["name"] == req.params.id-->
										</div>
										<br/>
									{{/each}}
								</td>
							</tr>
						{{/each}} {{/if}}
					{{/if}}
				{{/each}}
			</tbody>
		</table>

	</div>

	{{> icon-panel}}

	<script src="js/jquery-1.11.0.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="js/history.js"></script>
	<script src="js/common.js"></script>
	<script>
		// document.getElementById("history-iconbar").setAttribute("class","btn btn-secondary btn-sm navbar-btn");
		// document.getElementById("history-link").setAttribute("href","#");
		{{#each users}}
			{{#if selected}}
				$("#welcome").text("Hello, " + ("{{name}}").split(" ")[0] + "!");
		{{/if}}{{/each}}
	</script>
</body>
</html><commit_msg>changed to per meal rows for proper totals<commit_after><!doctype html>

<html>
{{> html-header}}

<body>
	{{> navbar}}
	Past Meals
	{{> navbar-hack}}

	<div class="container">
		
		<table class="table table-striped" sortable="sortable">
			<thead>
				<tr>
					<th>Picture</th>
					<th>Meal</th>
					<th>Nutrition</th>
					<!-- <th>Totals</th> -->
				</tr>
			</thead>

			<!-- dynamic table how-to? -->
			<h4 id="welcome" align="center"></h4>

			<tbody>
				<col width="25%">
				<col width="40%">
				<col width="35%">

				<!-- any other <each> instances to "note"? -->
				{{#each users}}
					{{#if selected}}
						{{#if empty}}
							<tr>
								<td colspan="3" align="center"><hr/>
								<h5 style="color:#8382BF;">No meals input yet. Not feeling hungry?</h5>
								</td>
							</tr>
						{{else}}
							{{#each days}}
								<tr>
									<td colspan="3" align="center">
									<b>{{date}}</b>
									</td>
								</tr>
								{{#each meals}}
									<tr>
										<td>
											{{#if pic}}
												<br/> <img src="{{pic}}" class="img-responsive img-rounded" width="60" height="60">
											{{else}}
												<br/> <img src="http://thumbs.dreamstime.com/m/refresh-ccw-flat-black-color-rounded-vector-icon-symbol-drawn-light-gray-background-57876713.jpg" class="img-responsive img-rounded" width="60" height="60">
											{{/if}}
										</td>

										<td>
											<!-- breakfast, lunch, etc. -->
											<u>{{time}}</u> <!-- at which place -->
												<br/> <b>{{servings1}} x</b> {{food1}}
											{{#if food2}}
												<br/> <b>{{servings2}} x</b> {{food2}}
											{{/if}}
											{{#if food3}}
												<br/> <b>{{servings3}} x</b> {{food3}}
											{{/if}}
											{{#if food4}}
												<br/> <b>{{servings4}} x</b> {{food4}}
											{{/if}}
										</td>

										<td id="{{date}}"> 
											<!-- data injected from js/history.js -->
											<div class="nutrition-info">
												<!-- divs to get info -->
												<div class="foods">
													<div class="{{food1}}">
														<div class="{{servings1}}"></div>
													</div>
													{{#if food2}}
														<div class="{{food2}}">
															<div class="{{servings2}}"></div>
														</div>
													{{/if}}
													{{#if food3}}
														<div class="{{food3}}">
															<div class="{{servings3}}"></div>
														</div>
													{{/if}}
													{{#if food4}}
														<div class="{{food4}}">
															<div class="{{servings4}}"></div>
														</div>
													{{/if}}
												</div>

												<!-- stuff to display: -->
												<b>Calories: </b>
												<div class="calories" style="display:inline;">0</div><br/>
												<b>Total Fat: </b>
												<div class="total_fat" style="display:inline;">0</div>g<br/>
												<b>Protein: </b>
												<div class="protein" style="display:inline;">0</div>g<br/>
												<b>Fiber: </b>
												<div class="fiber" style="display:inline;">0</div>g<br/>

												<!-- data["dishes"][0]["menu"][i]["name"] == req.params.id-->
											</div>
										</td>
									</tr>
								{{/each}}
							{{/each}}
						{{/if}}
					{{/if}}
				{{/each}}
			</tbody>
		</table>

	</div>

	{{> icon-panel}}

	<script src="js/jquery-1.11.0.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="js/history.js"></script>
	<script src="js/common.js"></script>
	<script>
		// document.getElementById("history-iconbar").setAttribute("class","btn btn-secondary btn-sm navbar-btn");
		// document.getElementById("history-link").setAttribute("href","#");
		{{#each users}}
			{{#if selected}}
				$("#welcome").text("Hello, " + ("{{name}}").split(" ")[0] + "!");
		{{/if}}{{/each}}
	</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.23963374754741662, 'fraction_numerical': 0.016612164813603662, 'mean_word_length': 1.7602888086642599, 'pattern_counts': {'":': 0, '<': 254, '<?xml version=': 0, '>': 262, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '739658', 'n_tokens_mistral': 4270, 'n_tokens_neox': 2633, 'n_words': 482}