-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcupcake.html
293 lines (216 loc) · 8.18 KB
/
cupcake.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
<!doctype html>
<html>
<head>
<title> CupCake </title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Lato:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700,800,900" rel="stylesheet">
<style>
html,body{
font-family: Verdana, sans-serif;
}
.bg{
background-image: url("img/pink.jpg");
/* Full height */
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.recipe{
flex: flex;
width: 900px;
height:1100px;
border-radius:20px;
margin-left: auto;
margin-right: auto;
padding: 40px;
margin-bottom:20px;
background-color: #ffffff;
}
.im{
float:left;
}
.image{
border: 1px solid brown;
border-radius:20px;
}
.ingrident{
width:380px;
height:380px;
border: 1px solid brown;
border-radius:20px;
float:right;
padding: 20px;
font-size: 16px;
}
.time{
width:800px;
height:60px;
border: 1px solid brown;
padding: 20px;
font-size: 16px;
border-radius:20px;
float:left;
margin:20px;
text-align: center;
}
.preparation{
padding:20px;
text-align:justify;
float:left;
font-size: 16px;
border-radius:20px;
width:800px;
height:340px;
border: 1px solid brown;
}
li{
font-size: 17px;
}
.r {
float: left;
position: absolute;
bottom: -500px;
}
</style>
<link rel="stylesheet" href="rate.css">
</head>
<body class="bg">
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Sweets Recipes</a>
</div>
<ul class="nav navbar-nav">
<li ><a href="index.html">Home</a></li>
<li class="active"><a href="Recipes.html" >Recipes</a></li>
<li><a href="about.html">About Us</a></li>
<li ><a href="contact.html">Contact Us</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="signup.html"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="login.html"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
<div class="recipe">
<div class="im">
<a href="#"><img class="image" src="img/ccup.jpg" alt="Gingerbread Pear Muffins" title="Gingerbread Pear Muffins" width="380" height="380"/></a>
</div>
<div class="ingrident">
<h3 style="color:brown;">Ingredients</h3>
110g softened butter</br>
110g golden caster sugar</br>
2 large eggs</br>
½ tsp vanilla extract</br>
110g self-raising flour</br>
150g softened butter</br>
300g icing sugar</br>
1 tsp vanilla extract</br>
3 tbsp milk</br>
food colouring paste of your choice (optional)</br>
</div>
</br>
<div class="time">
Prep:20min Cook:15min Serves: 12
</div>
<br/>
<div class="preparation">
<h3 style="color:brown;">Preparation</h3>
Heat oven to 180C/160C fan/gas 4 and fill a 12 cupcake tray with cases.
Using an electric whisk beat the butter and sugar together until pale and fluffy then whisk in the eggs one at a time,
scraping down the sides of the bowl after each addition. Add the vanilla, flour and a pinch of salt, whisk until just
combined then spoon the mixture into the cupcake cases.Bake for 15 mins until golden brown and a skewer inserted into
the middle of each cake comes out clean. Leave to cool completely on a wire rack.
For the buttercream, whisk the butter until super soft then add the icing sugar,
vanilla extract and a pinch of salt. Whisk together until smooth (start off slowly to avoid an icing sugar cloud) then beat in the milk.
If wanting to colour, stir in the food colouring now. Spoon or pipe onto the cooled cupcakes.
</div>
<div class="r">
Rate this Recipe:<br>
<section class='rating-widget'>
<!-- Rating Stars Box -->
<div class='rating-stars text-center'>
<ul id='stars'>
<li class='star' title='Poor' data-value='1'>
<i class='fa fa-star fa-fw'></i>
</li>
<li class='star' title='Fair' data-value='2'>
<i class='fa fa-star fa-fw'></i>
</li>
<li class='star' title='Good' data-value='3'>
<i class='fa fa-star fa-fw'></i>
</li>
<li class='star' title='Excellent' data-value='4'>
<i class='fa fa-star fa-fw'></i>
</li>
<li class='star' title='WOW!!!' data-value='5'>
<i class='fa fa-star fa-fw'></i>
</li>
</ul>
</div>
<div class='success-box'>
<div class='clearfix'></div>
<img alt='tick image' width='32' src='data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tI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div class='clearfix'></div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
/* 1. Visualizing things on Hover - See next part for action on click */
$('#stars li').on('mouseover', function(){
var onStar = parseInt($(this).data('value'), 10); // The star currently mouse on
// Now highlight all the stars that's not after the current hovered star
$(this).parent().children('li.star').each(function(e){
if (e < onStar) {
$(this).addClass('hover');
}
else {
$(this).removeClass('hover');
}
});
}).on('mouseout', function(){
$(this).parent().children('li.star').each(function(e){
$(this).removeClass('hover');
});
});
/* 2. Action to perform on click */
$('#stars li').on('click', function(){
var onStar = parseInt($(this).data('value'), 10); // The star currently selected
var stars = $(this).parent().children('li.star');
for (i = 0; i < stars.length; i++) {
$(stars[i]).removeClass('selected');
}
for (i = 0; i < onStar; i++) {
$(stars[i]).addClass('selected');
}
// JUST RESPONSE (Not needed)
var ratingValue = parseInt($('#stars li.selected').last().data('value'), 10);
var msg = "";
if (ratingValue > 1) {
msg = "Thanks! You rated this " + ratingValue + " stars.";
}
else {
msg = "We will improve ourselves. You rated this " + ratingValue + " stars.";
}
responseMessage(msg);
});
});
function responseMessage(msg) {
$('.success-box').fadeIn(200);
$('.success-box div.text-message').html("<span>" + msg + "</span>");
}
</script>
</body>
</html>