Browse Source

setup contact.rb && comment google maps function

Anton Kovalenko 2 years ago
parent
commit
df9875f246
3 changed files with 42 additions and 41 deletions
  1. 6 5
      contact.rb
  2. 1 1
      public/index.html
  3. 35 35
      public/js/custom.js

+ 6 - 5
contact.rb View File

@@ -8,11 +8,12 @@ set :public_folder, 'public'
8 8
 
9 9
 class Contact < Sinatra::Base
10 10
   get '/' do
11
-    if Sinatra::Base.environment == :production
12
-      File.read(File.join('public', 'index-video.html'))
13
-    else
14
-      'This is not production'
15
-    end
11
+    File.read(File.join('public', 'index.html'))
12
+    # if Sinatra::Base.environment == :production
13
+    #   File.read(File.join('public', 'index.html'))
14
+    # else
15
+    #   'This is not production'
16
+    # end
16 17
   end
17 18
 
18 19
   run! if app_file == $0

+ 1 - 1
public/index.html View File

@@ -12,6 +12,7 @@
12 12
 
13 13
 	<!-- CSS Files -->
14 14
 	<link rel="stylesheet" href="css/reset.css" />
15
+  <link rel="stylesheet" href="css/lightbox.css" />
15 16
 	<link rel="stylesheet" href="css/animate.min.css" />
16 17
 	<link rel="stylesheet" href="css/grid.css" />
17 18
 	<link rel="stylesheet" href="css/base.css" />
@@ -21,7 +22,6 @@
21 22
 	<link rel="stylesheet" href="css/prettyPhoto.css" />
22 23
 	<link rel="stylesheet" href="css/player/YTPlayer.css" />
23 24
 	<link rel="stylesheet" href="css/media-queries.css" />
24
-  <link rel="stylesheet" href="css/lightbox.css" />
25 25
 
26 26
 	<!-- Color Options -->
27 27
 	<link id="color-options" rel="stylesheet" href="css/colors/green.css" />

+ 35 - 35
public/js/custom.js View File

@@ -1,4 +1,4 @@
1
- 
1
+
2 2
 /*-----------------------------------
3 3
  Quick Mobile Detection
4 4
  -----------------------------------*/
@@ -49,12 +49,12 @@ $(window).load(function() {
49 49
   $('.header-text').flexslider({
50 50
   animation: "slide",
51 51
 	selector: ".text-slider .text-slides",
52
-  slideshowSpeed: 5000,  
52
+  slideshowSpeed: 5000,
53 53
 	controlNav: false,
54 54
 	directionNav: false ,
55 55
 	direction: "vertical",
56 56
       start: function(slider){
57
-       $('body').removeClass('loader'); 
57
+       $('body').removeClass('loader');
58 58
       }
59 59
   });
60 60
  });
@@ -133,15 +133,15 @@ $(window).scroll(function() {
133 133
   "use strict";
134 134
   var currentPosition = $(this).scrollTop();
135 135
   links.removeClass('selected');
136
-  
136
+
137 137
   sections.each(function() {
138 138
       var top = $(this).offset().top - 75,
139 139
           bottom = top + $(this).height();
140
-      
140
+
141 141
       if (currentPosition >= top && currentPosition <= bottom) {
142 142
           $('a[href="#' + this.id + '"]').addClass('selected');
143 143
       }
144
-  }); 
144
+  });
145 145
 });
146 146
 
147 147
 /*-----------------------------------
@@ -179,8 +179,8 @@ $('.nav a').click(function () {
179 179
 /*-----------------------------------
180 180
 Slider for Testimonials
181 181
 -----------------------------------*/
182
-  
183
-$(window).load(function(){ 
182
+
183
+$(window).load(function(){
184 184
   "use strict";
185 185
   $('.container').flexslider({
186 186
   animation: "fade",
@@ -224,14 +224,14 @@ Isotope Portfolio
224 224
 
225 225
 $(window).load(function() {
226 226
   "use strict";
227
-        
227
+
228 228
   var $container = $('.portfolio-items');
229 229
 
230 230
   $container.isotope({
231
-    resizable: false, 
231
+    resizable: false,
232 232
     itemSelector : '.item'
233 233
   });
234
-        
234
+
235 235
   var $optionSets = $('#options .option-set'),
236 236
       $optionLinks = $optionSets.find('a');
237 237
 
@@ -259,7 +259,7 @@ $(window).load(function() {
259 259
 
260 260
   // Project Expander
261 261
   var loader = $('.item-expander');
262
-  
262
+
263 263
   $('.expander').on('click', function(e){
264 264
     e.preventDefault();
265 265
     e.stopPropagation();
@@ -272,7 +272,7 @@ $(window).load(function() {
272 272
         var bottomPosition = topPosition + portfolioContainer.height();
273 273
         $('html,body').delay(600).animate({ scrollTop: topPosition }, 800);
274 274
         var container = $('#item-expander>div', loader);
275
-        
275
+
276 276
         container.html(data);
277 277
          $(".fit-vids").fitVids();
278 278
         $('.project').flexslider({
@@ -280,9 +280,9 @@ $(window).load(function() {
280 280
           selector: ".project-slides .slide",
281 281
           controlNav: true,
282 282
           directionNav: true ,
283
-          slideshowSpeed: 5000,  
283
+          slideshowSpeed: 5000,
284 284
             });
285
-        
285
+
286 286
       //   container.fitVids();
287 287
         loader.slideDown(function(){
288 288
           if(typeof keepVideoRatio == 'function'){
@@ -292,13 +292,13 @@ $(window).load(function() {
292 292
       });
293 293
     });
294 294
   });
295
-    
295
+
296 296
     $('.close', loader).on('click', function(){
297 297
       loader.delay(300).slideUp(function(){
298 298
         var container = $('#item-expander>div', loader);
299 299
         container.html('');
300 300
         $(this).css({opacity:0});
301
-        
301
+
302 302
       });
303 303
       var portfolioContainer = $('#portfolio-container');
304 304
         var topPosition = portfolioContainer.offset().top;
@@ -354,8 +354,8 @@ $(function() {
354 354
         from: 50,
355 355
         to: count,
356 356
         speed: 3000,
357
-        refreshInterval: 50,  
358
-      });  
357
+        refreshInterval: 50,
358
+      });
359 359
     });
360 360
   });
361 361
 });
@@ -369,7 +369,7 @@ $(document).ready(function() {
369 369
   $(".tipped").tipper({
370 370
     direction: "top"
371 371
   });
372
-}); 
372
+});
373 373
 
374 374
 /*-----------------------------------
375 375
 Accordion
@@ -377,7 +377,7 @@ Accordion
377 377
 
378 378
 $(document).ready(function() {
379 379
   "use strict";
380
- 
380
+
381 381
   //Accordion button
382 382
   $('div.accordion-button').click(function() {
383 383
     $('div.accordion-content').slideUp('normal');
@@ -388,11 +388,11 @@ $(document).ready(function() {
388 388
     $(this).next().slideDown('normal');
389 389
 
390 390
   });
391
- 
392
-  //initial state 
391
+
392
+  //initial state
393 393
   $("div.accordion-content").hide();
394 394
   $('div.accordion-content.active').slideDown('normal');
395
- 
395
+
396 396
 });
397 397
 
398 398
 /*-----------------------------------
@@ -431,12 +431,12 @@ $('.close-alert').click(
431 431
 Contact Form
432 432
 -----------------------------------*/
433 433
 
434
-$(document).ready(function ($) { 
434
+$(document).ready(function ($) {
435 435
   "use strict";
436 436
 
437
-  $('#submit').click(function(){ 
437
+  $('#submit').click(function(){
438 438
 
439
-    $('.error').hide(); 
439
+    $('.error').hide();
440 440
 
441 441
     var name = $('input#name').val();
442 442
     var email = $('input#email').val();
@@ -461,7 +461,7 @@ $(document).ready(function ($) {
461 461
       return false;
462 462
     }
463 463
 
464
-    var data_string = $('#contact-us').serialize(); 
464
+    var data_string = $('#contact-us').serialize();
465 465
 
466 466
     $.ajax({
467 467
       type: "POST",
@@ -489,7 +489,6 @@ $(document).ready(function ($) {
489 489
 
490 490
  /*-----------------------------------
491 491
 Google Map
492
------------------------------------*/
493 492
 
494 493
 $(document).ready(function() {
495 494
   "use strict";
@@ -510,13 +509,13 @@ $(document).ready(function() {
510 509
 
511 510
   // Marker Image
512 511
   var image = 'images/marker.png';
513
-  
514
-  //  Start Marker    
512
+
513
+  //  Start Marker
515 514
   var myLatlng = new google.maps.LatLng(30.307863, -97.752329);
516 515
 
517
-  // Marker Text 
516
+  // Marker Text
518 517
    var contentString = '<div id="map-tooltip"><h5>Our Office Location</h5><p>Come see us!</p></div>';
519
-  
518
+
520 519
   var marker = new google.maps.Marker({
521 520
       position: myLatlng,
522 521
       map: map,
@@ -527,11 +526,12 @@ $(document).ready(function() {
527 526
   var infowindow = new google.maps.InfoWindow({
528 527
     content: contentString
529 528
     });
530
-    
529
+
531 530
    google.maps.event.addListener(marker, 'click', function() {
532 531
     infowindow.open(map,marker);
533 532
     });
534 533
 
535 534
    // End Marker
536 535
 
537
-})
536
+})
537
+-----------------------------------*/