interacting with description from user

This commit is contained in:
Gavyn Ezell 2022-11-12 10:33:30 -08:00
parent f7b62ba59b
commit cbc00af073
3 changed files with 5 additions and 3 deletions

View File

@ -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">

View File

@ -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']
}

View File

@ -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)
}