phcthemes_web_theme_pack 2.0.1 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/phcthemes_web_theme_pack_antlr.js +1 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_hostinza.js +28 -0
- data/app/assets/javascripts/phcthemes_web_theme_pack_pressroom.js +0 -0
- data/app/assets/javascripts/themes/antlr/theme/sidebar.js +36 -0
- data/app/assets/javascripts/themes/hostinza/theme/hostslide.js +94 -0
- data/app/assets/javascripts/themes/hostinza/theme/jquery.parallax-scroll.js +185 -0
- data/app/assets/javascripts/themes/hostinza/theme/jquery.parallax.js +521 -0
- data/app/assets/javascripts/themes/hostinza/theme/main.js +1106 -0
- data/app/assets/javascripts/themes/hostinza/theme/plugins.js +31 -0
- data/app/assets/javascripts/themes/hostinza/theme/shuffle-letters.js +140 -0
- data/app/assets/javascripts/themes/hostinza/theme/tweetie.js +130 -0
- data/app/assets/javascripts/themes/hostinza/theme/vps-slider-month-products.js +66 -0
- data/app/assets/javascripts/themes/hostinza/theme/vps-slider-month-settings.js +134 -0
- data/app/assets/javascripts/themes/hostinza/theme/vps-slider-year-products.js +66 -0
- data/app/assets/javascripts/themes/hostinza/theme/vps-slider-year-settings.js +134 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_antlr.scss +2 -1
- data/app/assets/stylesheets/phcthemes_web_theme_pack_hostinza.scss +24 -0
- data/app/assets/stylesheets/phcthemes_web_theme_pack_pressroom.scss +24 -0
- data/app/assets/stylesheets/themes/antlr/filter.css +189 -0
- data/lib/phcthemes_web_theme_pack/version.rb +1 -1
- metadata +19 -2
@@ -0,0 +1,31 @@
|
|
1
|
+
// Avoid `console` errors in browsers that lack a console.
|
2
|
+
(function() {
|
3
|
+
var method;
|
4
|
+
var noop = function () {};
|
5
|
+
var methods = [
|
6
|
+
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
|
7
|
+
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
|
8
|
+
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
|
9
|
+
'timeline', 'timelineEnd', 'timeStamp', 'trace', 'warn'
|
10
|
+
];
|
11
|
+
var length = methods.length;
|
12
|
+
var console = (window.console = window.console || {});
|
13
|
+
|
14
|
+
while (length--) {
|
15
|
+
method = methods[length];
|
16
|
+
|
17
|
+
// Only stub undefined methods.
|
18
|
+
if (!console[method]) {
|
19
|
+
console[method] = noop;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}());
|
23
|
+
|
24
|
+
// Place any jQuery/helper plugins in here.
|
25
|
+
|
26
|
+
// xs-nav menu
|
27
|
+
!function(n,e,i,s){n.xs_nav=function(a,t){var o={responsive:!0,mobileBreakpoint:767,showDuration:300,hideDuration:300,showDelayDuration:0,hideDelayDuration:0,submenuTrigger:"hover",effect:"fade",submenuIndicator:!0,submenuIndicatorTrigger:!1,hideSubWhenGoOut:!0,visibleSubmenusOnMobile:!1,overlay:!0,overlayColor:"rgba(0, 0, 0, 0.7)",hidden:!1,hiddenOnMobile:!1,offCanvasSide:"left",offCanvasCloseButton:!0,animationOnShow:"",animationOnHide:"",hideScrollBar:!0,onInit:function(){},onLandscape:function(){},onPortrait:function(){},onShowOffCanvas:function(){},onHideOffCanvas:function(){}},r=this,u=Number.MAX_VALUE,d=1,l="click.nav touchstart.nav",c="mouseenter focusin",f="mouseleave focusout";r.settings={};var a=(n(a),a);n(a).find(".nav-search").length>0&&n(a).find(".nav-search").find("form").prepend("<span class='nav-search-close-button' tabindex='0'>✕</span>"),r.init=function(){r.settings=n.extend({},o,t),r.settings.offCanvasCloseButton&&n(a).find(".nav-menus-wrapper").prepend("<span class='nav-menus-wrapper-close-button'>✕</span>"),"right"==r.settings.offCanvasSide&&n(a).find(".nav-menus-wrapper").addClass("nav-menus-wrapper-right"),r.settings.hidden&&(n(a).addClass("xs_nav-hidden"),r.settings.mobileBreakpoint=99999),v(),n(a).find(".nav-toggle").on("click touchstart",function(n){n.stopPropagation(),n.preventDefault(),r.showOffcanvas(),t!==s&&r.callback("onShowOffCanvas")}),n(a).find(".nav-menus-wrapper-close-button").on("click touchstart",function(){r.hideOffcanvas(),t!==s&&r.callback("onHideOffCanvas")}),n(a).find(".nav-search-button, .nav-search-close-button").on("click touchstart keydown",function(e){e.stopPropagation(),e.preventDefault();var i=e.keyCode||e.which;"click"===e.type||"touchstart"===e.type||"keydown"===e.type&&13==i?r.toggleSearch():9==i&&n(e.target).blur()}),n(e).resize(function(){r.initxs_navMode(C()),O(),r.settings.hiddenOnMobile&&m()}),r.initxs_navMode(C()),r.settings.hiddenOnMobile&&m(),r.settings.overlay&&n(a).append("<div class='nav-overlay-panel'></div>"),n(a).find(".megamenu-tabs").length>0&&y(),t!==s&&r.callback("onInit")};var h=function(){n(a).find(".nav-submenu").hide(0),n(a).find("li").removeClass("focus")},v=function(){n(a).find("li").each(function(){n(this).children(".nav-dropdown,.megamenu-panel").length>0&&(n(this).children(".nav-dropdown,.megamenu-panel").addClass("nav-submenu"),r.settings.submenuIndicator&&n(this).children("a").append("<span class='submenu-indicator'><span class='submenu-indicator-chevron'></span></span>"))})},m=function(){n(a).hasClass("xs_nav-portrait")?n(a).addClass("xs_nav-hidden"):n(a).removeClass("xs_nav-hidden")};r.showSubmenu=function(e,i){C()>r.settings.mobileBreakpoint&&n(a).find(".nav-search").find("form").fadeOut(),"fade"==i?n(e).children(".nav-submenu").stop(!0,!0).delay(r.settings.showDelayDuration).fadeIn(r.settings.showDuration).removeClass(r.settings.animationOnHide).addClass(r.settings.animationOnShow):n(e).children(".nav-submenu").stop(!0,!0).delay(r.settings.showDelayDuration).slideDown(r.settings.showDuration).removeClass(r.settings.animationOnHide).addClass(r.settings.animationOnShow),n(e).addClass("focus")},r.hideSubmenu=function(e,i){"fade"==i?n(e).find(".nav-submenu").stop(!0,!0).delay(r.settings.hideDelayDuration).fadeOut(r.settings.hideDuration).removeClass(r.settings.animationOnShow).addClass(r.settings.animationOnHide):n(e).find(".nav-submenu").stop(!0,!0).delay(r.settings.hideDelayDuration).slideUp(r.settings.hideDuration).removeClass(r.settings.animationOnShow).addClass(r.settings.animationOnHide),n(e).removeClass("focus").find(".focus").removeClass("focus")};var p=function(){r.settings.hideScrollBar&&n("body").addClass("no-scroll"),r.settings.overlay&&n(a).find(".nav-overlay-panel").css("background-color",r.settings.overlayColor).fadeIn(300).on("click touchstart",function(){r.hideOffcanvas()})},b=function(){r.settings.hideScrollBar&&n("body").removeClass("no-scroll"),r.settings.overlay&&n(a).find(".nav-overlay-panel").fadeOut(400)};r.showOffcanvas=function(){p(),"left"==r.settings.offCanvasSide?n(a).find(".nav-menus-wrapper").css("transition-property","left").addClass("nav-menus-wrapper-open"):n(a).find(".nav-menus-wrapper").css("transition-property","right").addClass("nav-menus-wrapper-open")},r.hideOffcanvas=function(){n(a).find(".nav-menus-wrapper").removeClass("nav-menus-wrapper-open").on("webkitTransitionEnd moztransitionend transitionend oTransitionEnd",function(){n(a).find(".nav-menus-wrapper").css("transition-property","none").off()}),b()},r.toggleOffcanvas=function(){C()<=r.settings.mobileBreakpoint&&(n(a).find(".nav-menus-wrapper").hasClass("nav-menus-wrapper-open")?(r.hideOffcanvas(),t!==s&&r.callback("onHideOffCanvas")):(r.showOffcanvas(),t!==s&&r.callback("onShowOffCanvas")))},r.toggleSearch=function(){"none"==n(a).find(".nav-search").find("form").css("display")?(n(a).find(".nav-search").find("form").fadeIn(200),n(a).find(".nav-search").find("input").focus()):(n(a).find(".nav-search").find("form").fadeOut(200),n(a).find(".nav-search").find("input").blur())},r.initxs_navMode=function(e){r.settings.responsive?(e<=r.settings.mobileBreakpoint&&u>r.settings.mobileBreakpoint&&(n(a).addClass("xs_nav-portrait").removeClass("xs_nav-landscape"),S(),t!==s&&r.callback("onPortrait")),e>r.settings.mobileBreakpoint&&d<=r.settings.mobileBreakpoint&&(n(a).addClass("xs_nav-landscape").removeClass("xs_nav-portrait"),k(),b(),r.hideOffcanvas(),t!==s&&r.callback("onLandscape")),u=e,d=e):(n(a).addClass("xs_nav-landscape"),k(),t!==s&&r.callback("onLandscape"))};var g=function(){n("html").on("click.body touchstart.body",function(e){0===n(e.target).closest(".xs_nav").length&&(n(a).find(".nav-submenu").fadeOut(),n(a).find(".focus").removeClass("focus"),n(a).find(".nav-search").find("form").fadeOut())})},C=function(){return e.innerWidth||i.documentElement.clientWidth||i.body.clientWidth},w=function(e){"landscape"==e?n(a).find(".nav-menu").find("li, a").off(l):n(a).find(".nav-menu").find("li, a").off(c).off(f)},O=function(){if(C()>r.settings.mobileBreakpoint){var e=n(a).outerWidth();n(a).find(".nav-menu").children("li").children(".nav-submenu").each(function(){n(this).parent().position().left+n(this).outerWidth()>e?n(this).css("right",0):n(this).css("right","auto")})}},y=function(){function e(e){var i=n(e).children(".megamenu-tabs-nav").children("li"),s=n(e).children(".megamenu-tabs-pane");n(i).on("mouseenter.tabs click.tabs touchstart.tabs",function(e){e.stopPropagation(),e.preventDefault(),n(i).removeClass("active"),n(this).addClass("active"),n(s).hide(0).removeClass("active"),n(s[n(this).index()]).show(0).addClass("active")})}if(n(a).find(".megamenu-tabs").length>0)for(var i=n(a).find(".megamenu-tabs"),s=0;s<i.length;s++)e(i[s])},k=function(){w("landscape"),h(),navigator.userAgent.match(/Mobi/i)||navigator.maxTouchPoints>0||"click"==r.settings.submenuTrigger?n(a).find(".nav-menu, .nav-dropdown").children("li").children("a").on(l,function(i){if(r.hideSubmenu(n(this).parent("li").siblings("li"),r.settings.effect),n(this).closest(".nav-menu").siblings(".nav-menu").find(".nav-submenu").fadeOut(r.settings.hideDuration),n(this).siblings(".nav-submenu").length>0){if(i.stopPropagation(),i.preventDefault(),"none"==n(this).siblings(".nav-submenu").css("display"))return r.showSubmenu(n(this).parent("li"),r.settings.effect),O(),!1;if(r.hideSubmenu(n(this).parent("li"),r.settings.effect),"_blank"===n(this).attr("target")||"blank"===n(this).attr("target"))e.open(n(this).attr("href"));else{if("#"===n(this).attr("href")||""===n(this).attr("href")||"javascript:void(0)"===n(this).attr("href"))return!1;e.location.href=n(this).attr("href")}}}):n(a).find(".nav-menu").find("li").on(c,function(){r.showSubmenu(this,r.settings.effect),O()}).on(f,function(){r.hideSubmenu(this,r.settings.effect)}),r.settings.hideSubWhenGoOut&&g()},S=function(){w("portrait"),h(),r.settings.visibleSubmenusOnMobile?n(a).find(".nav-submenu").show(0):(n(a).find(".submenu-indicator").removeClass("submenu-indicator-up"),r.settings.submenuIndicator&&r.settings.submenuIndicatorTrigger?n(a).find(".submenu-indicator").on(l,function(e){return e.stopPropagation(),e.preventDefault(),r.hideSubmenu(n(this).parent("a").parent("li").siblings("li"),"slide"),r.hideSubmenu(n(this).closest(".nav-menu").siblings(".nav-menu").children("li"),"slide"),"none"==n(this).parent("a").siblings(".nav-submenu").css("display")?(n(this).addClass("submenu-indicator-up"),n(this).parent("a").parent("li").siblings("li").find(".submenu-indicator").removeClass("submenu-indicator-up"),n(this).closest(".nav-menu").siblings(".nav-menu").find(".submenu-indicator").removeClass("submenu-indicator-up"),r.showSubmenu(n(this).parent("a").parent("li"),"slide"),!1):(n(this).parent("a").parent("li").find(".submenu-indicator").removeClass("submenu-indicator-up"),void r.hideSubmenu(n(this).parent("a").parent("li"),"slide"))}):n(a).find(".nav-menu, .nav-dropdown").children("li").children("a").each(function(){n(this).siblings(".nav-submenu").length>0&&n(this).on(l,function(i){if(i.stopPropagation(),i.preventDefault(),r.hideSubmenu(n(this).parent("li").siblings("li"),r.settings.effect),r.hideSubmenu(n(this).closest(".nav-menu").siblings(".nav-menu").children("li"),"slide"),"none"==n(this).siblings(".nav-submenu").css("display"))return n(this).children(".submenu-indicator").addClass("submenu-indicator-up"),n(this).parent("li").siblings("li").find(".submenu-indicator").removeClass("submenu-indicator-up"),n(this).closest(".nav-menu").siblings(".nav-menu").find(".submenu-indicator").removeClass("submenu-indicator-up"),r.showSubmenu(n(this).parent("li"),"slide"),!1;if(n(this).parent("li").find(".submenu-indicator").removeClass("submenu-indicator-up"),r.hideSubmenu(n(this).parent("li"),"slide"),"_blank"===n(this).attr("target")||"blank"===n(this).attr("target"))e.open(n(this).attr("href"));else{if("#"===n(this).attr("href")||""===n(this).attr("href")||"javascript:void(0)"===n(this).attr("href"))return!1;e.location.href=n(this).attr("href")}})}))};r.callback=function(n){t[n]!==s&&t[n].call(a)},r.init()},n.fn.xs_nav=function(e){return this.each(function(){if(s===n(this).data("xs_nav")){var i=new n.xs_nav(this,e);n(this).data("xs_nav",i)}})}}(jQuery,window,document);
|
28
|
+
|
29
|
+
/*! WOW - v1.0.2 - 2014-09-24
|
30
|
+
* Copyright (c) 2014 Matthieu Aussaguel; Licensed MIT */
|
31
|
+
(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),this.animationNameCache=new c}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else{for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);this.util().addEvent(window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)}return this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],e=0,f=b.length;f>e;e++)d=b[e],g.push(function(){var a,b,e,f;for(e=d.addedNodes||[],f=[],a=0,b=e.length;b>a;a++)c=e[a],f.push(this.doSync(c));return f}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=""+a.className+" "+this.config.animateClass},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;f=[];for(c in b)d=b[c],a[""+c]=d,f.push(function(){var b,f,g,h;for(g=this.vendors,h=[],b=0,f=g.length;f>b;b++)e=g[b],h.push(a[""+e+c.charAt(0).toUpperCase()+c.substr(1)]=d);return h}.call(this));return f},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(e=d(a),c=e.getPropertyCSSValue(b),i=this.vendors,g=0,h=i.length;h>g;g++)f=i[g],c=c||e.getPropertyCSSValue("-"+f+"-"+b);return c},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this);
|
@@ -0,0 +1,140 @@
|
|
1
|
+
/**
|
2
|
+
* @name Shuffle Letters
|
3
|
+
* @author Martin Angelov
|
4
|
+
* @version 1.0
|
5
|
+
* @url http://tutorialzine.com/2011/09/shuffle-letters-effect-jquery/
|
6
|
+
* @license MIT License
|
7
|
+
*/
|
8
|
+
|
9
|
+
(function($){
|
10
|
+
|
11
|
+
$.fn.shuffleLetters = function(prop){
|
12
|
+
|
13
|
+
var options = $.extend({
|
14
|
+
"step" : 8, // How many times should the letters be changed
|
15
|
+
"fps" : 25, // Frames Per Second
|
16
|
+
"text" : "", // Use this text instead of the contents
|
17
|
+
"callback" : function(){} // Run once the animation is complete
|
18
|
+
},prop)
|
19
|
+
|
20
|
+
return this.each(function(){
|
21
|
+
|
22
|
+
var el = $(this),
|
23
|
+
str = "";
|
24
|
+
|
25
|
+
|
26
|
+
// Preventing parallel animations using a flag;
|
27
|
+
|
28
|
+
if(el.data('animated')){
|
29
|
+
return true;
|
30
|
+
}
|
31
|
+
|
32
|
+
el.data('animated',true);
|
33
|
+
|
34
|
+
|
35
|
+
if(options.text) {
|
36
|
+
str = options.text.split('');
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
str = el.text().split('');
|
40
|
+
}
|
41
|
+
|
42
|
+
// The types array holds the type for each character;
|
43
|
+
// Letters holds the positions of non-space characters;
|
44
|
+
|
45
|
+
var types = [],
|
46
|
+
letters = [];
|
47
|
+
|
48
|
+
// Looping through all the chars of the string
|
49
|
+
|
50
|
+
for(var i=0;i<str.length;i++){
|
51
|
+
|
52
|
+
var ch = str[i];
|
53
|
+
|
54
|
+
if(ch == " "){
|
55
|
+
types[i] = "space";
|
56
|
+
continue;
|
57
|
+
}
|
58
|
+
else if(/[a-z]/.test(ch)){
|
59
|
+
types[i] = "lowerLetter";
|
60
|
+
}
|
61
|
+
else if(/[A-Z]/.test(ch)){
|
62
|
+
types[i] = "upperLetter";
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
types[i] = "symbol";
|
66
|
+
}
|
67
|
+
|
68
|
+
letters.push(i);
|
69
|
+
}
|
70
|
+
|
71
|
+
el.html("");
|
72
|
+
|
73
|
+
// Self executing named function expression:
|
74
|
+
|
75
|
+
(function shuffle(start){
|
76
|
+
|
77
|
+
// This code is run options.fps times per second
|
78
|
+
// and updates the contents of the page element
|
79
|
+
|
80
|
+
var i,
|
81
|
+
len = letters.length,
|
82
|
+
strCopy = str.slice(0); // Fresh copy of the string
|
83
|
+
|
84
|
+
if(start>len){
|
85
|
+
|
86
|
+
// The animation is complete. Updating the
|
87
|
+
// flag and triggering the callback;
|
88
|
+
|
89
|
+
el.data('animated',false);
|
90
|
+
options.callback(el);
|
91
|
+
return;
|
92
|
+
}
|
93
|
+
|
94
|
+
// All the work gets done here
|
95
|
+
for(i=Math.max(start,0); i < len; i++){
|
96
|
+
|
97
|
+
// The start argument and options.step limit
|
98
|
+
// the characters we will be working on at once
|
99
|
+
|
100
|
+
if( i < start+options.step){
|
101
|
+
// Generate a random character at thsi position
|
102
|
+
strCopy[letters[i]] = randomChar(types[letters[i]]);
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
strCopy[letters[i]] = "";
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
el.text(strCopy.join(""));
|
110
|
+
|
111
|
+
setTimeout(function(){
|
112
|
+
|
113
|
+
shuffle(start+1);
|
114
|
+
|
115
|
+
},1000/options.fps);
|
116
|
+
|
117
|
+
})(-options.step);
|
118
|
+
|
119
|
+
|
120
|
+
});
|
121
|
+
};
|
122
|
+
|
123
|
+
function randomChar(type){
|
124
|
+
var pool = "";
|
125
|
+
|
126
|
+
if (type == "lowerLetter"){
|
127
|
+
pool = "abcdefghijklmnopqrstuvwxyz0123456789";
|
128
|
+
}
|
129
|
+
else if (type == "upperLetter"){
|
130
|
+
pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
131
|
+
}
|
132
|
+
else if (type == "symbol"){
|
133
|
+
pool = ",.?/\\(^)![]{}*&^%$#'\"";
|
134
|
+
}
|
135
|
+
|
136
|
+
var arr = pool.split('');
|
137
|
+
return arr[Math.floor(Math.random()*arr.length)];
|
138
|
+
}
|
139
|
+
|
140
|
+
})(jQuery);
|
@@ -0,0 +1,130 @@
|
|
1
|
+
/**
|
2
|
+
* Tweetie: A simple Twitter feed plugin
|
3
|
+
* Author: Sonny T. <hi@sonnyt.com>, sonnyt.com
|
4
|
+
*/
|
5
|
+
|
6
|
+
(function ($) {
|
7
|
+
'use strict';
|
8
|
+
|
9
|
+
$.fn.twittie = function () {
|
10
|
+
var options = (arguments[0] instanceof Object) ? arguments[0] : {},
|
11
|
+
callback = (typeof arguments[0] === 'function') ? arguments[0] : arguments[1];
|
12
|
+
|
13
|
+
// Default settings
|
14
|
+
var settings = $.extend({
|
15
|
+
'username': null,
|
16
|
+
'list': null,
|
17
|
+
'hashtag': null,
|
18
|
+
'count': 10,
|
19
|
+
'hideReplies': false,
|
20
|
+
'dateFormat': '%b/%d/%Y',
|
21
|
+
'template': '{{date}} - {{tweet}}',
|
22
|
+
'apiPath' : 'assets/api/tweet.php',
|
23
|
+
'loadingText': 'Loading...'
|
24
|
+
}, options);
|
25
|
+
|
26
|
+
if (settings.list && !settings.username) {
|
27
|
+
$.error('If you want to fetch tweets from a list, you must define the username of the list owner.');
|
28
|
+
}
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Applies @reply, #hash and http links
|
32
|
+
* @param {String} tweet A single tweet
|
33
|
+
* @return {String} Fixed tweet
|
34
|
+
*
|
35
|
+
* Thanks to @Wachem enhanced linking.
|
36
|
+
*/
|
37
|
+
var linking = function (tweet) {
|
38
|
+
var twit = tweet.replace(/(https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/ig,'<a href="$1" target="_blank" title="Visit this link">$1</a>')
|
39
|
+
.replace(/#([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/search?q=%23$1&src=hash" target="_blank" title="Search for #$1">#$1</a>')
|
40
|
+
.replace(/@([a-zA-Z0-9_]+)/g,'<a href="https://twitter.com/$1" target="_blank" title="$1 on Twitter">@$1</a>');
|
41
|
+
|
42
|
+
return twit;
|
43
|
+
};
|
44
|
+
|
45
|
+
/**
|
46
|
+
* Formating a date
|
47
|
+
* @param {String} twt_date Twitter date
|
48
|
+
* @return {String} Formatted date
|
49
|
+
*/
|
50
|
+
var dating = function (twt_date) {
|
51
|
+
// fix for IE
|
52
|
+
var time = twt_date.split(' ');
|
53
|
+
twt_date = new Date(Date.parse(time[1] + ' ' + time[2] + ', ' + time[5] + ' ' + time[3] + ' UTC'));
|
54
|
+
|
55
|
+
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
56
|
+
|
57
|
+
var _date = {
|
58
|
+
'%d': twt_date.getDate(),
|
59
|
+
'%m': twt_date.getMonth()+1,
|
60
|
+
'%b': months[twt_date.getMonth()].substr(0, 3),
|
61
|
+
'%B': months[twt_date.getMonth()],
|
62
|
+
'%y': String(twt_date.getFullYear()).slice(-2),
|
63
|
+
'%Y': twt_date.getFullYear()
|
64
|
+
};
|
65
|
+
|
66
|
+
var date = settings.dateFormat;
|
67
|
+
var format = settings.dateFormat.match(/%[dmbByY]/g);
|
68
|
+
|
69
|
+
for (var i = 0, len = format.length; i < len; i++) {
|
70
|
+
date = date.replace(format[i], _date[format[i]]);
|
71
|
+
}
|
72
|
+
|
73
|
+
return date;
|
74
|
+
};
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Templating a tweet using '{{ }}' braces
|
78
|
+
* @param {Object} data Tweet details are passed
|
79
|
+
* @return {String} Templated string
|
80
|
+
*/
|
81
|
+
var templating = function (data) {
|
82
|
+
var temp = settings.template;
|
83
|
+
var temp_variables = ['date', 'tweet', 'avatar', 'url', 'retweeted', 'screen_name', 'user_name'];
|
84
|
+
|
85
|
+
for (var i = 0, len = temp_variables.length; i < len; i++) {
|
86
|
+
temp = temp.replace(new RegExp('{{' + temp_variables[i] + '}}', 'gi'), data[temp_variables[i]]);
|
87
|
+
}
|
88
|
+
|
89
|
+
return temp;
|
90
|
+
};
|
91
|
+
|
92
|
+
// Set loading
|
93
|
+
this.html('<span>'+settings.loadingText+'</span>');
|
94
|
+
|
95
|
+
var that = this;
|
96
|
+
|
97
|
+
// Fetch tweets
|
98
|
+
$.getJSON(settings.apiPath, { username: settings.username, list: settings.list, hashtag: settings.hashtag, count: settings.count, exclude_replies: settings.hideReplies }, function (twt) {
|
99
|
+
that.find('span').fadeOut('fast', function () {
|
100
|
+
that.html('<ul></ul>');
|
101
|
+
|
102
|
+
for (var i = 0; i < settings.count; i++) {
|
103
|
+
var tweet = false;
|
104
|
+
if(twt[i]) {
|
105
|
+
tweet = twt[i];
|
106
|
+
} else if(twt.statuses !== undefined && twt.statuses[i]) {
|
107
|
+
tweet = twt.statuses[i];
|
108
|
+
} else {
|
109
|
+
break;
|
110
|
+
}
|
111
|
+
|
112
|
+
var temp_data = {
|
113
|
+
user_name: tweet.user.name,
|
114
|
+
date: dating(tweet.created_at),
|
115
|
+
tweet: (tweet.retweeted) ? linking('RT @'+ tweet.user.screen_name +': '+ tweet.retweeted_status.text) : linking(tweet.text),
|
116
|
+
avatar: '<img src="'+ tweet.user.profile_image_url +'" />',
|
117
|
+
url: 'https://twitter.com/' + tweet.user.screen_name + '/status/' + tweet.id_str,
|
118
|
+
retweeted: tweet.retweeted,
|
119
|
+
screen_name: linking('@'+ tweet.user.screen_name)
|
120
|
+
};
|
121
|
+
|
122
|
+
that.find('ul').append('<li>' + templating(temp_data) + '</li>');
|
123
|
+
}
|
124
|
+
|
125
|
+
if (typeof callback === 'function') { callback(); }
|
126
|
+
});
|
127
|
+
});
|
128
|
+
};
|
129
|
+
|
130
|
+
})(jQuery);
|
@@ -0,0 +1,66 @@
|
|
1
|
+
let monthproducts = [
|
2
|
+
|
3
|
+
{
|
4
|
+
name : 'WordPress Solo',
|
5
|
+
price : '$40.00',
|
6
|
+
desc : 'Solo site package created especially for entrepreneurs, bloggers, writers, business professionals, business/lifestyle coaches and small businesses starting out.',
|
7
|
+
|
8
|
+
ram : '1 GB',
|
9
|
+
processor: '1 Core',
|
10
|
+
storage: '25 GB',
|
11
|
+
|
12
|
+
bandwidth: '1 TB' ,
|
13
|
+
sites: '2 Max',
|
14
|
+
databases: '2 Max',
|
15
|
+
|
16
|
+
setup: 'Included',
|
17
|
+
migration: 'Included',
|
18
|
+
ssl: 'Included',
|
19
|
+
|
20
|
+
urlclass: 'http://whmcs.finesttheme.com/cart.php?a=add&pid=3'
|
21
|
+
},
|
22
|
+
|
23
|
+
{
|
24
|
+
name : 'WordPress Business',
|
25
|
+
price : '$60.00',
|
26
|
+
desc : 'Multiple site package for medium to larger businesses and startups that require a bit more resources to handle traffic, sales funnels to meet their demand.',
|
27
|
+
|
28
|
+
ram : '2 GB',
|
29
|
+
processor: '1 Core',
|
30
|
+
storage: '50 GB',
|
31
|
+
|
32
|
+
bandwidth: '2 TB' ,
|
33
|
+
sites: '4 Included',
|
34
|
+
databases: '4 Included',
|
35
|
+
|
36
|
+
setup: 'Included',
|
37
|
+
migration: 'Included',
|
38
|
+
ssl: 'Included',
|
39
|
+
|
40
|
+
urlclass: 'http://whmcs.finesttheme.com/cart.php?a=add&pid=3'
|
41
|
+
},
|
42
|
+
|
43
|
+
{
|
44
|
+
name : 'WordPress Enterprise',
|
45
|
+
price : '$80.00',
|
46
|
+
desc : 'Multiple site package for enterprises, education institutions or organizations with resource intensive WordPress sites with plugins like learning management systems and memberships sites.',
|
47
|
+
|
48
|
+
ram : '4 GB',
|
49
|
+
processor: '2 Core',
|
50
|
+
storage: '.5 TB',
|
51
|
+
|
52
|
+
bandwidth: '1 GB' ,
|
53
|
+
sites: '10 Included',
|
54
|
+
databases: '10 Included',
|
55
|
+
|
56
|
+
setup: 'Included',
|
57
|
+
migration: 'Included',
|
58
|
+
ssl: 'Included',
|
59
|
+
|
60
|
+
urlclass: 'http://whmcs.finesttheme.com/cart.php?a=add&pid=3'
|
61
|
+
},
|
62
|
+
|
63
|
+
];
|
64
|
+
|
65
|
+
// let url = 'https://www.domainname.com/?cmd=cart&id=';
|
66
|
+
// $('.slider-btns').attr('href', url + sliderplans[1][ui.value-1]);
|
@@ -0,0 +1,134 @@
|
|
1
|
+
// PHC- Start Month Function
|
2
|
+
(function($) {
|
3
|
+
|
4
|
+
"use strict";
|
5
|
+
$(document).ready(function() {
|
6
|
+
|
7
|
+
if ($(".vps-slider-monthly").length > 0) {
|
8
|
+
|
9
|
+
let $this = $(".vps-slider-monthly");
|
10
|
+
let sliderplans = [];
|
11
|
+
|
12
|
+
// Title
|
13
|
+
sliderplans[0] = [monthproducts[0].name, monthproducts[1].name, monthproducts[2].name, monthproducts[3].name, monthproducts[4].name];
|
14
|
+
// Price
|
15
|
+
sliderplans[1] = [monthproducts[0].price, monthproducts[1].price, monthproducts[2].price, monthproducts[3].price, monthproducts[4].price];
|
16
|
+
// Description
|
17
|
+
sliderplans[2] = [monthproducts[0].desc, monthproducts[1].desc, monthproducts[2].desc, monthproducts[3].desc, monthproducts[4].desc];
|
18
|
+
|
19
|
+
// Ram
|
20
|
+
sliderplans[3] = [monthproducts[0].ram, monthproducts[1].ram, monthproducts[2].ram, monthproducts[3].ram, monthproducts[4].ram];
|
21
|
+
// Processor
|
22
|
+
sliderplans[4] = [monthproducts[0].processor, monthproducts[1].processor, monthproducts[2].processor, monthproducts[3].processor, monthproducts[4].processor];
|
23
|
+
// Storage
|
24
|
+
sliderplans[5] = [monthproducts[0].storage, monthproducts[1].storage, monthproducts[2].storage, monthproducts[3].storage, monthproducts[4].storage];
|
25
|
+
|
26
|
+
// Bandwidth
|
27
|
+
sliderplans[6] = [monthproducts[0].bandwidth, monthproducts[1].bandwidth, monthproducts[2].bandwidth, monthproducts[3].bandwidth, monthproducts[4].bandwidth];
|
28
|
+
// sites
|
29
|
+
sliderplans[7] = [monthproducts[0].sites, monthproducts[1].sites, monthproducts[2].sites, monthproducts[3].sites, monthproducts[4].sites];
|
30
|
+
// Databases
|
31
|
+
sliderplans[8] = [monthproducts[0].databases, monthproducts[1].databases, monthproducts[2].databases, monthproducts[3].databases, monthproducts[4].databases];
|
32
|
+
|
33
|
+
// Setup
|
34
|
+
sliderplans[9] = [monthproducts[0].setup, monthproducts[1].setup, monthproducts[2].setup, monthproducts[3].setup, monthproducts[4].setup];
|
35
|
+
|
36
|
+
// ip one
|
37
|
+
sliderplans[10] = [monthproducts[0].migration, monthproducts[1].migration, monthproducts[2].migration, monthproducts[3].migration, monthproducts[4].migration];
|
38
|
+
|
39
|
+
// ip two
|
40
|
+
sliderplans[11] = [monthproducts[0].ssl, monthproducts[1].ssl, monthproducts[2].ssl, monthproducts[3].ssl, monthproducts[4].ssl];
|
41
|
+
|
42
|
+
let urlClass = [monthproducts[0].urlclass, monthproducts[1].urlclass, monthproducts[2].urlclass, monthproducts[3].urlclass, monthproducts[4].urlclass];
|
43
|
+
let currentplan = 1;
|
44
|
+
|
45
|
+
$this.xsslide('single', sliderplans, currentplan, 'xs', 'horizontal');
|
46
|
+
$this.slider({
|
47
|
+
|
48
|
+
animate: true,
|
49
|
+
slide: function( event, ui ) {
|
50
|
+
|
51
|
+
// Title
|
52
|
+
$('.slider-container .title').html(sliderplans[0][ui.value-1]);
|
53
|
+
// Price
|
54
|
+
$('.slider-container .price').html(sliderplans[1][ui.value-1]);
|
55
|
+
// Description
|
56
|
+
$('.slider-container .desc').html(sliderplans[2][ui.value-1]);
|
57
|
+
|
58
|
+
// Ram
|
59
|
+
$('.vps-pricing-list .ram').html(sliderplans[3][ui.value-1]);
|
60
|
+
// Processor
|
61
|
+
$('.vps-pricing-list .processor').html(sliderplans[4][ui.value-1]);
|
62
|
+
// Storage
|
63
|
+
$('.vps-pricing-list .storage').html(sliderplans[5][ui.value-1]);
|
64
|
+
|
65
|
+
// Bandwidth
|
66
|
+
$('.vps-pricing-list .bandwidth').html(sliderplans[6][ui.value-1]);
|
67
|
+
// sites
|
68
|
+
$('.vps-pricing-list .sites').html(sliderplans[7][ui.value-1]);
|
69
|
+
// Databases
|
70
|
+
$('.vps-pricing-list .databases').html(sliderplans[8][ui.value-1]);
|
71
|
+
|
72
|
+
// sites
|
73
|
+
$('.vps-pricing-list .sites').html(sliderplans[9][ui.value-1]);
|
74
|
+
// Migration
|
75
|
+
$('.vps-pricing-list .migration').html(sliderplans[10][ui.value-1]);
|
76
|
+
// SSL
|
77
|
+
$('.vps-pricing-list .ssl').html(sliderplans[11][ui.value-1]);
|
78
|
+
|
79
|
+
// Buttons
|
80
|
+
$('.slider-btns').attr('href', urilink[ui.value-1]);
|
81
|
+
|
82
|
+
},
|
83
|
+
change: function( event, ui ) {
|
84
|
+
|
85
|
+
// Title
|
86
|
+
$('.slider-container .title').html(sliderplans[0][ui.value-1]);
|
87
|
+
// Price
|
88
|
+
$('.slider-container .price').html(sliderplans[1][ui.value-1]);
|
89
|
+
// Description
|
90
|
+
$('.slider-container .desc').html(sliderplans[2][ui.value-1]);
|
91
|
+
|
92
|
+
// Ram
|
93
|
+
$('.vps-pricing-list .ram').html(sliderplans[3][ui.value-1]);
|
94
|
+
// Processor
|
95
|
+
$('.vps-pricing-list .processor').html(sliderplans[4][ui.value-1]);
|
96
|
+
// Storage
|
97
|
+
$('.vps-pricing-list .storage').html(sliderplans[5][ui.value-1]);
|
98
|
+
|
99
|
+
// Bandwidth
|
100
|
+
$('.vps-pricing-list .bandwidth').html(sliderplans[6][ui.value-1]);
|
101
|
+
// sites
|
102
|
+
$('.vps-pricing-list .sites').html(sliderplans[7][ui.value-1]);
|
103
|
+
// Databases
|
104
|
+
$('.vps-pricing-list .databases').html(sliderplans[8][ui.value-1]);
|
105
|
+
|
106
|
+
// Steup
|
107
|
+
$('.vps-pricing-list .setup').html(sliderplans[9][ui.value-1]);
|
108
|
+
// Migration
|
109
|
+
$('.vps-pricing-list .migration').html(sliderplans[10][ui.value-1]);
|
110
|
+
// SSL
|
111
|
+
$('.vps-pricing-list .ssl').html(sliderplans[11][ui.value-1]);
|
112
|
+
|
113
|
+
// Buttons
|
114
|
+
$('.slider-btns').attr('href', urlClass[ui.value-1]);
|
115
|
+
|
116
|
+
}
|
117
|
+
});
|
118
|
+
}
|
119
|
+
|
120
|
+
$('.slider-tigger-monthly').click(function() {
|
121
|
+
var value= parseInt(this.id.slice(5)) + 1;
|
122
|
+
$('.vps-slider-monthly').slider('value', value);
|
123
|
+
if (!$(this).hasClass('current')) {
|
124
|
+
$(this).addClass('current');
|
125
|
+
$(this).nextAll().removeClass('current');
|
126
|
+
$(this).prevAll().removeClass('current');
|
127
|
+
} else {
|
128
|
+
$(this).removeClass('current');
|
129
|
+
}
|
130
|
+
});
|
131
|
+
|
132
|
+
});
|
133
|
+
|
134
|
+
})(jQuery);
|