Initial commit
This commit is contained in:
commit
57a2089dd9
1541 changed files with 595392 additions and 0 deletions
165
wp-content/themes/tortuga/assets/js/customize-preview.js
Normal file
165
wp-content/themes/tortuga/assets/js/customize-preview.js
Normal file
|
@ -0,0 +1,165 @@
|
|||
/**
|
||||
* Customizer Live Preview
|
||||
*
|
||||
* Reloads changes on Theme Customizer Preview asynchronously for better usability
|
||||
*
|
||||
* @package Tortuga
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
// Site Title textfield.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-title a' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Site Description textfield.
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Site Title checkbox.
|
||||
wp.customize( 'tortuga_theme_options[site_title]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
hideElement( '.site-title' );
|
||||
} else {
|
||||
showElement( '.site-title' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Site Description checkbox.
|
||||
wp.customize( 'tortuga_theme_options[site_description]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
hideElement( '.site-description' );
|
||||
} else {
|
||||
showElement( '.site-description' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Sidebar Position.
|
||||
wp.customize( 'tortuga_theme_options[layout]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( 'left-sidebar' === newval && false === $( 'body' ).hasClass( 'no-sidebar' ) ) {
|
||||
$( 'body' ).addClass( 'sidebar-left' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'sidebar-left' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Blog Title textfield.
|
||||
wp.customize( 'tortuga_theme_options[blog_title]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.blog-header .blog-title' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Blog Description textfield.
|
||||
wp.customize( 'tortuga_theme_options[blog_description]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.blog-header .blog-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Read More textfield.
|
||||
wp.customize( 'tortuga_theme_options[read_more_text]', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( 'a.more-link' ).text( to );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Date checkbox.
|
||||
wp.customize( 'tortuga_theme_options[meta_date]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
$( 'body' ).addClass( 'date-hidden' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'date-hidden' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Author checkbox.
|
||||
wp.customize( 'tortuga_theme_options[meta_author]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
$( 'body' ).addClass( 'author-hidden' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'author-hidden' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Category checkbox.
|
||||
wp.customize( 'tortuga_theme_options[meta_category]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
$( 'body' ).addClass( 'categories-hidden' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'categories-hidden' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Comments checkbox.
|
||||
wp.customize( 'tortuga_theme_options[meta_comments]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
$( 'body' ).addClass( 'comments-hidden' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'comments-hidden' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Tags checkbox.
|
||||
wp.customize( 'tortuga_theme_options[meta_tags]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
hideElement( '.type-post .entry-footer .entry-tags' );
|
||||
} else {
|
||||
showElement( '.type-post .entry-footer .entry-tags' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Post Navigation checkbox.
|
||||
wp.customize( 'tortuga_theme_options[post_navigation]', function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
if ( false === newval ) {
|
||||
hideElement( '.type-post .entry-footer .post-navigation' );
|
||||
} else {
|
||||
showElement( '.type-post .entry-footer .post-navigation' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
function hideElement( element ) {
|
||||
$( element ).css({
|
||||
clip: 'rect(1px, 1px, 1px, 1px)',
|
||||
position: 'absolute',
|
||||
width: '1px',
|
||||
height: '1px',
|
||||
overflow: 'hidden'
|
||||
});
|
||||
}
|
||||
|
||||
function showElement( element ) {
|
||||
$( element ).css({
|
||||
clip: 'auto',
|
||||
position: 'relative',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
overflow: 'visible'
|
||||
});
|
||||
}
|
||||
|
||||
} )( jQuery );
|
36
wp-content/themes/tortuga/assets/js/customizer-controls.js
Normal file
36
wp-content/themes/tortuga/assets/js/customizer-controls.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* Customizer Controls JS
|
||||
*
|
||||
* Adds Javascript for Customizer Controls.
|
||||
*
|
||||
* @package Tortuga
|
||||
*/
|
||||
|
||||
( function( wp, $ ) {
|
||||
|
||||
// Based on https://make.xwp.co/2016/07/24/dependently-contextual-customizer-controls/
|
||||
wp.customize( 'custom_logo', function( setting ) {
|
||||
setting.bind( function( value ) {
|
||||
if ( '' !== value ) {
|
||||
// Set retina logo option to false when a new logo image is uploaded.
|
||||
wp.customize.instance( 'tortuga_theme_options[retina_logo]' ).set( false );
|
||||
}
|
||||
});
|
||||
|
||||
var setupControl = function( control ) {
|
||||
var setActiveState, isDisplayed;
|
||||
isDisplayed = function() {
|
||||
return '' !== setting.get();
|
||||
};
|
||||
setActiveState = function() {
|
||||
control.active.set( isDisplayed() );
|
||||
};
|
||||
setActiveState();
|
||||
setting.bind( setActiveState );
|
||||
control.active.validate = isDisplayed;
|
||||
};
|
||||
wp.customize.control( 'tortuga_theme_options[retina_logo_title]', setupControl );
|
||||
wp.customize.control( 'tortuga_theme_options[retina_logo]', setupControl );
|
||||
} );
|
||||
|
||||
})( this.wp, jQuery );
|
|
@ -0,0 +1,29 @@
|
|||
/**
|
||||
* Magazine Widget Area Control
|
||||
*
|
||||
* Adds extra class if Magazine widgets are added to widget area.
|
||||
*
|
||||
* @package Tortuga
|
||||
*/
|
||||
|
||||
( function( wp, $ ) {
|
||||
|
||||
if ( ! wp || ! wp.customize ) { return; }
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
$( '.customize-control-sidebar_widgets' ).find( '.add-new-widget' ).on( 'click', function() {
|
||||
|
||||
// Remove Magazine Homepage sections for default sidebars.
|
||||
$( 'body' ).removeClass( 'adding-magazine-widget' );
|
||||
|
||||
if ( $( this ).hasClass( 'add-new-magazine-widget' ) && $( 'body' ).hasClass( 'adding-widget' ) ) {
|
||||
$( 'body' ).addClass( 'adding-magazine-widget' );
|
||||
} else {
|
||||
$( 'body' ).removeClass( 'adding-magazine-widget' );
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
||||
|
||||
} )( window.wp, jQuery );
|
326
wp-content/themes/tortuga/assets/js/html5shiv.js
vendored
Normal file
326
wp-content/themes/tortuga/assets/js/html5shiv.js
vendored
Normal file
|
@ -0,0 +1,326 @@
|
|||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.3';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extends the built-in list of html5 elements
|
||||
* @memberOf html5
|
||||
* @param {String|Array} newElements whitespace separated list or array of new element names to shiv
|
||||
* @param {Document} ownerDocument The context document.
|
||||
*/
|
||||
function addElements(newElements, ownerDocument) {
|
||||
var elements = html5.elements;
|
||||
if(typeof elements != 'string'){
|
||||
elements = elements.join(' ');
|
||||
}
|
||||
if(typeof newElements != 'string'){
|
||||
newElements = newElements.join(' ');
|
||||
}
|
||||
html5.elements = elements +' '+ newElements;
|
||||
shivDocument(ownerDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document|DocumentFragment} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment,
|
||||
|
||||
//extends list of elements
|
||||
addElements: addElements
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
if(typeof module == 'object' && module.exports){
|
||||
module.exports = html5;
|
||||
}
|
||||
|
||||
}(typeof window !== "undefined" ? window : this, document));
|
4
wp-content/themes/tortuga/assets/js/html5shiv.min.js
vendored
Normal file
4
wp-content/themes/tortuga/assets/js/html5shiv.min.js
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
5
wp-content/themes/tortuga/assets/js/jquery.flexslider-min.js
vendored
Normal file
5
wp-content/themes/tortuga/assets/js/jquery.flexslider-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1195
wp-content/themes/tortuga/assets/js/jquery.flexslider.js
Normal file
1195
wp-content/themes/tortuga/assets/js/jquery.flexslider.js
Normal file
File diff suppressed because it is too large
Load diff
122
wp-content/themes/tortuga/assets/js/navigation.js
Normal file
122
wp-content/themes/tortuga/assets/js/navigation.js
Normal file
|
@ -0,0 +1,122 @@
|
|||
/* global tortugaScreenReaderText */
|
||||
/**
|
||||
* Theme Navigation
|
||||
*
|
||||
* @package Tortuga
|
||||
*/
|
||||
|
||||
(function( $ ) {
|
||||
|
||||
function initNavigation( containerClass, naviClass ) {
|
||||
var container = $( containerClass );
|
||||
var navigation = $( naviClass );
|
||||
|
||||
// Return early if navigation is missing.
|
||||
if ( ! navigation.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Enable menuToggle.
|
||||
(function() {
|
||||
var menuToggle = container.find( '.menu-toggle' );
|
||||
|
||||
// Return early if menuToggle is missing.
|
||||
if ( ! menuToggle.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add an initial value for the attribute.
|
||||
menuToggle.attr( 'aria-expanded', 'false' );
|
||||
|
||||
menuToggle.on( 'click.tortuga_', function() {
|
||||
navigation.toggleClass( 'toggled-on' );
|
||||
|
||||
$( this ).attr( 'aria-expanded', navigation.hasClass( 'toggled-on' ) );
|
||||
});
|
||||
})();
|
||||
|
||||
// Enable dropdownToggles that displays child menu items.
|
||||
(function() {
|
||||
|
||||
var dropdownToggle = $( '<button />', { 'class': 'dropdown-toggle', 'aria-expanded': false } )
|
||||
.append( tortugaScreenReaderText.icon )
|
||||
.append( $( '<span />', { 'class': 'screen-reader-text', text: tortugaScreenReaderText.expand } ) );
|
||||
|
||||
navigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).after( dropdownToggle );
|
||||
|
||||
// Set the active submenu dropdown toggle button initial state.
|
||||
navigation.find( '.current-menu-ancestor > button' )
|
||||
.addClass( 'toggled-on' )
|
||||
.attr( 'aria-expanded', 'true' )
|
||||
.find( '.screen-reader-text' )
|
||||
.text( tortugaScreenReaderText.collapse );
|
||||
|
||||
// Set the active submenu initial state.
|
||||
navigation.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
|
||||
|
||||
navigation.find( '.dropdown-toggle' ).click( function( e ) {
|
||||
var _this = $( this ),
|
||||
screenReaderSpan = _this.find( '.screen-reader-text' );
|
||||
|
||||
e.preventDefault();
|
||||
_this.toggleClass( 'toggled-on' );
|
||||
_this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' );
|
||||
|
||||
_this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );
|
||||
|
||||
screenReaderSpan.text( screenReaderSpan.text() === tortugaScreenReaderText.expand ? tortugaScreenReaderText.collapse : tortugaScreenReaderText.expand );
|
||||
} );
|
||||
})();
|
||||
|
||||
// Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility.
|
||||
(function() {
|
||||
var menuList = navigation.children( 'ul.menu' );
|
||||
|
||||
if ( ! menuList.length || ! menuList.children().length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Toggle `focus` class to allow submenu access on tablets.
|
||||
function toggleFocusClassTouchScreen() {
|
||||
if ( 'none' === $( '.menu-toggle' ).css( 'display' ) ) {
|
||||
|
||||
$( document.body ).on( 'touchstart.tortuga_', function( e ) {
|
||||
if ( ! $( e.target ).closest( naviClass + ' li' ).length ) {
|
||||
$( naviClass + ' li' ).removeClass( 'focus' );
|
||||
}
|
||||
});
|
||||
|
||||
menuList.find( '.menu-item-has-children > a, .page_item_has_children > a' )
|
||||
.on( 'touchstart.tortuga_', function( e ) {
|
||||
var el = $( this ).parent( 'li' );
|
||||
|
||||
if ( ! el.hasClass( 'focus' ) ) {
|
||||
e.preventDefault();
|
||||
el.toggleClass( 'focus' );
|
||||
el.siblings( '.focus' ).removeClass( 'focus' );
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
menuList.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.tortuga_' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
$( window ).on( 'resize.tortuga_', toggleFocusClassTouchScreen );
|
||||
toggleFocusClassTouchScreen();
|
||||
}
|
||||
|
||||
menuList.find( 'a' ).on( 'focus.tortuga_ blur.tortuga_', function() {
|
||||
$( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' );
|
||||
});
|
||||
})();
|
||||
}
|
||||
|
||||
// Init Main Navigation.
|
||||
initNavigation( '.primary-navigation-wrap', '.main-navigation' );
|
||||
|
||||
// Init Top Navigation.
|
||||
initNavigation( '.header-bar', '.top-navigation' );
|
||||
|
||||
})( jQuery );
|
1
wp-content/themes/tortuga/assets/js/navigation.min.js
vendored
Normal file
1
wp-content/themes/tortuga/assets/js/navigation.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(d){function e(e,t){var a,n,r,o=d(e),s=d(t);s.length&&((a=o.find(".menu-toggle")).length&&(a.attr("aria-expanded","false"),a.on("click.tortuga_",function(){s.toggleClass("toggled-on"),d(this).attr("aria-expanded",s.hasClass("toggled-on"))})),n=d("<button />",{class:"dropdown-toggle","aria-expanded":!1}).append(tortugaScreenReaderText.icon).append(d("<span />",{class:"screen-reader-text",text:tortugaScreenReaderText.expand})),s.find(".menu-item-has-children > a, .page_item_has_children > a").after(n),s.find(".current-menu-ancestor > button").addClass("toggled-on").attr("aria-expanded","true").find(".screen-reader-text").text(tortugaScreenReaderText.collapse),s.find(".current-menu-ancestor > .sub-menu").addClass("toggled-on"),s.find(".dropdown-toggle").click(function(e){var t=d(this),a=t.find(".screen-reader-text");e.preventDefault(),t.toggleClass("toggled-on"),t.next(".children, .sub-menu").toggleClass("toggled-on"),t.attr("aria-expanded","false"===t.attr("aria-expanded")?"true":"false"),a.text(a.text()===tortugaScreenReaderText.expand?tortugaScreenReaderText.collapse:tortugaScreenReaderText.expand)}),(r=s.children("ul.menu")).length&&r.children().length&&("ontouchstart"in window&&(d(window).on("resize.tortuga_",i),i()),r.find("a").on("focus.tortuga_ blur.tortuga_",function(){d(this).parents(".menu-item, .page_item").toggleClass("focus")})));function i(){"none"===d(".menu-toggle").css("display")?(d(document.body).on("touchstart.tortuga_",function(e){d(e.target).closest(t+" li").length||d(t+" li").removeClass("focus")}),r.find(".menu-item-has-children > a, .page_item_has_children > a").on("touchstart.tortuga_",function(e){var t=d(this).parent("li");t.hasClass("focus")||(e.preventDefault(),t.toggleClass("focus"),t.siblings(".focus").removeClass("focus"))})):r.find(".menu-item-has-children > a, .page_item_has_children > a").unbind("touchstart.tortuga_")}}e(".primary-navigation-wrap",".main-navigation"),e(".header-bar",".top-navigation")}(jQuery);
|
23
wp-content/themes/tortuga/assets/js/slider.js
Normal file
23
wp-content/themes/tortuga/assets/js/slider.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* Flexslider Setup
|
||||
*
|
||||
* Adds the Flexslider Plugin for the Featured Post Slideshow
|
||||
*
|
||||
* @package Tortuga
|
||||
*/
|
||||
|
||||
jQuery( document ).ready(function($) {
|
||||
|
||||
/* Add flexslider to #post-slider div */
|
||||
$( "#post-slider" ).flexslider({
|
||||
animation: tortuga_slider_params.animation,
|
||||
slideshowSpeed: tortuga_slider_params.speed,
|
||||
namespace: "zeeflex-",
|
||||
selector: ".zeeslides > li",
|
||||
smoothHeight: true,
|
||||
pauseOnHover: true,
|
||||
controlNav: false,
|
||||
controlsContainer: ".post-slider-controls"
|
||||
});
|
||||
|
||||
});
|
230
wp-content/themes/tortuga/assets/js/svgxuse.js
Normal file
230
wp-content/themes/tortuga/assets/js/svgxuse.js
Normal file
|
@ -0,0 +1,230 @@
|
|||
/*!
|
||||
* @copyright Copyright (c) 2017 IcoMoon.io
|
||||
* @license Licensed under MIT license
|
||||
* See https://github.com/Keyamoon/svgxuse
|
||||
* @version 1.2.6
|
||||
*/
|
||||
/*jslint browser: true */
|
||||
/*global XDomainRequest, MutationObserver, window */
|
||||
(function () {
|
||||
"use strict";
|
||||
if (typeof window !== "undefined" && window.addEventListener) {
|
||||
var cache = Object.create(null); // holds xhr objects to prevent multiple requests
|
||||
var checkUseElems;
|
||||
var tid; // timeout id
|
||||
var debouncedCheck = function () {
|
||||
clearTimeout(tid);
|
||||
tid = setTimeout(checkUseElems, 100);
|
||||
};
|
||||
var unobserveChanges = function () {
|
||||
return;
|
||||
};
|
||||
var observeChanges = function () {
|
||||
var observer;
|
||||
window.addEventListener("resize", debouncedCheck, false);
|
||||
window.addEventListener("orientationchange", debouncedCheck, false);
|
||||
if (window.MutationObserver) {
|
||||
observer = new MutationObserver(debouncedCheck);
|
||||
observer.observe(document.documentElement, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true
|
||||
});
|
||||
unobserveChanges = function () {
|
||||
try {
|
||||
observer.disconnect();
|
||||
window.removeEventListener("resize", debouncedCheck, false);
|
||||
window.removeEventListener("orientationchange", debouncedCheck, false);
|
||||
} catch (ignore) {}
|
||||
};
|
||||
} else {
|
||||
document.documentElement.addEventListener("DOMSubtreeModified", debouncedCheck, false);
|
||||
unobserveChanges = function () {
|
||||
document.documentElement.removeEventListener("DOMSubtreeModified", debouncedCheck, false);
|
||||
window.removeEventListener("resize", debouncedCheck, false);
|
||||
window.removeEventListener("orientationchange", debouncedCheck, false);
|
||||
};
|
||||
}
|
||||
};
|
||||
var createRequest = function (url) {
|
||||
// In IE 9, cross origin requests can only be sent using XDomainRequest.
|
||||
// XDomainRequest would fail if CORS headers are not set.
|
||||
// Therefore, XDomainRequest should only be used with cross origin requests.
|
||||
function getOrigin(loc) {
|
||||
var a;
|
||||
if (loc.protocol !== undefined) {
|
||||
a = loc;
|
||||
} else {
|
||||
a = document.createElement("a");
|
||||
a.href = loc;
|
||||
}
|
||||
return a.protocol.replace(/:/g, "") + a.host;
|
||||
}
|
||||
var Request;
|
||||
var origin;
|
||||
var origin2;
|
||||
if (window.XMLHttpRequest) {
|
||||
Request = new XMLHttpRequest();
|
||||
origin = getOrigin(location);
|
||||
origin2 = getOrigin(url);
|
||||
if (Request.withCredentials === undefined && origin2 !== "" && origin2 !== origin) {
|
||||
Request = XDomainRequest || undefined;
|
||||
} else {
|
||||
Request = XMLHttpRequest;
|
||||
}
|
||||
}
|
||||
return Request;
|
||||
};
|
||||
var xlinkNS = "http://www.w3.org/1999/xlink";
|
||||
checkUseElems = function () {
|
||||
var base;
|
||||
var bcr;
|
||||
var fallback = ""; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.
|
||||
var hash;
|
||||
var href;
|
||||
var i;
|
||||
var inProgressCount = 0;
|
||||
var isHidden;
|
||||
var Request;
|
||||
var url;
|
||||
var uses;
|
||||
var xhr;
|
||||
function observeIfDone() {
|
||||
// If done with making changes, start watching for chagnes in DOM again
|
||||
inProgressCount -= 1;
|
||||
if (inProgressCount === 0) { // if all xhrs were resolved
|
||||
unobserveChanges(); // make sure to remove old handlers
|
||||
observeChanges(); // watch for changes to DOM
|
||||
}
|
||||
}
|
||||
function attrUpdateFunc(spec) {
|
||||
return function () {
|
||||
if (cache[spec.base] !== true) {
|
||||
spec.useEl.setAttributeNS(xlinkNS, "xlink:href", "#" + spec.hash);
|
||||
if (spec.useEl.hasAttribute("href")) {
|
||||
spec.useEl.setAttribute("href", "#" + spec.hash);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
function onloadFunc(xhr) {
|
||||
return function () {
|
||||
var body = document.body;
|
||||
var x = document.createElement("x");
|
||||
var svg;
|
||||
xhr.onload = null;
|
||||
x.innerHTML = xhr.responseText;
|
||||
svg = x.getElementsByTagName("svg")[0];
|
||||
if (svg) {
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
svg.style.position = "absolute";
|
||||
svg.style.width = 0;
|
||||
svg.style.height = 0;
|
||||
svg.style.overflow = "hidden";
|
||||
body.insertBefore(svg, body.firstChild);
|
||||
}
|
||||
observeIfDone();
|
||||
};
|
||||
}
|
||||
function onErrorTimeout(xhr) {
|
||||
return function () {
|
||||
xhr.onerror = null;
|
||||
xhr.ontimeout = null;
|
||||
observeIfDone();
|
||||
};
|
||||
}
|
||||
unobserveChanges(); // stop watching for changes to DOM
|
||||
// find all use elements
|
||||
uses = document.getElementsByTagName("use");
|
||||
for (i = 0; i < uses.length; i += 1) {
|
||||
try {
|
||||
bcr = uses[i].getBoundingClientRect();
|
||||
} catch (ignore) {
|
||||
// failed to get bounding rectangle of the use element
|
||||
bcr = false;
|
||||
}
|
||||
href = uses[i].getAttribute("href")
|
||||
|| uses[i].getAttributeNS(xlinkNS, "href")
|
||||
|| uses[i].getAttribute("xlink:href");
|
||||
if (href && href.split) {
|
||||
url = href.split("#");
|
||||
} else {
|
||||
url = ["", ""];
|
||||
}
|
||||
base = url[0];
|
||||
hash = url[1];
|
||||
isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;
|
||||
if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {
|
||||
// the use element is empty
|
||||
// if there is a reference to an external SVG, try to fetch it
|
||||
// use the optional fallback URL if there is no reference to an external SVG
|
||||
if (fallback && !base.length && hash && !document.getElementById(hash)) {
|
||||
base = fallback;
|
||||
}
|
||||
if (uses[i].hasAttribute("href")) {
|
||||
uses[i].setAttributeNS(xlinkNS, "xlink:href", href);
|
||||
}
|
||||
if (base.length) {
|
||||
// schedule updating xlink:href
|
||||
xhr = cache[base];
|
||||
if (xhr !== true) {
|
||||
// true signifies that prepending the SVG was not required
|
||||
setTimeout(attrUpdateFunc({
|
||||
useEl: uses[i],
|
||||
base: base,
|
||||
hash: hash
|
||||
}), 0);
|
||||
}
|
||||
if (xhr === undefined) {
|
||||
Request = createRequest(base);
|
||||
if (Request !== undefined) {
|
||||
xhr = new Request();
|
||||
cache[base] = xhr;
|
||||
xhr.onload = onloadFunc(xhr);
|
||||
xhr.onerror = onErrorTimeout(xhr);
|
||||
xhr.ontimeout = onErrorTimeout(xhr);
|
||||
xhr.open("GET", base);
|
||||
xhr.send();
|
||||
inProgressCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!isHidden) {
|
||||
if (cache[base] === undefined) {
|
||||
// remember this URL if the use element was not empty and no request was sent
|
||||
cache[base] = true;
|
||||
} else if (cache[base].onload) {
|
||||
// if it turns out that prepending the SVG is not necessary,
|
||||
// abort the in-progress xhr.
|
||||
cache[base].abort();
|
||||
delete cache[base].onload;
|
||||
cache[base] = true;
|
||||
}
|
||||
} else if (base.length && cache[base]) {
|
||||
setTimeout(attrUpdateFunc({
|
||||
useEl: uses[i],
|
||||
base: base,
|
||||
hash: hash
|
||||
}), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
uses = "";
|
||||
inProgressCount += 1;
|
||||
observeIfDone();
|
||||
};
|
||||
var winLoad;
|
||||
winLoad = function () {
|
||||
window.removeEventListener("load", winLoad, false); // to prevent memory leaks
|
||||
tid = setTimeout(checkUseElems, 0);
|
||||
};
|
||||
if (document.readyState !== "complete") {
|
||||
// The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.
|
||||
window.addEventListener("load", winLoad, false);
|
||||
} else {
|
||||
// No need to add a listener if the document is already loaded, initialize immediately.
|
||||
winLoad();
|
||||
}
|
||||
}
|
||||
}());
|
12
wp-content/themes/tortuga/assets/js/svgxuse.min.js
vendored
Normal file
12
wp-content/themes/tortuga/assets/js/svgxuse.min.js
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*!
|
||||
* @copyright Copyright (c) 2017 IcoMoon.io
|
||||
* @license Licensed under MIT license
|
||||
* See https://github.com/Keyamoon/svgxuse
|
||||
* @version 1.2.6
|
||||
*/
|
||||
(function(){if("undefined"!==typeof window&&window.addEventListener){var e=Object.create(null),l,d=function(){clearTimeout(l);l=setTimeout(n,100)},m=function(){},t=function(){window.addEventListener("resize",d,!1);window.addEventListener("orientationchange",d,!1);if(window.MutationObserver){var k=new MutationObserver(d);k.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0});m=function(){try{k.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",
|
||||
d,!1)}catch(v){}}}else document.documentElement.addEventListener("DOMSubtreeModified",d,!1),m=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1);window.removeEventListener("resize",d,!1);window.removeEventListener("orientationchange",d,!1)}},u=function(k){function e(a){if(void 0!==a.protocol)var c=a;else c=document.createElement("a"),c.href=a;return c.protocol.replace(/:/g,"")+c.host}if(window.XMLHttpRequest){var d=new XMLHttpRequest;var m=e(location);k=e(k);d=void 0===
|
||||
d.withCredentials&&""!==k&&k!==m?XDomainRequest||void 0:XMLHttpRequest}return d};var n=function(){function d(){--q;0===q&&(m(),t())}function l(a){return function(){!0!==e[a.base]&&(a.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a.hash),a.useEl.hasAttribute("href")&&a.useEl.setAttribute("href","#"+a.hash))}}function p(a){return function(){var c=document.body,b=document.createElement("x");a.onload=null;b.innerHTML=a.responseText;if(b=b.getElementsByTagName("svg")[0])b.setAttribute("aria-hidden",
|
||||
"true"),b.style.position="absolute",b.style.width=0,b.style.height=0,b.style.overflow="hidden",c.insertBefore(b,c.firstChild);d()}}function n(a){return function(){a.onerror=null;a.ontimeout=null;d()}}var a,c,q=0;m();var f=document.getElementsByTagName("use");for(c=0;c<f.length;c+=1){try{var g=f[c].getBoundingClientRect()}catch(w){g=!1}var h=(a=f[c].getAttribute("href")||f[c].getAttributeNS("http://www.w3.org/1999/xlink","href")||f[c].getAttribute("xlink:href"))&&a.split?a.split("#"):["",""];var b=
|
||||
h[0];h=h[1];var r=g&&0===g.left&&0===g.right&&0===g.top&&0===g.bottom;g&&0===g.width&&0===g.height&&!r?(f[c].hasAttribute("href")&&f[c].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),b.length&&(a=e[b],!0!==a&&setTimeout(l({useEl:f[c],base:b,hash:h}),0),void 0===a&&(h=u(b),void 0!==h&&(a=new h,e[b]=a,a.onload=p(a),a.onerror=n(a),a.ontimeout=n(a),a.open("GET",b),a.send(),q+=1)))):r?b.length&&e[b]&&setTimeout(l({useEl:f[c],base:b,hash:h}),0):void 0===e[b]?e[b]=!0:e[b].onload&&(e[b].abort(),
|
||||
delete e[b].onload,e[b]=!0)}f="";q+=1;d()};var p=function(){window.removeEventListener("load",p,!1);l=setTimeout(n,0)};"complete"!==document.readyState?window.addEventListener("load",p,!1):p()}})();
|
12
wp-content/themes/tortuga/assets/js/svgxuse.min.js?ver=1.2.6
Normal file
12
wp-content/themes/tortuga/assets/js/svgxuse.min.js?ver=1.2.6
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*!
|
||||
* @copyright Copyright (c) 2017 IcoMoon.io
|
||||
* @license Licensed under MIT license
|
||||
* See https://github.com/Keyamoon/svgxuse
|
||||
* @version 1.2.6
|
||||
*/
|
||||
(function(){if("undefined"!==typeof window&&window.addEventListener){var e=Object.create(null),l,d=function(){clearTimeout(l);l=setTimeout(n,100)},m=function(){},t=function(){window.addEventListener("resize",d,!1);window.addEventListener("orientationchange",d,!1);if(window.MutationObserver){var k=new MutationObserver(d);k.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0});m=function(){try{k.disconnect(),window.removeEventListener("resize",d,!1),window.removeEventListener("orientationchange",
|
||||
d,!1)}catch(v){}}}else document.documentElement.addEventListener("DOMSubtreeModified",d,!1),m=function(){document.documentElement.removeEventListener("DOMSubtreeModified",d,!1);window.removeEventListener("resize",d,!1);window.removeEventListener("orientationchange",d,!1)}},u=function(k){function e(a){if(void 0!==a.protocol)var c=a;else c=document.createElement("a"),c.href=a;return c.protocol.replace(/:/g,"")+c.host}if(window.XMLHttpRequest){var d=new XMLHttpRequest;var m=e(location);k=e(k);d=void 0===
|
||||
d.withCredentials&&""!==k&&k!==m?XDomainRequest||void 0:XMLHttpRequest}return d};var n=function(){function d(){--q;0===q&&(m(),t())}function l(a){return function(){!0!==e[a.base]&&(a.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+a.hash),a.useEl.hasAttribute("href")&&a.useEl.setAttribute("href","#"+a.hash))}}function p(a){return function(){var c=document.body,b=document.createElement("x");a.onload=null;b.innerHTML=a.responseText;if(b=b.getElementsByTagName("svg")[0])b.setAttribute("aria-hidden",
|
||||
"true"),b.style.position="absolute",b.style.width=0,b.style.height=0,b.style.overflow="hidden",c.insertBefore(b,c.firstChild);d()}}function n(a){return function(){a.onerror=null;a.ontimeout=null;d()}}var a,c,q=0;m();var f=document.getElementsByTagName("use");for(c=0;c<f.length;c+=1){try{var g=f[c].getBoundingClientRect()}catch(w){g=!1}var h=(a=f[c].getAttribute("href")||f[c].getAttributeNS("http://www.w3.org/1999/xlink","href")||f[c].getAttribute("xlink:href"))&&a.split?a.split("#"):["",""];var b=
|
||||
h[0];h=h[1];var r=g&&0===g.left&&0===g.right&&0===g.top&&0===g.bottom;g&&0===g.width&&0===g.height&&!r?(f[c].hasAttribute("href")&&f[c].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),b.length&&(a=e[b],!0!==a&&setTimeout(l({useEl:f[c],base:b,hash:h}),0),void 0===a&&(h=u(b),void 0!==h&&(a=new h,e[b]=a,a.onload=p(a),a.onerror=n(a),a.ontimeout=n(a),a.open("GET",b),a.send(),q+=1)))):r?b.length&&e[b]&&setTimeout(l({useEl:f[c],base:b,hash:h}),0):void 0===e[b]?e[b]=!0:e[b].onload&&(e[b].abort(),
|
||||
delete e[b].onload,e[b]=!0)}f="";q+=1;d()};var p=function(){window.removeEventListener("load",p,!1);l=setTimeout(n,0)};"complete"!==document.readyState?window.addEventListener("load",p,!1):p()}})();
|
Loading…
Add table
Add a link
Reference in a new issue