Updates to: Calculation Script, Reset Script, App Copy, App Styling

Finalized the calculation script and reset script. Now it will calculate any weight with no issues.

Updated the copy to make it easier to understand how the app works and how to access certain things.

Updated options button to make it stand out and appear clickable.
This commit is contained in:
2018-11-05 15:43:09 -05:00
parent 91a862e70d
commit 8425f6e59e
3 changed files with 6 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ a {
} }
.b-header__container { .b-header__container {
width: 80%; width: 85%;
margin: 0; margin: 0;
position: absolute; position: absolute;
top: 50%; top: 50%;
@@ -392,6 +392,7 @@ input.input-calculate:focus{
.b-infoentry__heading{ .b-infoentry__heading{
background: #48484A; background: #48484A;
color: #CCFF00;
white-space: nowrap; white-space: nowrap;
padding: 0 32px; padding: 0 32px;
position: absolute; position: absolute;

View File

@@ -34,7 +34,7 @@
<a name="header"></a><div class="b-header"> <a name="header"></a><div class="b-header">
<div class="b-header__container"> <div class="b-header__container">
<h1 class="b-header__heading">What are you lifting?</h1> <h1 class="b-header__heading">What are you lifting?</h1>
<p class="b-header__subheading subheading">Type in your weight below and it will calculate the plates needed.</p> <p class="b-header__subheading subheading">Enter your weight at the bottom and calculate your plates. Change your bar weight and plates in options.</p>
</div> </div>
</div> </div>

View File

@@ -124,7 +124,7 @@
// Script for weights under 5lbs heavier then the bar. Still needs tweaking. // Script for weights under 5lbs heavier then the bar. Still needs tweaking.
var bar = jQuery(".input-bar").val(); var bar = jQuery(".input-bar").val();
var bartest = parseInt(bar)+4; var bartest = parseInt(bar)+4;
if (jQuery(".input-weight").val() <= bartest) { if (jQuery(".input-weight").val() <= bartest && jQuery(".input-weight").val() != "") {
jQuery(".input-final").html(bar); jQuery(".input-final").html(bar);
var offset = Math.abs(jQuery(".input-weight").val() - bar); var offset = Math.abs(jQuery(".input-weight").val() - bar);
if (jQuery(".input-weight").val() !== bar) { if (jQuery(".input-weight").val() !== bar) {
@@ -187,6 +187,8 @@
jQuery(".b-infoentry__reset").click(function(){ jQuery(".b-infoentry__reset").click(function(){
//sets current bar weight //sets current bar weight
var bar = jQuery(".input-bar").val(); var bar = jQuery(".input-bar").val();
//resets offset
jQuery(".input-difference").text("0")
//resets input for weight and required plate numbers //resets input for weight and required plate numbers
jQuery(".input-weight, .input-weightsneeded").val(''); jQuery(".input-weight, .input-weightsneeded").val('');
//Updates the weight display to the bar weight //Updates the weight display to the bar weight