mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-27 09:29:10 +00:00
interacting with description from user
This commit is contained in:
parent
f7b62ba59b
commit
cbc00af073
@ -25,9 +25,6 @@
|
|||||||
<form id="new-food-entry">
|
<form id="new-food-entry">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Photo:</legend>
|
<legend>Photo:</legend>
|
||||||
<label>Your Image
|
|
||||||
<input type="file" name="reviewImg" accept="image/png, image/gif, image/jpeg" />
|
|
||||||
</label>
|
|
||||||
<label for="image-src">
|
<label for="image-src">
|
||||||
Source:
|
Source:
|
||||||
<input type="text" id="imgSrc" name="imgSrc">
|
<input type="text" id="imgSrc" name="imgSrc">
|
||||||
|
@ -100,6 +100,7 @@ class ReviewCard extends HTMLElement {
|
|||||||
* "imgSrc": "string",
|
* "imgSrc": "string",
|
||||||
* "imgAlt": "string",
|
* "imgAlt": "string",
|
||||||
* "mealName": "string",
|
* "mealName": "string",
|
||||||
|
* "comments": "string",
|
||||||
* "restaurant": "string",
|
* "restaurant": "string",
|
||||||
* "rating": number
|
* "rating": number
|
||||||
* "tags": string array
|
* "tags": string array
|
||||||
@ -136,6 +137,7 @@ class ReviewCard extends HTMLElement {
|
|||||||
"imgAlt": data['imgAlt'],
|
"imgAlt": data['imgAlt'],
|
||||||
"mealName": data['mealName'],
|
"mealName": data['mealName'],
|
||||||
"restaurant": data['restaurant'],
|
"restaurant": data['restaurant'],
|
||||||
|
"comments": data['comments'],
|
||||||
"rating": data['rating'],
|
"rating": data['rating'],
|
||||||
"tags": data['tags']
|
"tags": data['tags']
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,7 @@ function init() {
|
|||||||
let main = document.querySelector('main');
|
let main = document.querySelector('main');
|
||||||
|
|
||||||
main.innerHTML = result
|
main.innerHTML = result
|
||||||
|
let p = document.createElement('p')
|
||||||
|
p.innerHTML = JSON.parse(result)['comments']
|
||||||
|
main.append(p)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user