From 46b1ec4b07fbaf043c6c8a6c301e39565798fa9d Mon Sep 17 00:00:00 2001 From: rheabhutada02 <83424582+rheabhutada02@users.noreply.github.com> Date: Mon, 21 Nov 2022 13:52:44 -0800 Subject: [PATCH] fixed form formatting, moved it to its own file --- source/CreatePage.html | 92 +++++++------- source/ReviewDetails.html | 124 +++++++++---------- source/assets/scripts/ReviewCard.js | 17 ++- source/assets/scripts/ReviewDetails.js | 5 +- source/index.html | 3 +- source/static/CreatePage.css | 101 +--------------- source/static/ReviewDetails.css | 96 --------------- source/static/homepage.css | 12 ++ source/static/reset.css | 158 ------------------------- source/static/reviewForm.css | 142 ++++++++++++++++++++++ 10 files changed, 287 insertions(+), 463 deletions(-) delete mode 100644 source/static/reset.css create mode 100644 source/static/reviewForm.css diff --git a/source/CreatePage.html b/source/CreatePage.html index a55d561..220c50e 100644 --- a/source/CreatePage.html +++ b/source/CreatePage.html @@ -15,6 +15,7 @@ + @@ -28,62 +29,61 @@ -

New Entry

-
- Choose Input type: - - -
-
- Meal: - - -
-
-
- Rating: -
- - - - - -
+
+ PICTURE: + + +
+ +
+ MEAL NAME: + +
-
+
+ RESTAURANT NAME: + +
+ +
+ RATING: +
+
+ + + + + +
+
+
- - -
+
diff --git a/source/ReviewDetails.html b/source/ReviewDetails.html index 47de4d3..77bf6d3 100644 --- a/source/ReviewDetails.html +++ b/source/ReviewDetails.html @@ -6,17 +6,18 @@ Food Journal - - + + - - - - - + + + + + + -
+
logo

Food Journal

@@ -27,7 +28,7 @@

Salad (default name)

-

Salad Inc. (default name)

+

Salad Inc. (default name)

@@ -51,58 +52,61 @@ -
-
-
- Pic: - Choose Input type: - - -
-
- - Meal: - - -
- -
- Rating: - - - - - -
+
diff --git a/source/assets/scripts/ReviewCard.js b/source/assets/scripts/ReviewCard.js index 57e5b98..0279fef 100644 --- a/source/assets/scripts/ReviewCard.js +++ b/source/assets/scripts/ReviewCard.js @@ -80,7 +80,22 @@ class ReviewCard extends HTMLElement { time { color: #70757A; font-size: 12px; - } + } + + .tag-container { + display: flex; + flex-flow: row wrap; + } + + .tag { + background-color:#94da97; + border-radius: 7px; + color: #94da97; + padding-right: 7px; + padding-left: 7px; + margin: 3px; + font-weight: bold; + } `; articleEl.append(styleEl); shadowEl.append(articleEl); diff --git a/source/assets/scripts/ReviewDetails.js b/source/assets/scripts/ReviewDetails.js index 194ceaf..d957561 100644 --- a/source/assets/scripts/ReviewDetails.js +++ b/source/assets/scripts/ReviewDetails.js @@ -68,11 +68,12 @@ function setupUpdate(){ let currID = JSON.parse(sessionStorage.getItem("currID")); let currReview = getReviewFromStorage(currID); let form = document.getElementById("update-food-entry"); - let updateDiv = document.getElementById("update-form-div"); + let updateDiv = document.getElementById("update-form"); updateBtn.addEventListener("click", function(){ //update function - updateDiv.style.display = "block"; + updateDiv.classList.remove("hidden"); + let tagContainer = document.getElementById("tag-container-form"); //Set value of each input element to current's values diff --git a/source/index.html b/source/index.html index e1fadbb..9e3e116 100644 --- a/source/index.html +++ b/source/index.html @@ -31,8 +31,7 @@