From 272ff382d798ba9c534e2ee94dee48bfd69716a5 Mon Sep 17 00:00:00 2001 From: horaleon1 Date: Mon, 1 Jul 2019 21:23:21 -0500 Subject: [PATCH 1/2] done 5 iterations --- starter-code/index.html | 545 ++++++++++++++++++++-------------------- starter-code/pizza.js | 60 +++++ 2 files changed, 338 insertions(+), 267 deletions(-) diff --git a/starter-code/index.html b/starter-code/index.html index 189a3311..1586868b 100755 --- a/starter-code/index.html +++ b/starter-code/index.html @@ -12,272 +12,283 @@

Pizza Builder

Build your own HTML and CSS pizza.

- - -
- -
- - - - - - - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
1
-
-
- -
-
2
-
-
- -
-
3
-
-
- -
-
4
-
-
- -
-
5
-
-
- -
-
6
-
-
- -
-
7
-
-
- -
-
8
-
-
- -
-
9
-
-
- -
-
10
-
-
- -
-
11
-
-
- -
-
12
-
-
- -
-
13
-
-
- -
-
14
-
-
- -
-
15
-
-
- -
-
16
-
-
- -
-
17
-
-
- -
-
18
-
-
- -
-
19
-
-
- -
-
20
-
-
- -
-
21
-
-
- -
-
22
-
-
- -
-
23
-
-
- -
-
24
-
-
- -
-
25
-
-
- -
-
26
-
-
- -
-
27
-
-
- -
-
28
-
-
- -
-
29
-
-
- -
-
30
-
-
- -
-
31
-
-
- -
-
31
-
-
- -
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
33
- -
-
-
-
-
- - - -

- +
+ + +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
1
+
+
+ +
+
2
+
+
+ +
+
3
+
+
+ +
+
4
+
+
+ +
+
5
+
+
+ +
+
6
+
+
+ +
+
7
+
+
+ +
+
8
+
+
+ +
+
9
+
+
+ +
+
10
+
+
+ +
+
11
+
+
+ +
+
12
+
+
+ +
+
13
+
+
+ +
+
14
+
+
+ +
+
15
+
+
+ +
+
16
+
+
+ +
+
17
+
+
+ +
+
18
+
+
+ +
+
19
+
+
+ +
+
20
+
+
+ +
+
21
+
+
+ +
+
22
+
+
+ +
+
23
+
+
+ +
+
24
+
+
+ +
+
25
+
+
+ +
+
26
+
+
+ +
+
27
+
+
+ +
+
28
+
+
+ +
+
29
+
+
+ +
+
30
+
+
+ +
+
31
+
+
+ +
+
31
+
+
+
+ +
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
33
+
+ +
+
+
+
+
+ + + +
+ + + +

+ + +
@@ -288,7 +299,7 @@

Your pizza's price

- + diff --git a/starter-code/pizza.js b/starter-code/pizza.js index b473d048..d7ba8ffd 100755 --- a/starter-code/pizza.js +++ b/starter-code/pizza.js @@ -1 +1,61 @@ // Write your Pizza Builder JavaScript in this file. + + + + + + +// Write your Pizza Builder JavaScript in this file. +var app1 = new Vue({ + el: '#app1', + data: { + pepperoni:false, + mushrooms:false, + greenPeppers:false, + whiteSauce:false, + glutenFree:false, + price:10, + }, + methods: { + showPepperonni:function(){ + this.pepperoni = !this.pepperoni + if (this.pepperoni){ + this.price++; + }else{ + this.price--; + } + }, + showMushrooms:function(){ + this.mushrooms = !this.mushrooms + if (this.mushrooms){ + this.price++; + }else{ + this.price--; + } + }, + showGreenPeppers:function(){ + this.greenPeppers = !this.greenPeppers + if (this.greenPeppers){ + this.price++; + }else{ + this.price--; + } + }, + showWhiteSauce:function(){ + this.whiteSauce = !this.whiteSauce + if (this.whiteSauce){ + this.price++; + }else{ + this.price--; + } + }, + showGlutenFree:function(){ + this.glutenFree = !this.glutenFree + if (this.glutenFree){ + this.price++; + }else{ + this.price--; + } + }, + } +}) \ No newline at end of file From 8cf16c582b9d802face685a0e0f6ac7758b93edc Mon Sep 17 00:00:00 2001 From: horaleon1 Date: Mon, 1 Jul 2019 21:28:34 -0500 Subject: [PATCH 2/2] refactoring, trash and format done --- starter-code/pizza.js | 86 +++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 52 deletions(-) diff --git a/starter-code/pizza.js b/starter-code/pizza.js index d7ba8ffd..33509472 100755 --- a/starter-code/pizza.js +++ b/starter-code/pizza.js @@ -1,61 +1,43 @@ -// Write your Pizza Builder JavaScript in this file. - - - - - - -// Write your Pizza Builder JavaScript in this file. var app1 = new Vue({ - el: '#app1', + el: "#app1", data: { - pepperoni:false, - mushrooms:false, - greenPeppers:false, - whiteSauce:false, - glutenFree:false, - price:10, + pepperoni: false, + mushrooms: false, + greenPeppers: false, + whiteSauce: false, + glutenFree: false, + price: 10 }, methods: { - showPepperonni:function(){ - this.pepperoni = !this.pepperoni - if (this.pepperoni){ - this.price++; - }else{ - this.price--; - } - }, - showMushrooms:function(){ - this.mushrooms = !this.mushrooms - if (this.mushrooms){ - this.price++; - }else{ - this.price--; - } + showPepperonni: function() { + this.pepperoni = !this.pepperoni; + + if (this.pepperoni) this.price++; + else this.price--; }, - showGreenPeppers:function(){ - this.greenPeppers = !this.greenPeppers - if (this.greenPeppers){ - this.price++; - }else{ - this.price--; - } + showMushrooms: function() { + this.mushrooms = !this.mushrooms; + + if (this.mushrooms) this.price++; + else this.price--; }, - showWhiteSauce:function(){ - this.whiteSauce = !this.whiteSauce - if (this.whiteSauce){ - this.price++; - }else{ - this.price--; - } + showGreenPeppers: function() { + this.greenPeppers = !this.greenPeppers; + + if (this.greenPeppers) this.price++; + else this.price--; }, - showGlutenFree:function(){ - this.glutenFree = !this.glutenFree - if (this.glutenFree){ - this.price++; - }else{ - this.price--; - } + showWhiteSauce: function() { + this.whiteSauce = !this.whiteSauce; + + if (this.whiteSauce) this.price++; + else this.price--; }, + showGlutenFree: function() { + this.glutenFree = !this.glutenFree; + + if (this.glutenFree) this.price++; + else this.price--; + } } -}) \ No newline at end of file +});