mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-26 17:09:09 +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">
|
||||
<fieldset>
|
||||
<legend>Photo:</legend>
|
||||
<label>Your Image
|
||||
<input type="file" name="reviewImg" accept="image/png, image/gif, image/jpeg" />
|
||||
</label>
|
||||
<label for="image-src">
|
||||
Source:
|
||||
<input type="text" id="imgSrc" name="imgSrc">
|
||||
|
@ -100,6 +100,7 @@ class ReviewCard extends HTMLElement {
|
||||
* "imgSrc": "string",
|
||||
* "imgAlt": "string",
|
||||
* "mealName": "string",
|
||||
* "comments": "string",
|
||||
* "restaurant": "string",
|
||||
* "rating": number
|
||||
* "tags": string array
|
||||
@ -136,6 +137,7 @@ class ReviewCard extends HTMLElement {
|
||||
"imgAlt": data['imgAlt'],
|
||||
"mealName": data['mealName'],
|
||||
"restaurant": data['restaurant'],
|
||||
"comments": data['comments'],
|
||||
"rating": data['rating'],
|
||||
"tags": data['tags']
|
||||
}
|
||||
|
@ -7,4 +7,7 @@ function init() {
|
||||
let main = document.querySelector('main');
|
||||
|
||||
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