Merge pull request #15 from theRTC204/material-design-styles

Added a fresh coat of paint from Materialize
master
Mike Bryant 4 years ago committed by GitHub
commit bd4cf7fff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,21 +1,20 @@
#turnipTable {
border: 1px solid #000000;
border-spacing: 0;
border-collapse: collapse;
}
#turnipTable th, #turnipTable td { #turnipTable th, #turnipTable td {
padding: 5px; padding: 5px;
border: 1px solid #000000; }
margin: 0;
min-width: 50px; #turnipTable thead tr:first-child {
border: none;
} }
#turnipTable th { #turnipTable th {
text-align: center; text-align: center;
vertical-align: top; }
#turnipTable td:first-child {
white-space: nowrap;
text-align: left;
} }
#turnipTable td { #turnipTable td {
text-align: right; text-align: center;
} }

@ -9,6 +9,8 @@
<meta name="author" content="Mike Bryant"> <meta name="author" content="Mike Bryant">
<link rel="stylesheet" href="css/styles.css?v=1.0"> <link rel="stylesheet" href="css/styles.css?v=1.0">
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<!-- Global site tag (gtag.js) - Google Analytics --> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162470902-1"></script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-162470902-1"></script>
@ -23,99 +25,113 @@
</head> </head>
<body> <body>
<p> <div class="container">
<div class="col s12 m5">
<div class="card-panel z-depth-0">
<span>
To use, enter as much data as you can from <b>your own island</b>. If you bought from Daisy on your own island <b>for the first time this week</b> leave the buy price blank. The tool will figure out all possible patterns and predict the lowest and highest prices for each day. To use, enter as much data as you can from <b>your own island</b>. If you bought from Daisy on your own island <b>for the first time this week</b> leave the buy price blank. The tool will figure out all possible patterns and predict the lowest and highest prices for each day.
</p> <p />
<p>
I couldn't have done this without <a href="https://twitter.com/_Ninji/status/1244818665851289602?s=20">Ninji's work extracting the code</a> I couldn't have done this without <a href="https://twitter.com/_Ninji/status/1244818665851289602?s=20">Ninji's work extracting the code</a>
</p> <p />
<p> Support, comments and contributions are available through <a href="https://github.com/mikebryant/ac-nh-turnip-prices/issues">Github</a>
Support, comments and contributions are available through <a href="https://github.com/mikebryant/ac-nh-turnip-prices/issues">Gitlab</a> </span>
</p> </div>
</div>
<form> <form>
<p> <div class="row">
<label>Daisy Mae</label><br> <div class="col s2">
<label> <h5>Daisy Mae</h5>
Buy price <div class="input-field">
<label for="buy">Buy price</label>
<input type="number" id="buy"> <input type="number" id="buy">
</label> </div>
</p> </div>
<p> </div>
<label>Monday</label><br> <div class="row">
<label> <div class="col s2">
AM <h6>Monday</h6>
<div class="input-field col s6">
<label for="sell_2">AM</label>
<input type="number" id="sell_2"> <input type="number" id="sell_2">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_3">PM</label>
<input type="number" id="sell_3"> <input type="number" id="sell_3">
</label> </div>
</p> </div>
<p> <div class="col s2">
<label>Tuesday</label><br> <h6>Tuesday</h6>
<label> <div class="input-field col s6">
AM <label for="sell_4">AM</label>
<input type="number" id="sell_4"> <input type="number" id="sell_4">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_5">PM</label>
<input type="number" id="sell_5"> <input type="number" id="sell_5">
</label> </div>
</p> </div>
<p> <div class="col s2">
<label>Wednesday</label><br> <h6>Wednesday</h6>
<label> <div class="input-field col s6">
AM <label for="sell_6">AM</label>
<input type="number" id="sell_6"> <input type="number" id="sell_6">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_7">PM</label>
<input type="number" id="sell_7"> <input type="number" id="sell_7">
</label> </div>
</p> </div>
<p> <div class="col s2">
<label>Thursday</label><br> <h6>Thursday</h6>
<label> <div class="input-field col s6">
AM <label for="sell_8">AM</label>
<input type="number" id="sell_8"> <input type="number" id="sell_8">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_9">PM</label>
<input type="number" id="sell_9"> <input type="number" id="sell_9">
</label> </div>
</p> </div>
<p> <div class="col s2">
<label>Friday</label><br> <h6>Friday</h6>
<label> <div class="input-field col s6">
AM <label for="sell_10">AM</label>
<input type="number" id="sell_10"> <input type="number" id="sell_10">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_11">PM</label>
<input type="number" id="sell_11"> <input type="number" id="sell_11">
</label> </div>
</p> </div>
<p> <div class="col s2">
<label>Saturday</label><br> <h6>Saturday</h6>
<label> <div class="input-field col s6">
AM <label for="sell_12">AM</label>
<input type="number" id="sell_12"> <input type="number" id="sell_12">
</label> </div>
<label> <div class="input-field col s6">
PM <label for="sell_13">PM</label>
<input type="number" id="sell_13"> <input type="number" id="sell_13">
</label> </div>
</p> </div>
<button id="reset">Reset</button> </div>
<div class="row">
<div class="col s12">
<button id="reset" class="btn waves-effect waves-light" type="submit" name="action">
Reset
</button>
</div>
</div>
</form> </form>
<p> <div class="divider"></div>
</p> <div class="card-panel z-depth-0">
<span>Your turnip prices will be one of the following patterns. Each cell contains the minimum..maximum price for that half-day. If you don't have a pattern, something's gone wrong, sorry &#128531;. Check back next week!</span>
</div>
<p> <div class="section">
<table id="turnipTable"> <table id="turnipTable" class="responsive-table highlight">
<caption>Your turnip prices will be one of the following patterns. Each cell contains the minimum..maximum price for that half-day. If you don't have a pattern, something's gone wrong, sorry :(. Check back next week!</caption>
<thead> <thead>
<tr> <tr>
<th rowspan="2">Pattern</th> <th rowspan="2">Pattern</th>
@ -146,10 +162,13 @@
</thead> </thead>
<tbody id="output"></tbody> <tbody id="output"></tbody>
</table> </table>
</p> </div>
</div>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="js/predictions.js"></script> <script src="js/predictions.js"></script>
<script src="js/scripts.js"></script> <script src="js/scripts.js"></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</body> </body>
</html> </html>

@ -12,15 +12,19 @@ $(document).ready(function () {
return; return;
} }
const buyInput = $("#buy");
if (index === 0) { if (index === 0) {
$("#buy").val(sell_price); buyInput.focus();
buyInput.val(sell_price);
buyInput.blur();
return; return;
} }
const element = $("#sell_" + index); const element = $("#sell_" + index);
if (element.length) { if (element.length) {
element.focus();
element.val(sell_price); element.val(sell_price);
element.blur();
} }
}); });

Loading…
Cancel
Save