-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprototype.html
More file actions
454 lines (399 loc) · 12.2 KB
/
prototype.html
File metadata and controls
454 lines (399 loc) · 12.2 KB
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<style>
#order-menu {
background: #fdfdfd;
overflow: hidden;
padding: 50px 0px 50px 0px;
color:#808080;
}
.order-true {
border: 10px solid #e90e84;
width: 145px;
height:145px;
}
.order-false {
width: 125px;
height:125px;
margin-top:10px;
margin-left:10px;
}
#order-topping {
height:100%;
width:100%;
/*float:left;*/
display:block;
}
#order-flooring {
float:left;
margin-bottom: 50px;
}
.design-standard {
float:bottom;
}
/*#order-flooring-list ul{
list-style: none outside none;
margin-right:10px;
padding: 5px;
text-align: center;
width: 355px;
float:left;
margin: 0 auto;
}*/
#order-flooring-list {
width: 85%;
margin: 0px auto;
}
#order-flooring-list li{
list-style: none outside none;
margin-right:10px;
padding: 5px;
text-align: center;
max-width: 355px;
float:left;
height: 300px;
}
#order-contact-list{
list-style: none outside none;
margin-right:10px;
padding: 5px;
text-align: center;
float:left;
margin: 0 auto;
}
#order-contact-list li{
list-style: none outside none;
margin-right:10px;
padding: 5px;
text-align: center;
float:left;
}
#order-topping-list li{
list-style: none outside none; margin:0;
padding: 0;
text-align: center;
float:top;
}
#order-icon-container {
padding: 5px;
border-radius: 4px;
box-shadow: 0px 1px 0px 2px #fafafa;
background: white;
}
#order-icon-text {
font-weight: bold;
text-align: right;
border-bottom: 2px solid #E90E84;;
font-variant: small-caps;
margin-bottom: 10px;
padding-bottom: 5px;
}
#order-icon-subtext {
color: #808080;
font-size: 0.8em;
text-align: justify;
float:bottom;
}
.bulletpic {
margin-bottom: 10px;
margin-right: 20px;
/*margin-left:20px;*/
border-radius: 50%;
/*margin-bottom: 20px;*/
position: relative;
/*-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;*/
float:left;
background:url('http://www.webalot.de/wp-content/uploads/2016/03/SEO2.png');
}
.bulletpic:hover {
border: 10px solid #808080;
width: 145px;
height:145px;
margin-bottom: 10px;
margin-right: 20px;
/*margin-left:20px;*/
border-radius: 50%;
/*margin-bottom: 20px;*/
position: relative;
-webkit-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
float:left;
}
.bullet-social {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/sociallink.png');
}
.bullet-simple {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/simple-1.png');
}
.bullet-custom {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/custom.png');
}
.bullet-seo {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/seo.png');
}
.bullet-analytics {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/analytics.png');
}
.bullet-multilang {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/multilangual.png');
}
.bullet-extras {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/extras-2.png');
}
.bullet-custcontact {
background:url('http://www.webalot.de/wp-content/uploads/2016/03/erweiterung.png');
}
.bullet-icons {
background: url('http://www.webalot.de/wp-content/uploads/2016/03/customicons.png');
}
.bullet-imagephotos {
background: url('http://www.webalot.de/wp-content/uploads/2016/03/imagephotos.png');
}
#order-cart {
margin: 0 auto;
margin-bottom: 50px;
width:80%;
}
#order-contact {
font-weight: bold;
text-align: right;
border-bottom: 2px solid #E90E84;
font-variant: small-caps;
margin-bottom: 10px;
padding-bottom: 5px;
width: 80%;
margin: 0 auto;
}
#order-form-send {
width: 60%;
margin: 0 auto;
}
#order-form {
width: 80%;
margin: 0px auto;
}
#order-form-text {
width: 80%;
margin: 0 auto;
text-align: justify;
}
.col-xs-12 {
width: 15%;
margin-top: 1em;
margin-left: 15%;
}
@media only screen and (max-width: 640px) {
#order-form {
margin: 0 auto;
}
#order-form-send {
margin: 0 auto;
}
#order-flooring-list {
max-width: 355px;
margin: 0 auto;
}
.col-xs-12 {
width: 33%;
margin-top: 1em;
margin-left: 15%;
#main-nav, #main-nav.fixed {
position:fixed;
}
#order-form-send {
}
}
}
</style>
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular.min.js"></script>
</head>
<div ng-app="myapp">
<div ng-controller="OrderCtrl">
<div id="order-menu">
<div id="order-topping">
<h2 class="dark-text" style="font-size:45px;padding:5px;">
Bestellformular
</h2>
<h2 class="dark-text" style="font-size:1.75em;padding:5px;">
Markieren Sie Features, die Sie gern bestellen würden.
</h2>
<ul id="order-flooring-list" data-scrollreveal="enter left after 0.15s over 1s">
<li ng-repeat="topping in toppings" >
<div style="height:155px;">
<div class="bulletpic bulletpic-{{topping.id}} order-{{topping.done}} bullet-{{topping.class}}" ng-model="topping.done" ng-click="setSelected(topping)">
</div>
</div>
<div id="order-icon-container">
<div id="order-icon-text">
{{topping.text}}
</div>
<div id="order-icon-subtext">
{{topping.subtext}}
</div>
</div>
</li>
</ul>
</div> <!--order-topping-->
</div> <!--order-menu-->
<div id="order-form">
<div id="order-form-send">
<h2 class="dark-text" style="font-size:30px;">Fertig?</h2>
<input name="orderform.name" ng-model="orderform.name" placeholder="Name" style="width: 80%; margin: 10px;padding:10px;border-radius:5px;border:1px solid lightgray"></br>
<input name="orderform.email" ng-model="orderform.email" placeholder="E-Mail" style="width: 80%; margin: 10px;padding:10px;border-radius:5px;border:1px solid lightgray"></br>
<input name="orderform.tel" ng-model="orderform.tel" placeholder="Telefon" style="width: 80%; margin: 10px;padding:10px;border-radius:5px;border:1px solid lightgray">
<div id="order-form-text">
<p>Bei einem Gespräch können wir Ihr Vorhaben konkretisieren.</p>
</div>
<div id="order-contact" ng-click="orderContact()"><a href="" style="display:block">Kostenloses Beratungsgespräch anfordern!</a>
</div>
<div id="order-cart">
<ul id="order-contact-list">
<li ng-repeat="cartitem in resultList" style="max-width:300px;float:right;">
<div id="order-icon-container" >
<div id="order-icon-text" style="font-size: 0.75em;">
{{cartitem}}
</div>
</div>
</li>
</ul>
<!--{{countOrder()}}€ {{remaining()}} of {{floorings.length}} remaining-->
</div> <!--order-cart-->
</div>
</div><!--order-form-->
</div> <!--orderCtrl-->
</div> <!--ng-app-->
</html>
<script>
var appname = angular.module('myapp', []);
appname.controller('OrderCtrl', ['$scope', '$http',
function($scope, $http) {
$scope.toppings = [
{id:'0', text:'Custom Design', subtext: 'Sie haben bereits eine genaue Vorstellung vom Design Ihrer Webseite? Wir erstellen einen Styleguide, der zu Ihrer Firma passt. So erhalten Sie Maßgeschneiderte Webseite.', done:false, price: 2500, cat: 'flooring', class: 'custom'},
{id:'1', text:'Analytics', subtext: 'Wir implementieren Trackingverfahren, damit Sie Wissen, wie sich Kunden auf Ihrer Webseite zurecht finden. Somit können Sie verfolgen, ob Ihre Ziele erfüllt werden.', done:false, price: 400, cat: 'topping', class: 'analytics'},
{id:'2', text:'Soziale Netzwerke', subtext: 'Wir helfen Ihnen eine ganzheitliche Strategie zu entwickeln und umzusetzen, um Ihre Kunden über soziale Netzwerke zu erreichen', done:false, price: 160, cat: 'topping', class: 'social'},
{id:'3', text:'SEO-Optimierung', subtext: 'Sie wollen besser über Suchmaschinen gefunden werden? Wir kümmern uns um die OnPage und OffPage SEO-Optimierung Ihrer Webseite.', done:false, price: 1600, cat: 'topping', class: 'seo'},
{id:'4', text:'Mehrsprachigkeit', subtext: 'Wir verfügen über ein Netzwerk aus professionellen Übersetzern. Alternativ liefern Sie die Übersetzungen und wir implementieren eine Mehrsprachigkeit auf Ihrer Webseite.', done:false, price: 160, cat: 'topping', class: 'multilang'},
{id:'5', text:'Eigene Formulare', subtext: 'Ihre Kunden sollen über unterschiedliche Formulare mit Ihnen Kommunizieren? Wir bieten ansprechende und moderne Formulare, die zu Ihrer Corparate Identity passen.', done:false, price: 160, cat: 'topping', class: 'custcontact'},
{id:'6', text:'Custom Icons', subtext: 'Sie möchten eine noch individuellere Präsenz? Wir designen Icons und Logos, damit Sie Kunden bereits über Ihr Design wiedererkennen.', done:false, price: 160, cat: 'topping', class: 'icons'},
{id:'7', text:'Image Photos', subtext: 'Photos machen eine Webseite so richtig schick. Wir haben bereits Erfahrungen mit Top-Fotografen.', done:false, price: 160, cat: 'topping', class: 'imagephotos'}];
$scope.setSelected = function(section) {
/*$scope.selected = section;*/
if(!section.done)
{
section.done = true;
$scope.addOrderItem(section);
}
else
{
section.done = false;
$scope.remOrderItem(section);
}
}
/* $scope.isSelected = function(section) {
return $scope.selected === section;
}*/
$scope.addOrderItem = function(gotSection) {
//$scope.ordered.push({id:gotSection.id, text: gotSection.text, price: gotSection.price, done: true});
$scope.toppings[gotSection.id].done = true; // this is a real workaround for two pojo-lists
$scope.countOrder();
jQuery(function(){
var $button = jQuery(".bulletpic-"+gotSection.id ).clone();
jQuery(".bulletpic-"+gotSection.id ).html($button);
//jQuery($button).attr('class', 'newbullet');
//jQuery( ".bulletpic-"+gotSection.id ).click(function() {
// jQuery(".bulletpic-"+gotSection.id ).animate({
//left: 1000,
// bottom:2000
// }, {
// duration: 500
/*,
step: function( now, fx ){
jQuery( ".bulletpic:gt(0)" ).css( "left", now );
}*/
//});
//});
$button.remove();
});
}
$scope.remOrderItem = function(gotSection) {
angular.forEach($scope.toppings, function(ordereditem) {
if(ordereditem.id == gotSection.id) {
//whichlist.done = false;
$scope.countOrder();
}
});
}
$scope.countOrder = function() {
var count = 0;
angular.forEach($scope.toppings, function(topping) {
if(topping.done) {
count+=topping.price;
}
});
$scope.resultList = [];
var textToSend = "empty";
angular.forEach($scope.toppings, function(todo) {
if(todo.done == true)
{
$scope.resultList.push(todo.text);
}
});
if($scope.resultList.length == 0)
{
$scope.resultList.push("Kein Feature für das Beratungsgespräch gewählt");
}
return count;
}
$scope.remaining = function() {
var count = 0;
angular.forEach($scope.toppings, function(orderitem) {
count += orderitem.done ? 0 : 1;
});
return count;
};
$scope.orderform = {name: '',
email: '',
tel: ''};
$scope.set = function(new_title) {
this.widget.title = new_title;
}
$scope.orderContact= function() {
$scope.resultList = [];
var textToSend = "empty";
angular.forEach($scope.toppings, function(todo) {
if(todo.done == true)
{
$scope.resultList.push(todo.text);
}
});
var textToSend = "";
angular.forEach($scope.resultList, function(todo3) {
//textToSend += "text";
});
//alert($scope.resultList);
$scope.sendContactForm($scope.resultList);
};
$scope.sendContactForm = function(orderdata) {
$http({
method: 'POST',
url: '/wp-admin/admin-ajax.php',
params: {
action: 'sendordermail',
//email: $scope.orderform.email,
//tel: $scope.orderform.tel,
comment: ' ' +$scope.orderform.name + ' ' +$scope.orderform.email+ ' ' +$scope.orderform.tel +' '+ orderdata
}
}).success(function(data, status, headers, config) {
$scope.contactFormSent = true;
alert("Vielen Dank für Ihr Interesse! Wir melden uns bald bei Ihnen.");
}).error(function(data, status, headers, config) {
alert('error');
});
};
//initial point
$scope.countOrder();
}]);
</script>