Sei sulla pagina 1di 5

<!

DOCTYPE html>
<!-- Tiffany Marie Foster
Mobile Version March 2016
Submitted for Credit for Web Programming I -->
<!--References: http://www.responsivegridsystem.com for the idea of columns for the
responsive change from mobile to desktop-->

<html>
<head>
<!-- For this to work on mobile, need initial scaling of 1.0 -->
<meta name="viewport" content="width-device-width, initial-scale=1.0">

<link rel="stylesheet" type="text/css" href="responsivesytlesheet.css">


<title>Stephan's Sugar Shack </title>
<!--JavaScript for Ordering your Favorite Flavor-->
<script type = "text/javascript">
function icecream(firstname,lastname, phone, flavor, size, quantity, wafflecones, sugarcones)
{
this.icecreamFirstname=firstname;
this.icecreamLastname=lastname;
this.icecreamPhone=phone;
this.icecreamFlavor=flavor;
this.icecreamSize=size;
this.icecreamQuantity=quantity;
this.icecreamWafflescones=wafflecones;
this.icecreamSugarcones=sugarcones;
}

function make_a_order()
{
var firstname= prompt("Please type in your first name.");
var lastname= prompt("Please type in your last name.");
var phone= prompt("Please type in your phone number in the format 0123456789 with no
spaces. We will use your phone number to call you when your order is ready to be picked up.");
var flavor= prompt("What flavor you would like to order?");
var size = prompt("Please type in the size from the options of pint, quart or gallon.");
var quantity = prompt("Please type in the number you would like to order.");
var wafflecones= prompt("Please type in the number of waffle cones you would like to
order.");
var wc= parseInt(wafflecones);
var sugarcones= prompt("Please type in the number of sugar cones you would like to order.");
var sc= parseInt(sugarcones);

//User selects pint as ice cream size and then the icecream subtotal is determined by number
purchase times $5 each. Additionally,the total is determined by adding in the number of waffle
cones purchased at $2 each and sugar cones at $3 each. //

if(size =="pint")
{
icecreamtotal= quantity*5;
total = icecreamtotal + (wc*2)+(sc*3);
}

//User selects quare as ice cream size and then the icecream subtotal is determined by number
purchase times $10 each. Additionally,the total is determined by adding in the number of waffle
cones purchased at $2 each and sugar cones at $3 each. //

else if(size=="quart")
{
icecreamtotal = quantity*10;
total = icecreamtotal + (wc*2)+(sc*3);
}

//User selects gallon as ice cream size and then the icecream subtotal is determined by number
purchase times $25 each. Additionally,the total is determined by adding in the number of waffle
cones purchased at $2 each and sugar cones at $3 each. //

else if(size=="gallon")
{
icecreamtotal = quantity*25;
total = icecreamtotal + (wc*2)+(sc*3);
}

conetotal=(wc*2)+(sc*3);

var myIceCream= new icecream(firstname, lastname, phone,flavor, size, quantity,


wafflecones,sugarcones);
alert("Thank you, " +firstname+ ", for your order! \n \n Below you will find your order summary.
\n \n Flavor: " +flavor+ "\n Size: " +size+ "\n Quantity: " +quantity+ "\n Ice Cream Subtotal Total:
$ " +icecreamtotal+ "\n \n Number of Waffle Cones: " +wafflecones+ "\n Number of Sugar
Cones: " +sugarcones+ "\n Cone Subtotal Total: $" +conetotal+ "\n ----------------\n Order Total: $"
+total+ "\n \n A member of our staff will be contacting you when your order is ready to be picked
up.");
}
</script>

</head>
<!--Logo for Mobile Version-->
<div id="stephanslogo">
<div class="logomobile">

<a href="stephanssugarshackresponsivefinal.html">
<img src="logo.png" alt="Stephans Sugar Shack A Taste of Summer Luray Virginia">
</a>
</div>
</div>

<!-- Banner with 2 columns to no columns set up-->


<div class="banner groupn">

<!-- Stephan's Sugar Shack Logo with link to home included-->


<div class="coln span_1n_of_2n">
<a href="stephanssugarshackresponsivefinal.html">
<img src="logo.png" alt="Stephans Sugar Shack A Taste of Summer Luray Virginia">
</a>
</div>

<!-- Image of Dippin Dots showing to the side-->


<div class="coln span_1n_of_2n">
<img src="dippindots10.jpg" alt="dippindots">
</div>
</div>

<!--Navigation for Desktop-->


<div class="nav">
<ul>
<li><a href="stephanssugarshackresponsivefinal.html">Home</a></li>
<li><a href="dippindotsresponsive.html">Dippin Dots</a></li>
<li><a href="hersheysresponsive.html">Hershey's</a></li>
<li><a href="contactusresponsive.html">Contact Us</a></li>
</ul>
</div>

<div id="container">
<!-- Each image is 350px by 233px -->
<div class="photobanner">
<img class="first" src="icecream2.jpg" alt="" />
<img src="cookies.jpg" alt="" />
<img src="dippindot1.jpg" alt="" />
<img src="icecream1.jpg" alt="" />
<img src="Stephanandgirls.jpg" alt="" />
<img src="icecream2.jpg" alt="" />
<img src="dippindot2.jpg" alt="" />
<img src="privatebeach.jpg" alt="" />
<img src="icecream2.jpg" alt="" />
<img src="cookies.jpg" alt="" />
<img src="dippindot1.jpg" alt="" />
<img src="icecream1.jpg" alt="" />
<img src="Stephanandgirls.jpg" alt="" />
</div>
</div>

<!--Welcome to Site Mobile-->


<div id="welcome"><strong>Welcome to Stephan's Sugar Shack - A Taste of Summer! We
hope you stop by and enjoy our selection of over 30 hand dipped icecream, ice, sherbet, and
Dippin Dots. </strong> </div>

<!--Section Description-->
<div id="icecreamselection"> Our Selection</div>
<!--Set up the flexible three column structure for the options-->

<div class="section group">

<!--DippinDots Option-->

<div class="col span_1_of_3">


<a target="_blank" href="dippindotsresponsive.html">
<img src="DippinDotsLogo.jpg" alt="">
</a>
</div>

<!--Hersheys Option-->
<div class="col span_1_of_3">
<a target="_blank" href="hersheysresponsive.html">
<img src="hersheysoption.gif" alt="">
</a>
<h2>Do you have a favorite flavor of Hershey's Ice Cream that you would like to order in
bulk? Order online and pick up in store!
</h2>

<!--Button to Order Bulk of a Single Flavor-->


<center><button onclick="make_a_order()">Click Here to Order a Single Flavor in Bulk</
button></center>

</div>

<!--Contact Us Option-->
<div class="col span_1_of_3">
<h1> About Us </h1>
<h2> We are located in the beautiful Blue Ridge Mountains of Page County, Virginia at 40
East Main Street, Luray, VA 22835.
<br>
<br>
<center>Store Hours</center>
<br>
<br>
Sunday 11am to 9pm
<br>
<br>
Monday through Thursday 2pm to 9pm
<br>
<br>
Friday through Saturday 11am to 11pm
</h2>
<a target="_blank" href="contactusresponsive.html">
<img src="contactus.jpeg" alt="">
</a>
</div>
</div>

<div id="footer">
<ul>
<li>40 E Main Luray, VA (540)743-4777</li>
</ul>
</div>
</html>

Potrebbero piacerti anche