Commit 80e66783 by Mykhailo Makohin

finish index page

parent e29897ba

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
/tmp/* /tmp/*
!/log/.keep !/log/.keep
!/tmp/.keep !/tmp/.keep
/vendor/*
/app/assets/images/*
# Ignore Byebug command history file. # Ignore Byebug command history file.
.byebug_history .byebug_history
...@@ -18,6 +18,7 @@ gem 'jbuilder', '~> 2.5' ...@@ -18,6 +18,7 @@ gem 'jbuilder', '~> 2.5'
gem 'haml' gem 'haml'
gem 'bootstrap-sass' gem 'bootstrap-sass'
gem 'gmaps4rails' gem 'gmaps4rails'
gem 'remotipart'
group :development, :test do group :development, :test do
gem 'byebug', platform: :mri gem 'byebug', platform: :mri
......
...@@ -120,6 +120,7 @@ GEM ...@@ -120,6 +120,7 @@ GEM
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.10.0) rb-inotify (0.10.0)
ffi (~> 1.0) ffi (~> 1.0)
remotipart (1.4.3)
sass (3.7.4) sass (3.7.4)
sass-listen (~> 4.0.0) sass-listen (~> 4.0.0)
sass-listen (4.0.0) sass-listen (4.0.0)
...@@ -180,6 +181,7 @@ DEPENDENCIES ...@@ -180,6 +181,7 @@ DEPENDENCIES
mysql2 (>= 0.3.18, < 0.6.0) mysql2 (>= 0.3.18, < 0.6.0)
puma (~> 3.0) puma (~> 3.0)
rails (~> 5.0.7, >= 5.0.7.2) rails (~> 5.0.7, >= 5.0.7.2)
remotipart
sass-rails (~> 5.0) sass-rails (~> 5.0)
spring spring
spring-watcher-listen (~> 2.0.0) spring-watcher-listen (~> 2.0.0)
......
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" width="27" height="28" viewBox="0 0 27 28">
<defs>
<style>
.cls-3 {
fill: #cdcdcd;
}
.cls-4 {
fill: #bdbdbd;
}
.cls-5 {
fill: #ffffff;
}
.cls-6 {
fill: #f54b2f;
opacity: 0.5;
}
.cls-7 {
fill: #ffffdd;
}
.cls-8 {
fill: #f2f3be;
}
</style>
</defs>
<g id="group-1">
<path d="M25.000,28.000 C25.000,28.000 2.000,28.000 2.000,28.000 C0.895,28.000 -0.000,27.104 -0.000,26.000 C-0.000,26.000 -0.000,12.000 -0.000,12.000 C-0.000,10.901 0.887,10.010 1.984,10.001 C1.984,10.001 1.692,10.001 1.692,10.001 C1.447,10.001 1.215,9.955 0.998,9.881 C0.998,9.881 11.579,0.685 11.579,0.685 C12.656,-0.251 14.344,-0.251 15.421,0.685 C15.421,0.685 26.003,9.881 26.003,9.881 C25.786,9.955 25.553,10.001 25.308,10.001 C25.308,10.001 25.016,10.001 25.016,10.001 C26.113,10.010 27.000,10.901 27.000,12.000 C27.000,12.000 27.000,26.000 27.000,26.000 C27.000,27.104 26.105,28.000 25.000,28.000 Z" id="path-1" class="cls-3" fill-rule="evenodd"/>
<path d="M2.000,10.000 C2.000,10.000 25.000,10.000 25.000,10.000 C26.105,10.000 27.000,10.895 27.000,12.000 C27.000,12.000 27.000,26.000 27.000,26.000 C27.000,27.104 26.105,28.000 25.000,28.000 C25.000,28.000 2.000,28.000 2.000,28.000 C0.895,28.000 -0.000,27.104 -0.000,26.000 C-0.000,26.000 -0.000,12.000 -0.000,12.000 C-0.000,10.895 0.895,10.000 2.000,10.000 Z" id="path-2" class="cls-4" fill-rule="evenodd"/>
<path d="M25.000,5.000 C25.000,5.000 25.000,20.000 25.000,20.000 C25.000,20.000 7.000,20.000 7.000,20.000 C7.000,20.000 7.000,5.000 7.000,5.000 C7.000,5.000 25.000,5.000 25.000,5.000 Z" id="path-3" class="cls-5" fill-rule="evenodd"/>
<path d="M22.000,15.000 C22.000,15.000 22.000,10.000 22.000,10.000 C22.000,10.000 23.000,10.000 23.000,10.000 C23.000,10.000 23.000,15.000 23.000,15.000 C23.000,15.000 22.000,15.000 22.000,15.000 ZM19.000,7.000 C19.000,7.000 20.000,7.000 20.000,7.000 C20.000,7.000 20.000,18.000 20.000,18.000 C20.000,18.000 19.000,18.000 19.000,18.000 C19.000,18.000 19.000,7.000 19.000,7.000 ZM17.000,7.000 C17.000,7.000 18.000,7.000 18.000,7.000 C18.000,7.000 18.000,18.000 18.000,18.000 C18.000,18.000 17.000,18.000 17.000,18.000 C17.000,18.000 17.000,7.000 17.000,7.000 ZM15.000,7.000 C15.000,7.000 16.000,7.000 16.000,7.000 C16.000,7.000 16.000,18.000 16.000,18.000 C16.000,18.000 15.000,18.000 15.000,18.000 C15.000,18.000 15.000,7.000 15.000,7.000 ZM13.000,7.000 C13.000,7.000 14.000,7.000 14.000,7.000 C14.000,7.000 14.000,18.000 14.000,18.000 C14.000,18.000 13.000,18.000 13.000,18.000 C13.000,18.000 13.000,7.000 13.000,7.000 ZM11.000,7.000 C11.000,7.000 12.000,7.000 12.000,7.000 C12.000,7.000 12.000,18.000 12.000,18.000 C12.000,18.000 11.000,18.000 11.000,18.000 C11.000,18.000 11.000,7.000 11.000,7.000 ZM9.000,7.000 C9.000,7.000 10.000,7.000 10.000,7.000 C10.000,7.000 10.000,18.000 10.000,18.000 C10.000,18.000 9.000,18.000 9.000,18.000 C9.000,18.000 9.000,7.000 9.000,7.000 Z" id="path-4" class="cls-6" fill-rule="evenodd"/>
<path d="M26.710,27.074 C26.889,26.785 26.998,26.449 26.998,26.086 C26.998,26.086 26.998,12.913 26.998,12.913 C26.998,12.656 26.945,12.411 26.850,12.187 C26.850,12.187 17.171,20.113 17.171,20.113 C17.171,20.113 26.710,27.074 26.710,27.074 ZM16.296,20.907 C15.493,21.581 14.498,21.923 13.500,21.923 C12.502,21.923 11.507,21.582 10.703,20.907 C10.703,20.907 1.192,27.848 1.192,27.848 C1.427,27.946 1.686,28.001 1.957,28.001 C1.957,28.001 25.042,28.001 25.042,28.001 C25.314,28.001 25.572,27.946 25.808,27.848 C25.808,27.848 16.296,20.907 16.296,20.907 Z" id="path-5" class="cls-7" fill-rule="evenodd"/>
<path d="M0.149,12.187 C0.055,12.411 0.001,12.656 0.001,12.913 C0.001,12.913 0.001,26.086 0.001,26.086 C0.001,26.449 0.110,26.785 0.290,27.074 C0.290,27.074 9.828,20.113 9.828,20.113 C9.828,20.113 0.149,12.187 0.149,12.187 Z" id="path-6" class="cls-8" fill-rule="evenodd"/>
</g>
</svg>
...@@ -11,11 +11,20 @@ ...@@ -11,11 +11,20 @@
// about supported directives. // about supported directives.
// //
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery-ui
//= require turbolinks //= require jquery.remotipart
//= require_tree . //= require bootstrap.min
//= require outdatedbrowser
//= require bootstrap.js //= require owl.carousel
//= require pgwslider.min
//= require jquery.royalslider.min
//= require jquery.event.move
//= require jquery.twentytwenty
//= require tooltipster.bundle.min
//= require freewall
//= require underscore
//= require jquery.autocomplete
//= require gmaps/google //= require gmaps/google
//= require infobox
//= require squares
//= require_tree .
/*
*=require_self
*/
@import url("normalize.css");
@import url("outdatedBrowser.min.css");
@import url("main.css");
\ No newline at end of file
@import "bootstrap-sprockets";
@import "bootstrap";
@import 'main';
This source diff could not be displayed because it is too large. You can view the blob instead.
class HomeController < ApplicationController class HomeController < ApplicationController
def index; end def index; end
def open_project; end
end end
\ No newline at end of file
...@@ -614,3 +614,6 @@ ...@@ -614,3 +614,6 @@
%a.tooltipster_link{:href => "#"} cosmo-travel.com.ua %a.tooltipster_link{:href => "#"} cosmo-travel.com.ua
%a.round_link{:href => "#"} %a.round_link{:href => "#"}
%i.icon.icon_fb %i.icon.icon_fb
%a#scroller.scroller{:href => "#"}
%i.icon.icon_arrow_up
%div на початок
!!! !!!
%html %html
%head %head
%meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}
%title WarmCity %title Warm City
= csrf_meta_tags = csrf_meta_tags
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
%meta{:charset => "utf-8"}/ %meta{:charset => "utf-8"}
%meta{:content => "", :name => "description"}/ %meta{:content => "", :name => "description"}
%meta{:content => "width=device-width", :name => "viewport"}/ %meta{:content => "width=device-width", :name => "viewport"}
%meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}/ %meta{:content => "IE=edge", "http-equiv" => "X-UA-Compatible"}
/ /Fonts
Fonts %link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400,600,700", :rel => "stylesheet", :type => "text/css"}
\================================================== %link{:href => "//fonts.googleapis.com/css?family=PT+Sans:400,700italic,700,400italic", :rel => "stylesheet", :type => "text/css"}
%link{:href => "//fonts.googleapis.com/css?family=Open+Sans:400,600,700", :rel => "stylesheet", :type => "text/css"}/ %link{:href => "//fonts.googleapis.com/css?family=Noto+Serif:400,400italic&subset=latin,cyrillic-ext", :rel => "stylesheet", :type => "text/css"}
%link{:href => "//fonts.googleapis.com/css?family=PT+Sans:400,700italic,700,400italic", :rel => "stylesheet", :type => "text/css"}/ %link{:href => "//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&subset=cyrillic-ext", :rel => "stylesheet"}
%link{:href => "//fonts.googleapis.com/css?family=Noto+Serif:400,400italic&subset=latin,cyrillic-ext", :rel => "stylesheet", :type => "text/css"}/ %link{:href => "//fonts.googleapis.com/css?family=Roboto+Slab:300,400&subset=cyrillic-ext", :rel => "stylesheet"}
%link{:href => "//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700&subset=cyrillic-ext", :rel => "stylesheet"}/ %link{:href => "//fonts.googleapis.com/css?family=Roboto:300,500&subset=cyrillic-ext", :rel => "stylesheet"}
%link{:href => "//fonts.googleapis.com/css?family=Roboto+Slab:300,400&subset=cyrillic-ext", :rel => "stylesheet"}/ /Favicons + Touch Icons
%link{:href => "//fonts.googleapis.com/css?family=Roboto:300,500&subset=cyrillic-ext", :rel => "stylesheet"}/ %link{:href => "favicons/apple-touch-icon57.png", :rel => "icon", :type => "image/png"}
/ %link{:href => "favicons/apple-touch-icon57.png", :rel => "apple-touch-icon", :sizes => "57x57"}
Styles %link{:href => "favicons/apple-touch-icon60.png", :rel => "apple-touch-icon", :sizes => "60x60"}
\================================================== %link{:href => "favicons/apple-touch-icon114.png", :rel => "apple-touch-icon", :sizes => "114x114"}
/ %link{:href => "favicons/apple-touch-icon120.png", :rel => "apple-touch-icon", :sizes => "120x120"}
Favicons + Touch Icons %link{:href => "favicons/apple-touch-icon180.png", :rel => "apple-touch-icon", :sizes => "180x180"}
\==================================================
%link{:href => "img/favicons/apple-touch-icon57.png", :rel => "icon", :type => "image/png"}/
%link{:href => "img/favicons/apple-touch-icon57.png", :rel => "apple-touch-icon", :sizes => "57x57"}/
%link{:href => "img/favicons/apple-touch-icon60.png", :rel => "apple-touch-icon", :sizes => "60x60"}/
%link{:href => "img/favicons/apple-touch-icon114.png", :rel => "apple-touch-icon", :sizes => "114x114"}/
%link{:href => "img/favicons/apple-touch-icon120.png", :rel => "apple-touch-icon", :sizes => "120x120"}/
%link{:href => "img/favicons/apple-touch-icon180.png", :rel => "apple-touch-icon", :sizes => "180x180"}/
%body %body
= render 'partials/modal' = render 'partials/modal'
- if current_page?(root_path) - if current_page?(root_path)
......
...@@ -4,14 +4,12 @@ ...@@ -4,14 +4,12 @@
.main_menu .main_menu
%nav.navbar.navbar-default %nav.navbar.navbar-default
.container-fluid .container-fluid
/ Brand and toggle get grouped for better mobile display
.navbar-header .navbar-header
%button.navbar-toggle.collapsed{"aria-expanded" => "false", "data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"} %button.navbar-toggle.collapsed{"aria-expanded" => "false", "data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
%span.sr-only Toggle navigation %span.sr-only Toggle navigation
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
/ Collect the nav links, forms, and other content for toggling
#bs-example-navbar-collapse-1.collapse.navbar-collapse #bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
%li %li
......
...@@ -5,14 +5,12 @@ ...@@ -5,14 +5,12 @@
= image_tag ("logo.svg") = image_tag ("logo.svg")
%nav.navbar.navbar-default %nav.navbar.navbar-default
.container-fluid .container-fluid
/ Brand and toggle get grouped for better mobile display
.navbar-header .navbar-header
%button.navbar-toggle.collapsed{"aria-expanded" => "false", "data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"} %button.navbar-toggle.collapsed{"aria-expanded" => "false", "data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", :type => "button"}
%span.sr-only Toggle navigation %span.sr-only Toggle navigation
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
%span.icon-bar %span.icon-bar
/ Collect the nav links, forms, and other content for toggling
#bs-example-navbar-collapse-1.collapse.navbar-collapse #bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav %ul.nav.navbar-nav
%li %li
......
Rails.application.routes.draw do Rails.application.routes.draw do
root 'home#index' root 'home#index'
get 'open_project', to: 'home#open_project'
end end
This source diff could not be displayed because it is too large. You can view the blob instead.
(function($){
$.fn.twentytwenty = function(options) {
var options = $.extend({default_offset_pct: 0.5, orientation: 'horizontal'}, options);
return this.each(function() {
var sliderPct = options.default_offset_pct;
var container = $(this);
var sliderOrientation = options.orientation;
var beforeDirection = (sliderOrientation === 'vertical') ? 'down' : 'left';
var afterDirection = (sliderOrientation === 'vertical') ? 'up' : 'right';
container.wrap("<div class='twentytwenty-wrapper twentytwenty-" + sliderOrientation + "'></div>");
container.append("<div class='twentytwenty-overlay'></div>");
var beforeImg = container.find("img:first");
var afterImg = container.find("img:last");
container.append("<div class='twentytwenty-handle'></div>");
var slider = container.find(".twentytwenty-handle");
slider.append("<span class='twentytwenty-" + beforeDirection + "-arrow'></span>");
slider.append("<span class='twentytwenty-" + afterDirection + "-arrow'></span>");
container.addClass("twentytwenty-container");
beforeImg.addClass("twentytwenty-before");
afterImg.addClass("twentytwenty-after");
var overlay = container.find(".twentytwenty-overlay");
overlay.append("<div class='twentytwenty-before-label'></div>");
overlay.append("<div class='twentytwenty-after-label'></div>");
var calcOffset = function(dimensionPct) {
var w = beforeImg.width();
var h = beforeImg.height();
return {
w: w+"px",
h: h+"px",
cw: (dimensionPct*w)+"px",
ch: (dimensionPct*h)+"px"
};
};
var adjustContainer = function(offset) {
if (sliderOrientation === 'vertical') {
beforeImg.css("clip", "rect(0,"+offset.w+","+offset.ch+",0)");
}
else {
beforeImg.css("clip", "rect(0,"+offset.cw+","+offset.h+",0)");
}
container.css("height", offset.h);
};
var adjustSlider = function(pct) {
var offset = calcOffset(pct);
slider.css((sliderOrientation==="vertical") ? "top" : "left", (sliderOrientation==="vertical") ? offset.ch : offset.cw);
adjustContainer(offset);
}
$(window).on("resize.twentytwenty", function(e) {
adjustSlider(sliderPct);
});
var offsetX = 0;
var imgWidth = 0;
slider.on("movestart", function(e) {
if (((e.distX > e.distY && e.distX < -e.distY) || (e.distX < e.distY && e.distX > -e.distY)) && sliderOrientation !== 'vertical') {
e.preventDefault();
}
else if (((e.distX < e.distY && e.distX < -e.distY) || (e.distX > e.distY && e.distX > -e.distY)) && sliderOrientation === 'vertical') {
e.preventDefault();
}
container.addClass("active");
offsetX = container.offset().left;
offsetY = container.offset().top;
imgWidth = beforeImg.width();
imgHeight = beforeImg.height();
});
slider.on("moveend", function(e) {
container.removeClass("active");
});
slider.on("move", function(e) {
if (container.hasClass("active")) {
sliderPct = (sliderOrientation === 'vertical') ? (e.pageY-offsetY)/imgHeight : (e.pageX-offsetX)/imgWidth;
if (sliderPct < 0) {
sliderPct = 0;
}
if (sliderPct > 1) {
sliderPct = 1;
}
adjustSlider(sliderPct);
}
});
container.find("img").on("mousedown", function(event) {
event.preventDefault();
});
$(window).trigger("resize.twentytwenty");
});
};
})(jQuery);
/*!--------------------------------------------------------------------
JAVASCRIPT "Outdated Browser"
Version: 1.1.0 - 2014
author: Burocratik
website: http://www.burocratik.com
* @preserve
-----------------------------------------------------------------------*/
var outdatedBrowser = function(options) {
//Variable definition (before ajax)
var outdated = document.getElementById("outdated");
// Default settings
this.defaultOpts = {
bgColor: '#f25648',
color: '#ffffff',
lowerThan: 'transform',
languagePath: '../outdatedbrowser/lang/en.html'
}
if (options) {
//assign css3 property to IE browser version
if(options.lowerThan == 'IE8' || options.lowerThan == 'borderSpacing') {
options.lowerThan = 'borderSpacing';
} else if (options.lowerThan == 'IE9' || options.lowerThan == 'boxShadow') {
options.lowerThan = 'boxShadow';
} else if (options.lowerThan == 'IE10' || options.lowerThan == 'transform' || options.lowerThan == '' || typeof options.lowerThan === "undefined") {
options.lowerThan = 'transform';
} else if (options.lowerThan == 'IE11' || options.lowerThan == 'borderImage') {
options.lowerThan = 'borderImage';
}
//all properties
this.defaultOpts.bgColor = options.bgColor;
this.defaultOpts.color = options.color;
this.defaultOpts.lowerThan = options.lowerThan;
this.defaultOpts.languagePath = options.languagePath;
bkgColor = this.defaultOpts.bgColor;
txtColor = this.defaultOpts.color;
cssProp = this.defaultOpts.lowerThan;
languagePath = this.defaultOpts.languagePath;
} else {
bkgColor = this.defaultOpts.bgColor;
txtColor = this.defaultOpts.color;
cssProp = this.defaultOpts.lowerThan;
languagePath = this.defaultOpts.languagePath;
};//end if options
//Define opacity and fadeIn/fadeOut functions
var done = true;
function function_opacity(opacity_value) {
outdated.style.opacity = opacity_value / 100;
outdated.style.filter = 'alpha(opacity=' + opacity_value + ')';
}
// function function_fade_out(opacity_value) {
// function_opacity(opacity_value);
// if (opacity_value == 1) {
// outdated.style.display = 'none';
// done = true;
// }
// }
function function_fade_in(opacity_value) {
function_opacity(opacity_value);
if (opacity_value == 1) {
outdated.style.display = 'block';
}
if (opacity_value == 100) {
done = true;
}
}
//check if element has a particular class
// function hasClass(element, cls) {
// return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
// }
var supports = (function() {
var div = document.createElement('div'),
vendors = 'Khtml Ms O Moz Webkit'.split(' '),
len = vendors.length;
return function(prop) {
if ( prop in div.style ) return true;
prop = prop.replace(/^[a-z]/, function(val) {
return val.toUpperCase();
});
while(len--) {
if ( vendors[len] + prop in div.style ) {
return true;
}
}
return false;
};
})();
//if browser does not supports css3 property (transform=default), if does > exit all this
if ( !supports(''+ cssProp +'') ) {
if (done && outdated.style.opacity !== '1') {
done = false;
for (var i = 1; i <= 100; i++) {
setTimeout((function (x) {
return function () {
function_fade_in(x);
};
})(i), i * 8);
}
}
}else{
return;
};//end if
//Check AJAX Options: if languagePath == '' > use no Ajax way, html is needed inside <div id="outdated">
if( languagePath === ' ' || languagePath.length == 0 ){
startStylesAndEvents();
}else{
grabFile(languagePath);
}
//events and colors
function startStylesAndEvents(){
var btnClose = document.getElementById("btnCloseUpdateBrowser");
var btnUpdate = document.getElementById("btnUpdateBrowser");
//check settings attributes
outdated.style.backgroundColor = bkgColor;
//way too hard to put !important on IE6
outdated.style.color = txtColor;
outdated.children[0].style.color = txtColor;
outdated.children[1].style.color = txtColor;
//check settings attributes
btnUpdate.style.color = txtColor;
// btnUpdate.style.borderColor = txtColor;
if (btnUpdate.style.borderColor) btnUpdate.style.borderColor = txtColor;
btnClose.style.color = txtColor;
//close button
btnClose.onmousedown = function() {
outdated.style.display = 'none';
return false;
};
//Override the update button color to match the background color
btnUpdate.onmouseover = function() {
this.style.color = bkgColor;
this.style.backgroundColor = txtColor;
};
btnUpdate.onmouseout = function() {
this.style.color = txtColor;
this.style.backgroundColor = bkgColor;
};
}//end styles and events
// IF AJAX with request ERROR > insert english default
var ajaxEnglishDefault = '<h6>Your browser is out-of-date!</h6>'
+ '<p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="http://outdatedbrowser.com/">Update my browser now </a></p>'
+ '<p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>';
//** AJAX FUNCTIONS - Bulletproof Ajax by Jeremy Keith **
function getHTTPObject() {
var xhr = false;
if (window.XMLHttpRequest) {
xhr = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xhr = false;
}
}
}
return xhr;
};//end function
function grabFile(file) {
var request = getHTTPObject();
if (request) {
request.onreadystatechange = function() {
displayResponse(request);
};
request.open("GET", file, true);
request.send(null);
}
return false;
};//end grabFile
function displayResponse(request) {
var insertContentHere = document.getElementById("outdated");
if (request.readyState == 4) {
if (request.status == 200 || request.status == 304) {
insertContentHere.innerHTML = request.responseText;
}else{
insertContentHere.innerHTML = ajaxEnglishDefault;
}
startStylesAndEvents();
}
return false;
};//end displayResponse
////////END of outdatedBrowser function
};
This source diff could not be displayed because it is too large. You can view the blob instead.
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability of focused elements when they are also in an
* active/hover state.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit; /* 1 */
font: inherit; /* 2 */
margin: 0; /* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
button {
overflow: visible;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
box-sizing: content-box; /* 2 */
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*!--------------------------------------------------------------------
STYLES "Outdated Browser"
Version: 1.1.0 - 2014
author: Burocratik
website: http://www.burocratik.com
* @preserve
-----------------------------------------------------------------------*/
#outdated{display:none;position:fixed;top:0;left:0;width:100%;height:170px;text-align:center;text-transform:uppercase;z-index:1500;background-color:#f25648;color:#fff}* html #outdated{position:absolute}#outdated h6{font-size:25px;line-height:25px;margin:30px 0 10px}#outdated p{font-size:12px;line-height:12px;margin:0}#outdated #btnUpdateBrowser{display:block;position:relative;padding:10px 20px;margin:30px auto 0;width:230px;color:#fff;text-decoration:none;border:2px solid #fff;cursor:pointer}#outdated #btnUpdateBrowser:hover{color:#f25648;background-color:#fff}#outdated .last{position:absolute;top:10px;right:25px;width:20px;height:20px}#outdated #btnCloseUpdateBrowser{display:block;position:relative;width:100%;height:100%;text-decoration:none;color:#fff;font-size:36px;line-height:36px}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment