fast-calorie/public/index.html

162 lines
6.9 KiB
HTML
Raw Normal View History

2020-09-19 21:38:26 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/icon" href="favicon.ico">
<link rel="apple-touch-icon" href="images/icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="app to track your calories fast" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="/manifest.json" />
2020-09-20 01:45:42 +00:00
<link rel="stylesheet" type="text/css" href="/vendor/css/materialize.css" />
2020-09-19 21:38:26 +00:00
<link rel="stylesheet" type="text/css" href="/css/styles.css" />
<link rel="stylesheet" type="text/css" href="/css/layout.css" />
2020-09-20 01:45:42 +00:00
<script src="/vendor/js/materialize.js"></script>
2020-09-19 21:38:26 +00:00
<title>Fast Calorie</title>
</head>
<body>
<div id="app">
<div class="layout-app">
<header class="layout-header">
<nav>
<div class="nav-wrapper brown">
<a href="/" class="brand-logo">Fast Calorie</a>
<ul id="nav" class="right">
<li class="datepicker" style="margin-right: 1rem;">
<i class="material-icons">date_range</i>
</li>
</ul>
</div>
</nav>
</header>
<main class="layout-content">
<section class="section">
<div class="row">
<div class="col s2"></div>
2020-09-20 00:39:28 +00:00
<div class="col s8 center"><h5 class="marginless">{this.date}</h5> </div>
2020-09-19 21:38:26 +00:00
<div class="col s2 right"></div>
</div>
<div class="row">
<div class="col s4 center">
<strong>Cals Left</strong>
<p>{this.left}</p>
</div>
<div class="col s4 center">
<strong>Goal</strong>
<p>{this.settings.goal}</p>
</div>
<div class="col s4 center">
<strong>Used</strong>
<p>{this.used}</p>
</div>
</div>
</section>
<section>
<form id="entry" action="">
<div class="row">
<div class="col s8">
<label for="">Name</label>
<input type="text" id="name" placeholder="Item Description (optional)">
</div>
<div class="col s4">
<label for="">Calories</label>
2020-09-20 00:38:56 +00:00
<input type="number" id="calories" placeholder="Item Calories" @keyup="search">
</div>
</div>
<div :if="this.choices.length" class="collection ">
<div :for="item, i in this.choices" class="row collection-item" idx="{i}">
<div class="col s2 grey-text text-lighten-1" idx="{i}">{item.type}</div>
<div class="col s8" idx="{i}">{item.name} - <em>{item.description}</em></div>
<div class="col s2" idx="{i}">
<button class="btn brown right" idx="{i}" @click="order">
Add
<i class="material-icons left">add_circle_outline</i>
</button>
</div>
2020-09-19 21:38:26 +00:00
</div>
</div>
<div class="row">
<div class="col right">
<button class="btn green" @click="save">Add Calories</button>
</div>
</div>
</form>
</section>
<div class="divider"></div>
<section :if="this.history.length">
<ul class="collection with-header">
<li class="collection-header">
<h5>Today's Entries<span class="right" style="margin-right: 1rem;">{this.history.length}</span></h5>
</li>
<li :for="entry, i in this.history" idx="{i}" class="collection-item row modal-trigger" @click="details"
data-target="detailsModal">
<div class="col s2 grey-text text-lighten-1" idx="{i}">{entry.type}</div>
<div class="col s8" idx="{i}">{entry.name || 'Add Entry Description'}</div>
<div class="col s2">
<span class="right" idx="{i}">{entry.value}</span>
</div>
</li>
</ul>
<div class="divider"></div>
<div class="row">
<div class="col s8"></div>
<div class="col s2 center">
<h6><strong>Total</strong></h6>
</div>
<h6 class="col s2"><span class="right" style="margin-right: 1rem;">{this.used}</span> </h6>
</div>
</section>
2020-09-20 00:38:56 +00:00
2020-09-19 21:38:26 +00:00
</main>
<footer class="layout-footer orange">
<div class="container">
&nbsp;
</div>
<div class="footer-copyright">
<div class="container">
© 2020 Negative9.NET
<a class="grey-text text-lighten-4 right" href="#!">More Links</a>
</div>
</div>
<div class="container">
&nbsp;
</div>
</footer>
</div>
<!-- Modal Structure -->
<div id="detailsModal" class="modal">
<div class="modal-content">
<h4>Entry Details</h4>
<p>
<table>
<tr>
<th>Name</th>
<td>{this.selected.name}</td>
</tr>
<tr>
<th>Calories</th>
<td>{this.selected.value}</td>
</tr>
</table>
</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Close</a>
<button class="btn red" @click="remove" idx="{this.selected.idx}">Remove Entry</button>
</div>
</div>
</div>
<script type="module" src="/js/index.js"></script>
</body>
</html>