Skip to content

Commit

Permalink
Added Randomizer for Pizza Toppings
Browse files Browse the repository at this point in the history
Added Randomizer for Pizza Toppings
  • Loading branch information
Abbby1007 authored Jul 13, 2024
1 parent 85b97b6 commit 73e376f
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@
<div id="gameArea">
<h1> Random Generators Website</h1>

<a href = "pickupLines.html"> <button id= "pickuplines"> Quriky Pickup lines </button> </a>
<div> <a href = "pickupLines.html"> <button id= "pickuplines"> Quriky Pickup lines </button> </a>

<a href="randomCatFacts.html" > <button id="catfacts"> Cat Facts </button> </a>

<a href="colorAnimation.html" > <button id=""> Random color and Animation </button> </a>

<a href="colorAnimation.html" > <button id="colorAndAnimation"> Random color and Animation </button> </a>
</div>
<div>
<a href="dadjokes.html"> <button id= "dadjokes"> Dad Jokes </button></a>

<a href="pizzaToppings.html" > <button id="pizzaToppings"> Random Pizza Toppings </button> </a>
</div>


Expand Down
27 changes: 27 additions & 0 deletions pizzaToppings.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Random Pizza Toppings</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>



<div id ="gameArea" >
<h1> Random Pizza Toppings</h1>
<div id="result"> __________________________ </div>
<button onclick="pizzaToppings()" id="generate" > Generate </button>
<div> <a href="index.html"> <button> Back to Select Screen</button></a> </div>
<a href = "https://www.recipetineats.com/pizza-toppings/"> <button> Source of the Pizza Toppings </button></a>

</div>

<script src="script.js"></script>
</body>

</html>
9 changes: 9 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,13 @@ function dadjokes(){
const display = document.getElementById('result');

display.textContent = `${computerChoice}`;
}

function pizzaToppings(){
const list = ["Pepperoni","Onions", "Ham", "Mushrooms" ,"Sausage" ,"Pineapple", "Supreme (Bacon, Onion, beef mince, capsicum(bell peppers), pepperoni, mushroom, andolive)", "Hawaiian (Ham and Pineapple)", "BBQ Meatlovers (pepperoni, bacon, cabanossi, beef mince, ham)", "Garlic Butter Prawns and Chilli (garlic butter prawns, capsicum, onion, chili, rocket)", "Sausage and Kale","Hot n’ spicy(spicy salami, capsicum, sliced jalapenos, onions, hot sauce)", "Aussie pizza (bacon, red onion, a whole egg cracked on)", "Caramelized onion, feta, beef mince", "Squid, chorizo, rocket","Spring pizza (zucchini, artichoke, asparagus, spinach, and pesto dolloped on just before serving)","Seafood pizza (precooked squid, mussels, clams, prawns etc)","BBQ chicken (BBQ sauce, shredded chicken, red onion, smoked paprika)"];
const computerChoice = list[Math.floor(Math.random() * list.length)];

const display = document.getElementById('result');

display.textContent = `${computerChoice}`;
}

0 comments on commit 73e376f

Please sign in to comment.