X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/cards/%7B%7Bcard_id%7D%7D/static/%7B%7Bprefix%7D%7D/move_up?a=blobdiff_plain;f=calories.py;h=23234b2e0924718dfbca7edb3f725ac3e79039c5;hb=0e3baa007880c4c6c27899df85f9ff21626f7c36;hp=5ab57044eb3bd7333f7764ab62938d071473e72b;hpb=d590f1c7a00fad8ac34336ca3751b66335b5055e;p=misc
diff --git a/calories.py b/calories.py
index 5ab5704..23234b2 100644
--- a/calories.py
+++ b/calories.py
@@ -29,7 +29,7 @@ td, th {
|
- |
+ |
|
@@ -62,7 +62,7 @@ for (let i = 0; i < unit_count_inputs.length; i++) {
button.innerHTML = '+1';
button.onclick = function(event) {
event.preventDefault();
- input.value = parseInt(input.value) + 1;
+ input.value = parseFloat(input.value) + 1.0;
};
input.insertAdjacentElement('afterend', button);
}
@@ -253,7 +253,7 @@ class MyServer(BaseHTTPRequestHandler):
if c.unit_count > 0:
db.eatables[c.eatable_key].popularity += 1
db.consumptions = []
- default_slots = 7
+ default_slots = 10
for k, v in sorted(db.eatables.items(), key=lambda item: -item[1].popularity):
db.add_consumption(Consumption(k, 0))
default_slots -= 1
@@ -293,7 +293,7 @@ class MyServer(BaseHTTPRequestHandler):
consumptions += "
"\
""\
" | "\
- " | "\
+ " | "\
" | "\
"%.1f | "\
"%.1f | "\