Add initial Laravel project files
This commit is contained in:
6
public/js/bootstrap.min.js
vendored
Normal file
6
public/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/js/jquery-3.3.1.min.js
vendored
Normal file
2
public/js/jquery-3.3.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
22
public/js/jquery.countdown.min.js
vendored
Normal file
22
public/js/jquery.countdown.min.js
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
|
||||
* Copyright (c) 2016 Edson Hilios
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.firstTick=!0,this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var a,b=new Date;return a=this.finalDate.getTime()-b.getTime(),a=Math.ceil(a/1e3),a=!this.options.elapse&&a<0?0:Math.abs(a),this.totalSecsLeft===a||this.firstTick?void(this.firstTick=!1):(this.totalSecsLeft=a,this.elapsed=b>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-b.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},void(this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish"))))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
|
4
public/js/jquery.magnific-popup.min.js
vendored
Normal file
4
public/js/jquery.magnific-popup.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
public/js/jquery.nice-select.min.js
vendored
Normal file
4
public/js/jquery.nice-select.min.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/* jQuery Nice Select - v1.0
|
||||
https://github.com/hernansartorio/jquery-nice-select
|
||||
Made by Hernán Sartorio */
|
||||
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
|
2
public/js/jquery.nicescroll.min.js
vendored
Normal file
2
public/js/jquery.nicescroll.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
584
public/js/jquery.slicknav.js
Normal file
584
public/js/jquery.slicknav.js
Normal file
@ -0,0 +1,584 @@
|
||||
;(function ($, document, window) {
|
||||
var
|
||||
// default settings object.
|
||||
defaults = {
|
||||
label: 'MENU',
|
||||
duplicate: true,
|
||||
duration: 200,
|
||||
easingOpen: 'swing',
|
||||
easingClose: 'swing',
|
||||
closedSymbol: '►',
|
||||
openedSymbol: '▼',
|
||||
prependTo: 'body',
|
||||
appendTo: '',
|
||||
parentTag: 'a',
|
||||
closeOnClick: false,
|
||||
allowParentLinks: false,
|
||||
nestedParentLinks: true,
|
||||
showChildren: false,
|
||||
removeIds: true,
|
||||
removeClasses: false,
|
||||
removeStyles: false,
|
||||
brand: '',
|
||||
animations: 'jquery',
|
||||
init: function () {},
|
||||
beforeOpen: function () {},
|
||||
beforeClose: function () {},
|
||||
afterOpen: function () {},
|
||||
afterClose: function () {}
|
||||
},
|
||||
mobileMenu = 'slicknav',
|
||||
prefix = 'slicknav',
|
||||
|
||||
Keyboard = {
|
||||
DOWN: 40,
|
||||
ENTER: 13,
|
||||
ESCAPE: 27,
|
||||
LEFT: 37,
|
||||
RIGHT: 39,
|
||||
SPACE: 32,
|
||||
TAB: 9,
|
||||
UP: 38,
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
this.element = element;
|
||||
|
||||
// jQuery has an extend method which merges the contents of two or
|
||||
// more objects, storing the result in the first object. The first object
|
||||
// is generally empty as we don't want to alter the default options for
|
||||
// future instances of the plugin
|
||||
this.settings = $.extend({}, defaults, options);
|
||||
|
||||
// Don't remove IDs by default if duplicate is false
|
||||
if (!this.settings.duplicate && !options.hasOwnProperty("removeIds")) {
|
||||
this.settings.removeIds = false;
|
||||
}
|
||||
|
||||
this._defaults = defaults;
|
||||
this._name = mobileMenu;
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
Plugin.prototype.init = function () {
|
||||
var $this = this,
|
||||
menu = $(this.element),
|
||||
settings = this.settings,
|
||||
iconClass,
|
||||
menuBar;
|
||||
|
||||
// clone menu if needed
|
||||
if (settings.duplicate) {
|
||||
$this.mobileNav = menu.clone();
|
||||
} else {
|
||||
$this.mobileNav = menu;
|
||||
}
|
||||
|
||||
// remove IDs if set
|
||||
if (settings.removeIds) {
|
||||
$this.mobileNav.removeAttr('id');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('id');
|
||||
});
|
||||
}
|
||||
|
||||
// remove classes if set
|
||||
if (settings.removeClasses) {
|
||||
$this.mobileNav.removeAttr('class');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('class');
|
||||
});
|
||||
}
|
||||
|
||||
// remove styles if set
|
||||
if (settings.removeStyles) {
|
||||
$this.mobileNav.removeAttr('style');
|
||||
$this.mobileNav.find('*').each(function (i, e) {
|
||||
$(e).removeAttr('style');
|
||||
});
|
||||
}
|
||||
|
||||
// styling class for the button
|
||||
iconClass = prefix + '_icon';
|
||||
|
||||
if (settings.label === '') {
|
||||
iconClass += ' ' + prefix + '_no-text';
|
||||
}
|
||||
|
||||
if (settings.parentTag == 'a') {
|
||||
settings.parentTag = 'a href="#"';
|
||||
}
|
||||
|
||||
// create menu bar
|
||||
$this.mobileNav.attr('class', prefix + '_nav');
|
||||
menuBar = $('<div class="' + prefix + '_menu"></div>');
|
||||
if (settings.brand !== '') {
|
||||
var brand = $('<div class="' + prefix + '_brand">'+settings.brand+'</div>');
|
||||
$(menuBar).append(brand);
|
||||
}
|
||||
$this.btn = $(
|
||||
['<' + settings.parentTag + ' aria-haspopup="true" role="button" tabindex="0" class="' + prefix + '_btn ' + prefix + '_collapsed">',
|
||||
'<span class="' + prefix + '_menutxt">' + settings.label + '</span>',
|
||||
'<span class="' + iconClass + '">',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'<span class="' + prefix + '_icon-bar"></span>',
|
||||
'</span>',
|
||||
'</' + settings.parentTag + '>'
|
||||
].join('')
|
||||
);
|
||||
$(menuBar).append($this.btn);
|
||||
if(settings.appendTo !== '') {
|
||||
$(settings.appendTo).append(menuBar);
|
||||
} else {
|
||||
$(settings.prependTo).prepend(menuBar);
|
||||
}
|
||||
menuBar.append($this.mobileNav);
|
||||
|
||||
// iterate over structure adding additional structure
|
||||
var items = $this.mobileNav.find('li');
|
||||
$(items).each(function () {
|
||||
var item = $(this),
|
||||
data = {};
|
||||
data.children = item.children('ul').attr('role', 'menu');
|
||||
item.data('menu', data);
|
||||
|
||||
// if a list item has a nested menu
|
||||
if (data.children.length > 0) {
|
||||
|
||||
// select all text before the child menu
|
||||
// check for anchors
|
||||
|
||||
var a = item.contents(),
|
||||
containsAnchor = false,
|
||||
nodes = [];
|
||||
|
||||
$(a).each(function () {
|
||||
if (!$(this).is('ul')) {
|
||||
nodes.push(this);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($(this).is("a")) {
|
||||
containsAnchor = true;
|
||||
}
|
||||
});
|
||||
|
||||
var wrapElement = $(
|
||||
'<' + settings.parentTag + ' role="menuitem" aria-haspopup="true" tabindex="-1" class="' + prefix + '_item"/>'
|
||||
);
|
||||
|
||||
// wrap item text with tag and add classes unless we are separating parent links
|
||||
if ((!settings.allowParentLinks || settings.nestedParentLinks) || !containsAnchor) {
|
||||
var $wrap = $(nodes).wrapAll(wrapElement).parent();
|
||||
$wrap.addClass(prefix+'_row');
|
||||
} else
|
||||
$(nodes).wrapAll('<span class="'+prefix+'_parent-link '+prefix+'_row"/>').parent();
|
||||
|
||||
if (!settings.showChildren) {
|
||||
item.addClass(prefix+'_collapsed');
|
||||
} else {
|
||||
item.addClass(prefix+'_open');
|
||||
}
|
||||
|
||||
item.addClass(prefix+'_parent');
|
||||
|
||||
// create parent arrow. wrap with link if parent links and separating
|
||||
var arrowElement = $('<span class="'+prefix+'_arrow">'+(settings.showChildren?settings.openedSymbol:settings.closedSymbol)+'</span>');
|
||||
|
||||
if (settings.allowParentLinks && !settings.nestedParentLinks && containsAnchor)
|
||||
arrowElement = arrowElement.wrap(wrapElement).parent();
|
||||
|
||||
//append arrow
|
||||
$(nodes).last().after(arrowElement);
|
||||
|
||||
|
||||
} else if ( item.children().length === 0) {
|
||||
item.addClass(prefix+'_txtnode');
|
||||
}
|
||||
|
||||
// accessibility for links
|
||||
item.children('a').attr('role', 'menuitem').click(function(event){
|
||||
//Ensure that it's not a parent
|
||||
if (settings.closeOnClick && !$(event.target).parent().closest('li').hasClass(prefix+'_parent')) {
|
||||
//Emulate menu close if set
|
||||
$($this.btn).click();
|
||||
}
|
||||
});
|
||||
|
||||
//also close on click if parent links are set
|
||||
if (settings.closeOnClick && settings.allowParentLinks) {
|
||||
item.children('a').children('a').click(function (event) {
|
||||
//Emulate menu close
|
||||
$($this.btn).click();
|
||||
});
|
||||
|
||||
item.find('.'+prefix+'_parent-link a:not(.'+prefix+'_item)').click(function(event){
|
||||
//Emulate menu close
|
||||
$($this.btn).click();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// structure is in place, now hide appropriate items
|
||||
$(items).each(function () {
|
||||
var data = $(this).data('menu');
|
||||
if (!settings.showChildren){
|
||||
$this._visibilityToggle(data.children, null, false, null, true);
|
||||
}
|
||||
});
|
||||
|
||||
// finally toggle entire menu
|
||||
$this._visibilityToggle($this.mobileNav, null, false, 'init', true);
|
||||
|
||||
// accessibility for menu button
|
||||
$this.mobileNav.attr('role','menu');
|
||||
|
||||
// outline prevention when using mouse
|
||||
$(document).mousedown(function(){
|
||||
$this._outlines(false);
|
||||
});
|
||||
|
||||
$(document).keyup(function(){
|
||||
$this._outlines(true);
|
||||
});
|
||||
|
||||
// menu button click
|
||||
$($this.btn).click(function (e) {
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
});
|
||||
|
||||
// click on menu parent
|
||||
$this.mobileNav.on('click', '.' + prefix + '_item', function (e) {
|
||||
e.preventDefault();
|
||||
$this._itemClick($(this));
|
||||
});
|
||||
|
||||
// check for keyboard events on menu button and menu parents
|
||||
$($this.btn).keydown(function (e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
case Keyboard.SPACE:
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
if (ev.keyCode !== Keyboard.DOWN || !$($this.btn).hasClass(prefix+'_open')){
|
||||
$this._menuToggle();
|
||||
}
|
||||
|
||||
$($this.btn).next().find('[role="menuitem"]').first().focus();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '.'+prefix+'_item', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode) {
|
||||
case Keyboard.ENTER:
|
||||
e.preventDefault();
|
||||
$this._itemClick($(e.target));
|
||||
break;
|
||||
case Keyboard.RIGHT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().hasClass(prefix+'_collapsed')) {
|
||||
$this._itemClick($(e.target));
|
||||
}
|
||||
$(e.target).next().find('[role="menuitem"]').first().focus();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$this.mobileNav.on('keydown', '[role="menuitem"]', function(e) {
|
||||
var ev = e || event;
|
||||
|
||||
switch(ev.keyCode){
|
||||
case Keyboard.DOWN:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var nextIdx = idx + 1;
|
||||
if (allItems.length <= nextIdx) {
|
||||
nextIdx = 0;
|
||||
}
|
||||
var next = allItems.eq( nextIdx );
|
||||
next.focus();
|
||||
break;
|
||||
case Keyboard.UP:
|
||||
e.preventDefault();
|
||||
var allItems = $(e.target).parent().parent().children().children('[role="menuitem"]:visible');
|
||||
var idx = allItems.index( e.target );
|
||||
var next = allItems.eq( idx - 1 );
|
||||
next.focus();
|
||||
break;
|
||||
case Keyboard.LEFT:
|
||||
e.preventDefault();
|
||||
if ($(e.target).parent().parent().parent().hasClass(prefix+'_open')) {
|
||||
var parent = $(e.target).parent().parent().prev();
|
||||
parent.focus();
|
||||
$this._itemClick(parent);
|
||||
} else if ($(e.target).parent().parent().hasClass(prefix+'_nav')){
|
||||
$this._menuToggle();
|
||||
$($this.btn).focus();
|
||||
}
|
||||
break;
|
||||
case Keyboard.ESCAPE:
|
||||
e.preventDefault();
|
||||
$this._menuToggle();
|
||||
$($this.btn).focus();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
// allow links clickable within parent tags if set
|
||||
if (settings.allowParentLinks && settings.nestedParentLinks) {
|
||||
$('.'+prefix+'_item a').click(function(e){
|
||||
e.stopImmediatePropagation();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//toggle menu
|
||||
Plugin.prototype._menuToggle = function (el) {
|
||||
var $this = this;
|
||||
var btn = $this.btn;
|
||||
var mobileNav = $this.mobileNav;
|
||||
|
||||
if (btn.hasClass(prefix+'_collapsed')) {
|
||||
btn.removeClass(prefix+'_collapsed');
|
||||
btn.addClass(prefix+'_open');
|
||||
} else {
|
||||
btn.removeClass(prefix+'_open');
|
||||
btn.addClass(prefix+'_collapsed');
|
||||
}
|
||||
btn.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(mobileNav, btn.parent(), true, btn);
|
||||
};
|
||||
|
||||
// toggle clicked items
|
||||
Plugin.prototype._itemClick = function (el) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var data = el.data('menu');
|
||||
if (!data) {
|
||||
data = {};
|
||||
data.arrow = el.children('.'+prefix+'_arrow');
|
||||
data.ul = el.next('ul');
|
||||
data.parent = el.parent();
|
||||
//Separated parent link structure
|
||||
if (data.parent.hasClass(prefix+'_parent-link')) {
|
||||
data.parent = el.parent().parent();
|
||||
data.ul = el.parent().next('ul');
|
||||
}
|
||||
el.data('menu', data);
|
||||
}
|
||||
if (data.parent.hasClass(prefix+'_collapsed')) {
|
||||
data.arrow.html(settings.openedSymbol);
|
||||
data.parent.removeClass(prefix+'_collapsed');
|
||||
data.parent.addClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
} else {
|
||||
data.arrow.html(settings.closedSymbol);
|
||||
data.parent.addClass(prefix+'_collapsed');
|
||||
data.parent.removeClass(prefix+'_open');
|
||||
data.parent.addClass(prefix+'_animating');
|
||||
$this._visibilityToggle(data.ul, data.parent, true, el);
|
||||
}
|
||||
};
|
||||
|
||||
// toggle actual visibility and accessibility tags
|
||||
Plugin.prototype._visibilityToggle = function(el, parent, animate, trigger, init) {
|
||||
var $this = this;
|
||||
var settings = $this.settings;
|
||||
var items = $this._getActionItems(el);
|
||||
var duration = 0;
|
||||
if (animate) {
|
||||
duration = settings.duration;
|
||||
}
|
||||
|
||||
function afterOpen(trigger, parent) {
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire afterOpen callback
|
||||
if (!init) {
|
||||
settings.afterOpen(trigger);
|
||||
}
|
||||
}
|
||||
|
||||
function afterClose(trigger, parent) {
|
||||
el.attr('aria-hidden','true');
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(el, true);
|
||||
el.hide(); //jQuery 1.7 bug fix
|
||||
|
||||
$(trigger).removeClass(prefix+'_animating');
|
||||
$(parent).removeClass(prefix+'_animating');
|
||||
|
||||
//Fire init or afterClose callback
|
||||
if (!init){
|
||||
settings.afterClose(trigger);
|
||||
} else if (trigger == 'init'){
|
||||
settings.init();
|
||||
}
|
||||
}
|
||||
|
||||
if (el.hasClass(prefix+'_hidden')) {
|
||||
el.removeClass(prefix+'_hidden');
|
||||
//Fire beforeOpen callback
|
||||
if (!init) {
|
||||
settings.beforeOpen(trigger);
|
||||
}
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideDown(duration, settings.easingOpen, function(){
|
||||
afterOpen(trigger, parent);
|
||||
});
|
||||
} else if(settings.animations === 'velocity') {
|
||||
el.velocity("finish").velocity("slideDown", {
|
||||
duration: duration,
|
||||
easing: settings.easingOpen,
|
||||
complete: function() {
|
||||
afterOpen(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
el.attr('aria-hidden','false');
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(el, false);
|
||||
} else {
|
||||
el.addClass(prefix+'_hidden');
|
||||
|
||||
//Fire init or beforeClose callback
|
||||
if (!init){
|
||||
settings.beforeClose(trigger);
|
||||
}
|
||||
|
||||
if (settings.animations === 'jquery') {
|
||||
el.stop(true,true).slideUp(duration, this.settings.easingClose, function() {
|
||||
afterClose(trigger, parent)
|
||||
});
|
||||
} else if (settings.animations === 'velocity') {
|
||||
|
||||
el.velocity("finish").velocity("slideUp", {
|
||||
duration: duration,
|
||||
easing: settings.easingClose,
|
||||
complete: function() {
|
||||
afterClose(trigger, parent);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// set attributes of element and children based on visibility
|
||||
Plugin.prototype._setVisAttr = function(el, hidden) {
|
||||
var $this = this;
|
||||
|
||||
// select all parents that aren't hidden
|
||||
var nonHidden = el.children('li').children('ul').not('.'+prefix+'_hidden');
|
||||
|
||||
// iterate over all items setting appropriate tags
|
||||
if (!hidden) {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','false');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '0');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
} else {
|
||||
nonHidden.each(function(){
|
||||
var ul = $(this);
|
||||
ul.attr('aria-hidden','true');
|
||||
var items = $this._getActionItems(ul);
|
||||
items.attr('tabindex', '-1');
|
||||
$this._setVisAttr(ul, hidden);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// get all 1st level items that are clickable
|
||||
Plugin.prototype._getActionItems = function(el) {
|
||||
var data = el.data("menu");
|
||||
if (!data) {
|
||||
data = {};
|
||||
var items = el.children('li');
|
||||
var anchors = items.find('a');
|
||||
data.links = anchors.add(items.find('.'+prefix+'_item'));
|
||||
el.data('menu', data);
|
||||
}
|
||||
return data.links;
|
||||
};
|
||||
|
||||
Plugin.prototype._outlines = function(state) {
|
||||
if (!state) {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','none');
|
||||
} else {
|
||||
$('.'+prefix+'_item, .'+prefix+'_btn').css('outline','');
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.toggle = function(){
|
||||
var $this = this;
|
||||
$this._menuToggle();
|
||||
};
|
||||
|
||||
Plugin.prototype.open = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_collapsed')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
Plugin.prototype.close = function(){
|
||||
var $this = this;
|
||||
if ($this.btn.hasClass(prefix+'_open')) {
|
||||
$this._menuToggle();
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[mobileMenu] = function ( options ) {
|
||||
var args = arguments;
|
||||
|
||||
// Is the first parameter an object (options), or was omitted, instantiate a new instance
|
||||
if (options === undefined || typeof options === 'object') {
|
||||
return this.each(function () {
|
||||
|
||||
// Only allow the plugin to be instantiated once due to methods
|
||||
if (!$.data(this, 'plugin_' + mobileMenu)) {
|
||||
|
||||
// if it has no instance, create a new one, pass options to our plugin constructor,
|
||||
// and store the plugin instance in the elements jQuery data object.
|
||||
$.data(this, 'plugin_' + mobileMenu, new Plugin( this, options ));
|
||||
}
|
||||
});
|
||||
|
||||
// If is a string and doesn't start with an underscore or 'init' function, treat this as a call to a public method.
|
||||
} else if (typeof options === 'string' && options[0] !== '_' && options !== 'init') {
|
||||
|
||||
// Cache the method call to make it possible to return a value
|
||||
var returns;
|
||||
|
||||
this.each(function () {
|
||||
var instance = $.data(this, 'plugin_' + mobileMenu);
|
||||
|
||||
// Tests that there's already a plugin-instance and checks that the requested public method exists
|
||||
if (instance instanceof Plugin && typeof instance[options] === 'function') {
|
||||
|
||||
// Call the method of our plugin instance, and pass it the supplied arguments.
|
||||
returns = instance[options].apply( instance, Array.prototype.slice.call( args, 1 ) );
|
||||
}
|
||||
});
|
||||
|
||||
// If the earlier cached method gives a value back return the value, otherwise return this to preserve chainability.
|
||||
return returns !== undefined ? returns : this;
|
||||
}
|
||||
};
|
||||
}(jQuery, document, window));
|
216
public/js/main.js
Normal file
216
public/js/main.js
Normal file
@ -0,0 +1,216 @@
|
||||
/* ---------------------------------------------------
|
||||
Template Name: Male Fashion
|
||||
Description: Male Fashion - ecommerce teplate
|
||||
Author: Colorib
|
||||
Author URI: https://www.colorib.com/
|
||||
Version: 1.0
|
||||
Created: Colorib
|
||||
--------------------------------------------------------- */
|
||||
|
||||
'use strict';
|
||||
|
||||
(function ($) {
|
||||
|
||||
/*------------------
|
||||
Preloader
|
||||
--------------------*/
|
||||
$(window).on('load', function () {
|
||||
$(".loader").fadeOut();
|
||||
$("#preloder").delay(200).fadeOut("slow");
|
||||
|
||||
/*------------------
|
||||
Gallery filter
|
||||
--------------------*/
|
||||
$('.filter__controls li').on('click', function () {
|
||||
$('.filter__controls li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
if ($('.product__filter').length > 0) {
|
||||
var containerEl = document.querySelector('.product__filter');
|
||||
var mixer = mixitup(containerEl);
|
||||
}
|
||||
});
|
||||
|
||||
/*------------------
|
||||
Background Set
|
||||
--------------------*/
|
||||
$('.set-bg').each(function () {
|
||||
var bg = $(this).data('setbg');
|
||||
$(this).css('background-image', 'url(' + bg + ')');
|
||||
});
|
||||
|
||||
//Search Switch
|
||||
$('.search-switch').on('click', function () {
|
||||
$('.search-model').fadeIn(400);
|
||||
});
|
||||
|
||||
$('.search-close-switch').on('click', function () {
|
||||
$('.search-model').fadeOut(400, function () {
|
||||
$('#search-input').val('');
|
||||
});
|
||||
});
|
||||
|
||||
/*------------------
|
||||
Navigation
|
||||
--------------------*/
|
||||
$(".mobile-menu").slicknav({
|
||||
prependTo: '#mobile-menu-wrap',
|
||||
allowParentLinks: true
|
||||
});
|
||||
|
||||
/*------------------
|
||||
Accordin Active
|
||||
--------------------*/
|
||||
$('.collapse').on('shown.bs.collapse', function () {
|
||||
$(this).prev().addClass('active');
|
||||
});
|
||||
|
||||
$('.collapse').on('hidden.bs.collapse', function () {
|
||||
$(this).prev().removeClass('active');
|
||||
});
|
||||
|
||||
//Canvas Menu
|
||||
$(".canvas__open").on('click', function () {
|
||||
$(".offcanvas-menu-wrapper").addClass("active");
|
||||
$(".offcanvas-menu-overlay").addClass("active");
|
||||
});
|
||||
|
||||
$(".offcanvas-menu-overlay").on('click', function () {
|
||||
$(".offcanvas-menu-wrapper").removeClass("active");
|
||||
$(".offcanvas-menu-overlay").removeClass("active");
|
||||
});
|
||||
|
||||
/*-----------------------
|
||||
Hero Slider
|
||||
------------------------*/
|
||||
$(".hero__slider").owlCarousel({
|
||||
loop: true,
|
||||
margin: 0,
|
||||
items: 1,
|
||||
dots: false,
|
||||
nav: true,
|
||||
navText: ["<span class='arrow_left'><span/>", "<span class='arrow_right'><span/>"],
|
||||
animateOut: 'fadeOut',
|
||||
animateIn: 'fadeIn',
|
||||
smartSpeed: 1200,
|
||||
autoHeight: false,
|
||||
autoplay: false
|
||||
});
|
||||
|
||||
/*--------------------------
|
||||
Select
|
||||
----------------------------*/
|
||||
$("select").niceSelect();
|
||||
|
||||
/*-------------------
|
||||
Radio Btn
|
||||
--------------------- */
|
||||
$(".product__color__select label, .shop__sidebar__size label, .product__details__option__size label").on('click', function () {
|
||||
$(".product__color__select label, .shop__sidebar__size label, .product__details__option__size label").removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
/*-------------------
|
||||
Scroll
|
||||
--------------------- */
|
||||
$(".nice-scroll").niceScroll({
|
||||
cursorcolor: "#0d0d0d",
|
||||
cursorwidth: "5px",
|
||||
background: "#e5e5e5",
|
||||
cursorborder: "",
|
||||
autohidemode: true,
|
||||
horizrailenabled: false
|
||||
});
|
||||
|
||||
/*------------------
|
||||
CountDown
|
||||
--------------------*/
|
||||
// For demo preview start
|
||||
var today = new Date();
|
||||
var dd = String(today.getDate()).padStart(2, '0');
|
||||
var mm = String(today.getMonth() + 1).padStart(2, '0'); //January is 0!
|
||||
var yyyy = today.getFullYear();
|
||||
|
||||
if(mm == 12) {
|
||||
mm = '01';
|
||||
yyyy = yyyy + 1;
|
||||
} else {
|
||||
mm = parseInt(mm) + 1;
|
||||
mm = String(mm).padStart(2, '0');
|
||||
}
|
||||
var timerdate = mm + '/' + dd + '/' + yyyy;
|
||||
// For demo preview end
|
||||
|
||||
|
||||
// Uncomment below and use your date //
|
||||
|
||||
/* var timerdate = "2020/12/30" */
|
||||
|
||||
$("#countdown").countdown(timerdate, function (event) {
|
||||
$(this).html(event.strftime("<div class='cd-item'><span>%D</span> <p>Days</p> </div>" + "<div class='cd-item'><span>%H</span> <p>Hours</p> </div>" + "<div class='cd-item'><span>%M</span> <p>Minutes</p> </div>" + "<div class='cd-item'><span>%S</span> <p>Seconds</p> </div>"));
|
||||
});
|
||||
|
||||
/*------------------
|
||||
Magnific
|
||||
--------------------*/
|
||||
$('.video-popup').magnificPopup({
|
||||
type: 'iframe'
|
||||
});
|
||||
|
||||
/*-------------------
|
||||
Quantity change
|
||||
--------------------- */
|
||||
var proQty = $('.pro-qty');
|
||||
proQty.prepend('<span class="fa fa-angle-up dec qtybtn"></span>');
|
||||
proQty.append('<span class="fa fa-angle-down inc qtybtn"></span>');
|
||||
proQty.on('click', '.qtybtn', function () {
|
||||
var $button = $(this);
|
||||
var oldValue = $button.parent().find('input').val();
|
||||
if ($button.hasClass('inc')) {
|
||||
var newVal = parseFloat(oldValue) + 1;
|
||||
} else {
|
||||
// Don't allow decrementing below zero
|
||||
if (oldValue > 0) {
|
||||
var newVal = parseFloat(oldValue) - 1;
|
||||
} else {
|
||||
newVal = 0;
|
||||
}
|
||||
}
|
||||
$button.parent().find('input').val(newVal);
|
||||
});
|
||||
|
||||
var proQty = $('.pro-qty-2');
|
||||
proQty.prepend('<span class="fa fa-angle-left dec qtybtn"></span>');
|
||||
proQty.append('<span class="fa fa-angle-right inc qtybtn"></span>');
|
||||
proQty.on('click', '.qtybtn', function () {
|
||||
var $button = $(this);
|
||||
var oldValue = $button.parent().find('input').val();
|
||||
if ($button.hasClass('inc')) {
|
||||
var newVal = parseFloat(oldValue) + 1;
|
||||
} else {
|
||||
// Don't allow decrementing below zero
|
||||
if (oldValue > 0) {
|
||||
var newVal = parseFloat(oldValue) - 1;
|
||||
} else {
|
||||
newVal = 0;
|
||||
}
|
||||
}
|
||||
$button.parent().find('input').val(newVal);
|
||||
});
|
||||
|
||||
/*------------------
|
||||
Achieve Counter
|
||||
--------------------*/
|
||||
$('.cn_num').each(function () {
|
||||
$(this).prop('Counter', 0).animate({
|
||||
Counter: $(this).text()
|
||||
}, {
|
||||
duration: 4000,
|
||||
easing: 'swing',
|
||||
step: function (now) {
|
||||
$(this).text(Math.ceil(now));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
18
public/js/mixitup.min.js
vendored
Normal file
18
public/js/mixitup.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
public/js/owl.carousel.min.js
vendored
Normal file
7
public/js/owl.carousel.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user