master
km0 2 years ago
parent db23a89bfd
commit 29129ed4d7

@ -3,13 +3,31 @@ export default {
setup() { setup() {
const { ref } = Vue; const { ref } = Vue;
const title = ref(""); const title = ref("SI18.5 - Diffractive Cookbook");
const description = ref(""); const description = ref("Compiling and sharing methods for diffractive reading.");
const nature = ref(""); const nature = ref("Methods");
const logs = ref([""]); const logs = ref([
const who = ref(""); "Do the assignment proposed by Femke",
"While doing the assignment, make sure to track your method with the help of the following form",
"This method will be used by others and applied on different resources",
]);
const who = ref("Grr, Kamo, Kimberley");
return { title, description, nature, logs, who }; const submit = function () {
fetch("http://127.0.0.1:5000/soupboat/coockbook/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
title: title.value,
description: description.value,
nature: nature.value,
logs: logs.value,
who: who.value,
}),
});
};
return { title, description, nature, logs, who, submit };
}, },
template: ` template: `
<section class='recipe'> <section class='recipe'>
@ -38,6 +56,10 @@ export default {
<label for="who">Who</label> <label for="who">Who</label>
<input type="text" v-model="who" /> <input type="text" v-model="who" />
</div> </div>
<div class="entry">
<button @click="submit" class="submit">Submit</button>
</div>
</section> </section>
<!-- <dl> <!-- <dl>

@ -1,5 +1,5 @@
from flask import Flask, jsonify, request, redirect, url_for from flask import Flask, jsonify, request, redirect, url_for
from flask_cors import CORS from flask_cors import CORS, cross_origin
import datetime import datetime
import frontmatter import frontmatter
from glob import glob from glob import glob
@ -93,4 +93,4 @@ def get():
# TODO: set another port and setup nginx # TODO: set another port and setup nginx
app.run(port=5000) app.run(port=3145)

Loading…
Cancel
Save