star path error fix

This commit is contained in:
Kara Hoagland 2022-11-14 18:07:33 -08:00
parent b6f3a57231
commit bc276dc30c
4 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,7 @@ class ReviewCard extends HTMLElement {
ratingDiv.setAttribute("class", "rating"); ratingDiv.setAttribute("class", "rating");
let starsImg = document.createElement("img"); let starsImg = document.createElement("img");
starsImg.setAttribute("id", "a-rating"); starsImg.setAttribute("id", "a-rating");
starsImg.setAttribute("src", "./source/assets/images/icons/"+data["rating"]+"-star.svg"); starsImg.setAttribute("src", "./assets/images/icons/"+data["rating"]+"-star.svg");
starsImg.setAttribute("alt", data["rating"] +" stars"); starsImg.setAttribute("alt", data["rating"] +" stars");
starsImg.setAttribute("num", data["rating"]); starsImg.setAttribute("num", data["rating"]);
ratingDiv.append(starsImg); ratingDiv.append(starsImg);

View File

@ -66,7 +66,6 @@ function setupUpdate(){
tagContainer.append(newTag); tagContainer.append(newTag);
} }
} }
//Take formdata values as newData when submit //Take formdata values as newData when submit
form.addEventListener("submit", function(){ form.addEventListener("submit", function(){
/* /*

View File

@ -33,6 +33,7 @@ function addReviewsToDocument(reviews) {
*/ */
function initFormHandler() { function initFormHandler() {
/*
//btn to create form (could be its own function?) //btn to create form (could be its own function?)
let createBtn = document.getElementById("create"); let createBtn = document.getElementById("create");
createBtn.addEventListener("click", function(){ createBtn.addEventListener("click", function(){
@ -41,7 +42,7 @@ function initFormHandler() {
//accessing form components //accessing form components
let tagContainer = document.getElementById("tag-container-form"); let tagContainer = document.getElementById("tag-container-form");
let form = document.querySelector("form"); let form = document.querySelector("form");*/
form.addEventListener("submit", function(){ form.addEventListener("submit", function(){
/* /*

View File

@ -22,7 +22,7 @@
<main> <main>
<!-- Add Food Entries Here --> <!-- Add Food Entries Here -->
</main> </main>
<button type="button" id="create">CREATE</button> <!--<button type="button" id="create">CREATE</button>-->
<!----> <form id="new-food-entry"> <!----> <form id="new-food-entry">
<fieldset> <fieldset>
<legend>Pic:</legend> <legend>Pic:</legend>