kuhkal/kuhkal/templates/pages/calculate.html

25 lines
660 B
HTML

{% extends "layouts/base.html" %}
{% block content %}
<div x-data="{ results: {},
recipe_id: 1,
ammount:40,
async getResults() {
this.results = await (await fetch('https://solidarna.cyberdeck.xyz/calculate', {
method:'POST',
body: JSON.stringify({
recipe_id: this.recipe_id,
ammount: this.ammount
}),
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
})).json();
console.log(this.results);
}
} ">
{% include "includes/calculate_form.html" %}
{% include "includes/calculate_results.html" %}
</div>
{% endblock content %}