-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marias-Pizza-bot #153
Open
Maryyy-ux
wants to merge
3
commits into
Technigo:main
Choose a base branch
from
Maryyy-ux:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Marias-Pizza-bot #153
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
# Project Name | ||
|
||
Replace this readme with your own information about your project. Start by briefly describing the assignment in a sentence or two. Keep it short and to the point. | ||
|
||
The assignment was to create a site with JavaScript (my first approach to JavaScript on the boot camp) to include a bot on the page. The main goal of the site is the introduction to JavaScript, not the layout. it's a basic site! | ||
|
||
## The problem | ||
|
||
Describe how you approached to problem, and what tools and techniques you used to solve it. How did you plan? What technologies did you use? If you had more time, what would be next? | ||
Although I am on my Software engineers first course so I don't have had JavaScript yet, I have had Java course as well as C+- language course (different but with variables, strings, arrays, etc) so I have a little background on this coding problems. | ||
|
||
If I will have had a little more time I would like to create a properly layouted bot (in a box, with the colors and the images, etc) as well as a fully web page (with all the menus and options). | ||
|
||
## View it live | ||
|
||
Have you deployed your project somewhere? Be sure to include the link to the deployed project so that the viewer can click around and see what it's all about | ||
I have deployed the project on Netlify: https://66dde3fcd116e57b6d1fefd1--merry-gecko-a9c5af.netlify.app/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Maria's Pizzeria</title> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
rel="stylesheet" /> | ||
|
||
</head> | ||
|
||
|
||
|
||
<body> | ||
<header> | ||
<div class="logo">Maria's Pizza</div> | ||
<nav class="nav-links" id="nav-links"> | ||
<ul> | ||
<li><a href="#">Home</a></li> | ||
<li><a href="#">Services</a></li> | ||
<li><a href="#">About us</a></li> | ||
<li><a href="#">Contact</a></li> | ||
</ul> | ||
</nav> | ||
<div class="hamburger" id="hamburger"> | ||
☰ <!-- Icono de hamburguesa --> | ||
</div> | ||
|
||
</header> | ||
|
||
|
||
<div class="video-container"> | ||
<video autoplay muted loop id="background-video"> | ||
<source src="7172270-uhd_3840_2160_25fps.mp4" type="video/mp4"> | ||
</video> | ||
<div class="overlay-text"> | ||
<h1>Maria's Pizza</h1> | ||
<p>Logic is executed automatically.</p> | ||
<script src="./script.js"></script> | ||
<link rel="<script src=" switch.js"> | ||
</script> | ||
</div> | ||
</div> | ||
|
||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
|
||
// Step 1 - Welcome and introduction | ||
alert(`Welcome to Maria's Pizza. Ready to Start? - Click 'OK' to begin.`); | ||
|
||
var userName = prompt("What's your name?"); | ||
alert("Hi, " + userName + "!"); | ||
|
||
// Step 2 - Food choice | ||
var foodChoice = prompt( | ||
"Please select a food type by entering the corresponding number:\n1. Pizza\n2. Pasta\n3. Salad" | ||
); | ||
|
||
var foodType; | ||
|
||
if (foodChoice == "1") { | ||
foodType = "Pizza"; | ||
alert("You have selected Pizza."); | ||
} else if (foodChoice == "2") { | ||
foodType = "Pasta"; | ||
alert("You have selected Pasta."); | ||
} else if (foodChoice == "3") { | ||
foodType = "Salad"; | ||
alert("You have selected Salad."); | ||
} else { | ||
alert("Invalid choice. Please refresh and try again."); | ||
} | ||
|
||
// Step 3 - Subtype choice | ||
var subtypeChoice; | ||
var subtype; | ||
|
||
if (foodType == "Pizza") { | ||
subtypeChoice = prompt( | ||
"Please select a type of Pizza:\n1. Margherita\n2. Pepperoni\n3. Hawaiian" | ||
); | ||
if (subtypeChoice == "1") { | ||
subtype = "Margherita Pizza"; | ||
} else if (subtypeChoice == "2") { | ||
subtype = "Pepperoni Pizza"; | ||
} else if (subtypeChoice == "3") { | ||
subtype = "Hawaiian Pizza"; | ||
} else { | ||
alert("Invalid choice. Please refresh and try again."); | ||
} | ||
} else if (foodType == "Pasta") { | ||
subtypeChoice = prompt( | ||
"Please select a type of Pasta:\n1. Spaghetti Bolognese\n2. Fettuccine Alfredo\n3. Penne Arrabiata" | ||
); | ||
if (subtypeChoice == "1") { | ||
subtype = "Spaghetti Bolognese"; | ||
} else if (subtypeChoice == "2") { | ||
subtype = "Fettuccine Alfredo"; | ||
} else if (subtypeChoice == "3") { | ||
subtype = "Penne Arrabiata"; | ||
} else { | ||
alert("Invalid choice. Please refresh and try again."); | ||
} | ||
} else if (foodType == "Salad") { | ||
subtypeChoice = prompt( | ||
"Please select a type of Salad:\n1. Caesar Salad\n2. Greek Salad\n3. Garden Salad" | ||
); | ||
if (subtypeChoice == "1") { | ||
subtype = "Caesar Salad"; | ||
} else if (subtypeChoice == "2") { | ||
subtype = "Greek Salad"; | ||
} else if (subtypeChoice == "3") { | ||
subtype = "Garden Salad"; | ||
} else { | ||
alert("Invalid choice. Please refresh and try again."); | ||
} | ||
} | ||
|
||
// Step 4 - Age | ||
var ageGroup = prompt( | ||
"Is the meal intended for a child or an adult?\nPlease enter 'child' or 'adult'." | ||
); | ||
|
||
var cost; | ||
if (ageGroup.toLowerCase() == "child") { | ||
cost = "$5.99"; | ||
} else if (ageGroup.toLowerCase() == "adult") { | ||
cost = "$9.99"; | ||
} else { | ||
alert("Invalid choice. Please refresh and try again."); | ||
} | ||
|
||
var orderMessage = | ||
"You have ordered a " + | ||
subtype + | ||
" for a " + | ||
ageGroup + | ||
". The total cost is " + | ||
cost + | ||
"."; | ||
alert(orderMessage); | ||
|
||
// Step 5 - Order confirmation | ||
var confirmation = prompt( | ||
"Do you confirm your order? Please enter 'yes' or 'no'." | ||
); | ||
|
||
if (confirmation.toLowerCase() == "yes") { | ||
alert("Thank you, " + userName + "! Your meal will be prepared shortly."); | ||
} else if (confirmation.toLowerCase() == "no") { | ||
alert( | ||
"We're sorry to hear that. Feel free to order anytime. Have a great day!" | ||
); | ||
} else { | ||
alert("Invalid response. Please refresh and try again."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
* { | ||
box-sizing: border-box; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
body { | ||
font-family: "Montserrat", sans-serif; | ||
background: #0026ff; | ||
color: white; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} | ||
|
||
|
||
body, | ||
html { | ||
height: 100%; | ||
font-family: Arial, sans-serif; | ||
} | ||
|
||
header { | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 20px; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
color: white; | ||
z-index: 10; | ||
} | ||
|
||
.logo { | ||
font-size: 24px; | ||
font-weight: bold; | ||
} | ||
|
||
.nav-links { | ||
display: flex; | ||
} | ||
|
||
.nav-links ul { | ||
list-style: none; | ||
display: flex; | ||
gap: 20px; | ||
} | ||
|
||
.nav-links a { | ||
color: white; | ||
text-decoration: none; | ||
font-size: 18px; | ||
} | ||
|
||
.hamburger { | ||
display: none; | ||
font-size: 30px; | ||
cursor: pointer; | ||
} | ||
|
||
|
||
@media (max-width: 768px) { | ||
.nav-links { | ||
position: absolute; | ||
top: 80px; | ||
right: 0; | ||
width: 200px; | ||
background-color: rgba(0, 0, 0, 0.8); | ||
flex-direction: column; | ||
display: none; | ||
} | ||
|
||
.nav-links ul { | ||
flex-direction: column; | ||
padding: 20px 0; | ||
} | ||
|
||
.nav-links a { | ||
padding: 10px; | ||
text-align: center; | ||
} | ||
|
||
.hamburger { | ||
display: block; | ||
} | ||
} | ||
|
||
|
||
.video-container { | ||
position: relative; | ||
height: 100vh; | ||
width: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
#background-video { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
transform: translate(-50%, -50%); | ||
z-index: -1; | ||
} | ||
|
||
.overlay-text { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
text-align: center; | ||
color: white; | ||
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); | ||
} | ||
|
||
.overlay-text h1 { | ||
font-size: 4rem; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.overlay-text p { | ||
font-size: 1.5rem; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice! 😋