Skip to content

Commit 39e9f08

Browse files
committed
modify css to make app more visually appealing
1 parent 1d907d4 commit 39e9f08

6 files changed

Lines changed: 25 additions & 5 deletions

File tree

public/index.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ body.dark-mode .slider:before {
6565

6666

6767
.parent-container {
68-
height: 200vh;
68+
height: 100vh;
6969
width: 500px;
7070
border: red 1px solid;
7171
display: flex;
@@ -114,7 +114,7 @@ body.dark-mode .slider:before {
114114
position: absolute;
115115
top: 50%;
116116
left: 50%;
117-
transform: translate(-50%, -100%);
117+
transform: translate(-50%, -50%);
118118
margin: 0 auto;
119119
}
120120

@@ -614,6 +614,7 @@ input:checked+.slider:before {
614614
border: black 3px solid;
615615
border-top-left-radius: 5px;
616616
border-top-right-radius: 5px;
617+
617618
}
618619

619620
.change .navigation {
@@ -631,6 +632,8 @@ input:checked+.slider:before {
631632
justify-content: center;
632633
align-items: center;
633634
margin: 0 auto;
635+
/* transform: rotateZ(-15deg); */
636+
transition: all 1s;
634637
}
635638

636639
.nav-items {

public/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
<input type="checkbox" class="dark-light-button" />
4545
<span class="slider round"></span>
4646
</label>
47+
<div class="non-picture-section">
4748

49+
4850
<h1 aria-label="app text" class="headline">
4951
Unsure What to Cook? Let Recipe for Success Inspire Your Next Meal!
5052

@@ -113,6 +115,7 @@ <h1 aria-label="app text" class="headline">
113115
Random
114116
</button>
115117
</section>
118+
</div>
116119

117120
<!-- <label for="user-email">Enter you email address</label> -->
118121

public/index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ import {
4848
previousPage,
4949
sendToUserInbox,
5050
wrapper,
51+
non_picture_section
5152
} from "./js_utilities/query_selector.js";
5253

5354
let currentCameraIndex = 0;
5455
const switchCameraButton = document.getElementById("switchCamera");
5556
let emailObject;
5657

58+
console.log(non_picture_section)
59+
5760
wantToTakeAPicture.addEventListener("click", () => {
5861
removeElements([pictureSectionHeadline, wantToTakeAPicture]);
5962
displayElementsFlex([videoBtnCanvas]);
@@ -155,7 +158,10 @@ recipeButtons.forEach((button) => {
155158
console.log(userText.value);
156159
button.addEventListener("click", async () => {
157160
displayElements([loadingContainer]);
158-
removeElements([mainElement]);
161+
// removeElements([headline, allergies, ...recipeButtons]);
162+
// removeElements([non_picture_section]);
163+
removeElements([mainElement])
164+
159165
const userRecipe = createUserRecipe(button, dietaryRequirements, userText);
160166
console.log(userRecipe);
161167

@@ -166,10 +172,12 @@ recipeButtons.forEach((button) => {
166172
eventSource.onmessage = async function (event) {
167173
let eventData = JSON.parse(event.data);
168174
if (eventData.message) {
175+
169176
if (eventData.message === "stop") {
170177
eventSource.close();
171178
return;
172179
}
180+
// removeElements([headline, allergies, ...recipeButtons]);
173181
displayElements([gptResponseElement]);
174182
gptResponseElement.textContent += eventData.message;
175183
return;
@@ -193,6 +201,7 @@ recipeButtons.forEach((button) => {
193201
console.log("data.image", eventData.image);
194202

195203
if (data.audio && data.image) {
204+
196205
createImage(data);
197206

198207
const { speedBtn, speechBtns } = createTextToSpeech(data);
@@ -231,6 +240,9 @@ recipeButtons.forEach((button) => {
231240
function createImage(param) {
232241
removeElements([loadingContainer]);
233242
const imageUrl = param.image.data[0].url;
243+
backgroundImg.style.backgroundSize = "cover";
244+
245+
234246
backgroundImg.src = imageUrl;
235247
return backgroundImg;
236248
}

public/js_utilities/query_selector.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const dietaryRequirements = Array.from(
3838
const otherDietaryRequirements = document.querySelector(
3939
"#other-dietary-requirements"
4040
);
41+
const non_picture_section = document.querySelector(".non-picture-section")
4142
const userText = document.querySelector("#user-text");
4243
const constraint = {
4344
audio: false,
@@ -87,7 +88,8 @@ export {
8788
previousPage,
8889
sendToUserInbox,
8990
emailUserRecipeSection,
90-
wrapper
91+
wrapper,
92+
non_picture_section
9193
};
9294

9395

public/url_folder.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-ZDEHIyYgxZXddehWZlOH32YF.png?st=2024-08-04T13%3A59%3A15Z&se=2024-08-04T15%3A59%3A15Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-08-03T23%3A15%3A03Z&ske=2024-08-04T23%3A15%3A03Z&sks=b&skv=2023-11-03&sig=jH%2BPKxVQeeEi6/oD%2Bwa6IArvHeVfTMYbUSxM1ZH2A3Y%3D
1+
https://oaidalleapiprodscus.blob.core.windows.net/private/org-nYbqgo3O0LNnYYAoKAmApBfx/user-58Je7efi0iy880e2UYCdYpBm/img-6czcfIXCtLDVdFppthCKO8RC.png?st=2024-08-05T14%3A21%3A04Z&se=2024-08-05T16%3A21%3A04Z&sp=r&sv=2023-11-03&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2024-08-04T19%3A39%3A37Z&ske=2024-08-05T19%3A39%3A37Z&sks=b&skv=2023-11-03&sig=yUad5ESQqpw%2BNTr2XDH5athOTZhGSxV/v6ETPwcfD74%3D

speech.mp3

108 KB
Binary file not shown.

0 commit comments

Comments
 (0)