Add Piratenkleider theme
Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
289
wp-content/themes/piratenkleider/js/admin.js
Normal file
289
wp-content/themes/piratenkleider/js/admin.js
Normal file
@@ -0,0 +1,289 @@
|
||||
/*
|
||||
* Image Upload for Banner/Logo Link Widget
|
||||
*/
|
||||
jQuery(document).ready(function($){
|
||||
var custom_uploader;
|
||||
|
||||
$('body').on('click','.upload_image_button',function(e) {
|
||||
e.preventDefault();
|
||||
var button = $(this);
|
||||
var id = button.attr('id').replace('_button', '');
|
||||
var idimgid = button.attr('id').replace('url_button', 'id');
|
||||
var idtitle = button.attr('id').replace('image_url_button', 'title');
|
||||
|
||||
if (custom_uploader) {
|
||||
custom_uploader.open();
|
||||
return;
|
||||
}
|
||||
//Extend the wp.media object
|
||||
custom_uploader = wp.media.frames.file_frame = wp.media({
|
||||
title: 'Choose Image',
|
||||
button: { text:'Choose Image' },
|
||||
library: { type: 'image' },
|
||||
multiple: false
|
||||
});
|
||||
|
||||
//When a file is selected, grab the URL and set it as the text field's value
|
||||
custom_uploader.on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
$('#'+id).val(attachment.url);
|
||||
$('#'+idimgid).val(attachment.id);
|
||||
var pretitle = $('#'+idtitle).val();
|
||||
if (!pretitle)
|
||||
$('#'+idtitle).val(attachment.title);
|
||||
|
||||
});
|
||||
|
||||
//Open the uploader dialog
|
||||
custom_uploader.open();
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
* Attaches the image uploader to the input field
|
||||
*/
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var custom_uploader;
|
||||
|
||||
$('#linktipp_image-button').click(function(e) {
|
||||
e.preventDefault();
|
||||
var button = $(this);
|
||||
|
||||
//If the uploader object has already been created, reopen the dialog
|
||||
if (custom_uploader) {
|
||||
custom_uploader.open();
|
||||
return;
|
||||
}
|
||||
|
||||
//Extend the wp.media object
|
||||
custom_uploader = wp.media.frames.file_frame = wp.media({
|
||||
title: 'Choose Image',
|
||||
button: { text:'Choose Image' },
|
||||
library: { type: 'image' },
|
||||
multiple: false
|
||||
});
|
||||
|
||||
//When a file is selected, grab the URL and set it as the text field's value
|
||||
custom_uploader.on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
$('#linktipp_image').val(attachment.url);
|
||||
$('#linktipp_imgid').val(attachment.id);
|
||||
$('#linktipp_image-show').attr('src', attachment.url);
|
||||
|
||||
});
|
||||
|
||||
//Open the uploader dialog
|
||||
custom_uploader.open();
|
||||
|
||||
});
|
||||
|
||||
$('.custom_clear_image_button').click(function() {
|
||||
var defaultImage = $(this).parent().siblings('.custom_default_image').text();
|
||||
$(this).parent().siblings('#linktipp_image').val('');
|
||||
$(this).parent().siblings('#linktipp_imgid').val('');
|
||||
$(this).parent().siblings('#linktipp_image-show').attr('src', defaultImage);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
* Attaches the image uploader to the input field for custom type person
|
||||
*/
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var custom_uploader;
|
||||
|
||||
$('#person_bild-button').click(function(e) {
|
||||
e.preventDefault();
|
||||
var button = $(this);
|
||||
|
||||
//If the uploader object has already been created, reopen the dialog
|
||||
if (custom_uploader) {
|
||||
custom_uploader.open();
|
||||
return;
|
||||
}
|
||||
|
||||
//Extend the wp.media object
|
||||
custom_uploader = wp.media.frames.file_frame = wp.media({
|
||||
title: 'Choose Image',
|
||||
button: { text:'Choose Image' },
|
||||
library: { type: 'image' },
|
||||
multiple: false
|
||||
});
|
||||
|
||||
//When a file is selected, grab the URL and set it as the text field's value
|
||||
custom_uploader.on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
$('#person_bild').val(attachment.url);
|
||||
$('#person_bildid').val(attachment.id);
|
||||
$('#person_bild-show').attr('src', attachment.url);
|
||||
|
||||
});
|
||||
|
||||
//Open the uploader dialog
|
||||
custom_uploader.open();
|
||||
|
||||
});
|
||||
|
||||
$('.custom_clear_image_button').click(function() {
|
||||
var defaultImage = $(this).parent().siblings('.custom_default_image').text();
|
||||
$(this).parent().siblings('#person_bild').val('');
|
||||
$(this).parent().siblings('#person_bildid').val('');
|
||||
$(this).parent().siblings('#person_bild-show').attr('src', defaultImage);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
var startval = $("#piratenkleider-personalcard-id :selected").val();
|
||||
if (startval != '') {
|
||||
$(".visiting-card-manual").hide();
|
||||
}
|
||||
$("#piratenkleider-personalcard-id").change(function(){
|
||||
var thisval = $("#piratenkleider-personalcard-id :selected").val();
|
||||
if (thisval != '') {
|
||||
$(".visiting-card-manual").hide();
|
||||
} else {
|
||||
$(".visiting-card-manual").show();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
/* backend option switches */
|
||||
var startval = $("#artikelstream-type :selected").val();
|
||||
if (startval < 2) {
|
||||
$(".option-artikelstream-exclusive-catliste").hide();
|
||||
$(".option-artikelstream-show-second").hide();
|
||||
$(".option-artikelstream-maxnum-second").hide();
|
||||
$(".option-artikelstream-nextnum-second").hide();
|
||||
$(".option-artikelstream-numfullwidth-second").hide();
|
||||
$(".option-artikelstream-title-second").hide();
|
||||
$(".option-artikelstream-title-secondcontinuelist").hide();
|
||||
$(".option-artikelstream-show-linktipps").hide();
|
||||
$(".option-artikelstream-maxnum-linktipps").hide();
|
||||
$(".option-artikelstream-nextnum-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").hide();
|
||||
}
|
||||
$("#artikelstream-type").change(function(){
|
||||
var thisval = $("#artikelstream-type :selected").val();
|
||||
if (thisval <2) {
|
||||
$(".option-artikelstream-exclusive-catliste").hide();
|
||||
$(".option-artikelstream-show-second").hide();
|
||||
$(".option-artikelstream-maxnum-second").hide();
|
||||
$(".option-artikelstream-nextnum-second").hide();
|
||||
$(".option-artikelstream-numfullwidth-second").hide();
|
||||
$(".option-artikelstream-title-second").hide();
|
||||
$(".option-artikelstream-title-secondcontinuelist").hide();
|
||||
$(".option-artikelstream-show-linktipps").hide();
|
||||
$(".option-artikelstream-maxnum-linktipps").hide();
|
||||
$(".option-artikelstream-nextnum-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").hide();
|
||||
} else {
|
||||
$(".option-artikelstream-exclusive-catliste").show();
|
||||
$(".option-artikelstream-show-second").show();
|
||||
$(".option-artikelstream-maxnum-second").show();
|
||||
$(".option-artikelstream-nextnum-second").show();
|
||||
$(".option-artikelstream-numfullwidth-second").show();
|
||||
$(".option-artikelstream-title-second").show();
|
||||
$(".option-artikelstream-title-secondcontinuelist").show();
|
||||
$(".option-artikelstream-show-linktipps").show();
|
||||
$(".option-artikelstream-maxnum-linktipps").show();
|
||||
$(".option-artikelstream-nextnum-linktipps").show();
|
||||
$(".option-artikelstream-title-linktipps").show();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
var startval = $("#artikelstream-show-second :selected").val();
|
||||
if (startval == 0) {
|
||||
$(".option-artikelstream-maxnum-second").hide();
|
||||
$(".option-artikelstream-nextnum-second").hide();
|
||||
$(".option-artikelstream-numfullwidth-second").hide();
|
||||
$(".option-artikelstream-title-second").hide();
|
||||
$(".option-artikelstream-title-secondcontinuelist").hide();
|
||||
}
|
||||
$("#artikelstream-show-second").change(function(){
|
||||
var thisval = $("#artikelstream-show-second :selected").val();
|
||||
var streammain = $("#artikelstream-type :selected").val();
|
||||
if (thisval ==0) {
|
||||
$(".option-artikelstream-maxnum-second").hide();
|
||||
$(".option-artikelstream-nextnum-second").hide();
|
||||
$(".option-artikelstream-numfullwidth-second").hide();
|
||||
$(".option-artikelstream-title-second").hide();
|
||||
$(".option-artikelstream-title-secondcontinuelist").hide();
|
||||
} else if (streammain>1) {
|
||||
$(".option-artikelstream-maxnum-second").show();
|
||||
$(".option-artikelstream-nextnum-second").show();
|
||||
$(".option-artikelstream-numfullwidth-second").show();
|
||||
$(".option-artikelstream-title-second").show();
|
||||
$(".option-artikelstream-title-secondcontinuelist").show();
|
||||
}
|
||||
});
|
||||
|
||||
var startval = $("#artikelstream-show-linktipps :selected").val();
|
||||
if (startval == 0) {
|
||||
$(".option-artikelstream-maxnum-linktipps").hide();
|
||||
$(".option-artikelstream-nextnum-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").hide();
|
||||
}
|
||||
$("#artikelstream-show-linktipps").change(function(){
|
||||
var thisval = $("#artikelstream-show-linktipps :selected").val();
|
||||
var streammain = $("#artikelstream-type :selected").val();
|
||||
if (thisval ==0) {
|
||||
$(".option-artikelstream-maxnum-linktipps").hide();
|
||||
$(".option-artikelstream-nextnum-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktipps").hide();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").hide();
|
||||
} else if (streammain>1) {
|
||||
$(".option-artikelstream-maxnum-linktipps").show();
|
||||
$(".option-artikelstream-nextnum-linktipps").show();
|
||||
$(".option-artikelstream-title-linktipps").show();
|
||||
$(".option-artikelstream-title-linktippcontinuelist").show();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
var sidebar_plakatslider = $("#slider-defaultwerbeplakate:checked").val();
|
||||
if (sidebar_plakatslider==1) {
|
||||
$(".option-plakate-src").show();
|
||||
$(".option-plakate-title").show();
|
||||
$(".option-plakate-url").show();
|
||||
$(".option-plakate-altadressen").show();
|
||||
} else {
|
||||
$(".option-plakate-src").hide();
|
||||
$(".option-plakate-title").hide();
|
||||
$(".option-plakate-url").hide();
|
||||
$(".option-plakate-altadressen").hide();
|
||||
}
|
||||
$("#slider-defaultwerbeplakate").click(function(){
|
||||
var thisval = $('#slider-defaultwerbeplakate:checked').val();
|
||||
if (thisval == 1) {
|
||||
$(".option-plakate-src").show();
|
||||
$(".option-plakate-title").show();
|
||||
$(".option-plakate-url").show();
|
||||
$(".option-plakate-altadressen").show();
|
||||
} else {
|
||||
$(".option-plakate-src").hide();
|
||||
$(".option-plakate-title").hide();
|
||||
$(".option-plakate-url").hide();
|
||||
$(".option-plakate-altadressen").hide();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
1
wp-content/themes/piratenkleider/js/admin.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/admin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wp-content/themes/piratenkleider/js/comment-reply.js
Normal file
1
wp-content/themes/piratenkleider/js/comment-reply.js
Normal file
@@ -0,0 +1 @@
|
||||
addComment={moveForm:function(d,f,i,c){var m=this,a,h=m.I(d),b=m.I(i),l=m.I("cancel-comment-reply-link"),j=m.I("comment_parent"),k=m.I("comment_post_ID");if(!h||!b||!l||!j){return}m.respondId=i;c=c||false;if(!m.I("wp-temp-form-div")){a=document.createElement("div");a.id="wp-temp-form-div";a.style.display="none";b.parentNode.insertBefore(a,b)}h.parentNode.insertBefore(b,h.nextSibling);if(k&&c){k.value=c}j.value=f;l.style.display="";l.onclick=function(){var n=addComment,e=n.I("wp-temp-form-div"),o=n.I(n.respondId);if(!e||!o){return}n.I("comment_parent").value="0";e.parentNode.insertBefore(o,e);e.parentNode.removeChild(e);this.style.display="none";this.onclick=null;return false};try{m.I("author").focus()}catch(g){}return false},I:function(a){return document.getElementById(a)}};
|
||||
1
wp-content/themes/piratenkleider/js/comment-reply.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/comment-reply.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
addComment={moveForm:function(u,t,q,v){var e=this,x,r=e.I(u),w=e.I(q),n=e.I("cancel-comment-reply-link"),p=e.I("comment_parent"),o=e.I("comment_post_ID");if(!r||!w||!n||!p){return}e.respondId=q;v=v||false;if(!e.I("wp-temp-form-div")){x=document.createElement("div");x.id="wp-temp-form-div";x.style.display="none";w.parentNode.insertBefore(x,w)}r.parentNode.insertBefore(w,r.nextSibling);if(o&&v){o.value=v}p.value=t;n.style.display="";n.onclick=function(){var c=addComment,a=c.I("wp-temp-form-div"),b=c.I(c.respondId);if(!a||!b){return}c.I("comment_parent").value="0";a.parentNode.insertBefore(b,a);a.parentNode.removeChild(a);this.style.display="none";this.onclick=null;return false};try{e.I("author").focus()}catch(s){}return false},I:function(b){return document.getElementById(b)}};
|
||||
55
wp-content/themes/piratenkleider/js/dynamic-sidebar.js
Normal file
55
wp-content/themes/piratenkleider/js/dynamic-sidebar.js
Normal file
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* Dynamische Sidebar fuer Piratenkleider
|
||||
*/
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
var $cssPrimaryOnHideSidebar = {
|
||||
'width' : '100%'
|
||||
};
|
||||
var $cssASideOnHideSidebar = {
|
||||
'width' : '0'
|
||||
};
|
||||
var $cssPrimaryOnViewSidebar = {
|
||||
'width' : '67%'
|
||||
};
|
||||
var $cssASideOnViewSidebar = {
|
||||
'width' : '33%'
|
||||
};
|
||||
$.SetOnSwitch = function() {
|
||||
$(".content-primary").prepend($htmlOnSwitch);
|
||||
};
|
||||
$.SetOffSwitch = function() {
|
||||
$(".content-primary").prepend($htmlOffSwitch);
|
||||
};
|
||||
$.OnClickOnSwitchOff = function() {
|
||||
$(".switchoff a").click(function(event) {
|
||||
$(".switchon").toggle();
|
||||
$(".switchoff").toggle();
|
||||
$(".content-aside .skin").toggle();
|
||||
$(".content-primary").css($cssPrimaryOnHideSidebar);
|
||||
$(".content-aside").css($cssASideOnHideSidebar);
|
||||
event.preventDefault();
|
||||
})
|
||||
};
|
||||
$.OnClickOnSwitchOn = function() {
|
||||
$(".switchon a").click(function(event) {
|
||||
$(".switchon").toggle();
|
||||
$(".switchoff").toggle();
|
||||
$(".content-aside .skin").toggle();
|
||||
$(".content-primary").css($cssPrimaryOnViewSidebar);
|
||||
$(".content-aside").css($cssASideOnViewSidebar);
|
||||
event.preventDefault();
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
var breite = $(window).width();
|
||||
if (breite > 600) {
|
||||
$.SetOnSwitch();
|
||||
$.SetOffSwitch();
|
||||
$(".switchon").toggle();
|
||||
$.OnClickOnSwitchOff();
|
||||
$.OnClickOnSwitchOn();
|
||||
}
|
||||
});
|
||||
1
wp-content/themes/piratenkleider/js/dynamic-sidebar.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/dynamic-sidebar.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery(document).ready(function(d){var e={width:"100%"};var b={width:"0"};var a={width:"67%"};var f={width:"33%"};d.SetOnSwitch=function(){d(".content-primary").prepend($htmlOnSwitch)};d.SetOffSwitch=function(){d(".content-primary").prepend($htmlOffSwitch)};d.OnClickOnSwitchOff=function(){d(".switchoff a").click(function(g){d(".switchon").toggle();d(".switchoff").toggle();d(".content-aside .skin").toggle();d(".content-primary").css(e);d(".content-aside").css(b);g.preventDefault()})};d.OnClickOnSwitchOn=function(){d(".switchon a").click(function(g){d(".switchon").toggle();d(".switchoff").toggle();d(".content-aside .skin").toggle();d(".content-primary").css(a);d(".content-aside").css(f);g.preventDefault()})};var c=d(window).width();if(c>600){d.SetOnSwitch();d.SetOffSwitch();d(".switchon").toggle();d.OnClickOnSwitchOff();d.OnClickOnSwitchOn()}});
|
||||
43
wp-content/themes/piratenkleider/js/hamburger.js
Normal file
43
wp-content/themes/piratenkleider/js/hamburger.js
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Optional Hamburger Menu for small screen displays
|
||||
*/
|
||||
|
||||
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
var lastsize= window.innerWidth;
|
||||
var cloneimg =0;
|
||||
if(window.innerWidth < 769) {
|
||||
$(".header").before('<div id="header-menu-icon"></div>');
|
||||
$( ".branding h1 img" ).clone().appendTo( "#header-menu-icon" );
|
||||
cloneimg =1;
|
||||
$("#header-menu-icon").click(function() {
|
||||
$(".header").slideToggle();
|
||||
$(".header .branding h1").hide();
|
||||
});
|
||||
}
|
||||
$(window).resize(function(){
|
||||
if(window.innerWidth > 768) {
|
||||
$(".header").removeAttr("style");
|
||||
$(".header .branding h1").show();
|
||||
$("#header-menu-icon").detach();
|
||||
lastsize = window.innerWidth;
|
||||
cloneimg=0;
|
||||
}
|
||||
if ((window.innerWidth <= 769) && (lastsize > 768)) {
|
||||
lastsize = window.innerWidth;
|
||||
|
||||
$(".header").before('<div id="header-menu-icon"></div>');
|
||||
if (cloneimg==0) {
|
||||
$( ".branding h1 img" ).clone().appendTo( "#header-menu-icon" );
|
||||
cloneimg=1;
|
||||
}
|
||||
$("#header-menu-icon").click(function() {
|
||||
$(".header").slideToggle();
|
||||
if (cloneimg==1) {
|
||||
$(".header .branding h1").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
1
wp-content/themes/piratenkleider/js/hamburger.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/hamburger.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery(document).ready(function(c){var b=window.innerWidth;var a=0;if(window.innerWidth<769){c(".header").before('<div id="header-menu-icon"></div>');c(".branding h1 img").clone().appendTo("#header-menu-icon");a=1;c("#header-menu-icon").click(function(){c(".header").slideToggle();c(".header .branding h1").hide()})}c(window).resize(function(){if(window.innerWidth>768){c(".header").removeAttr("style");c(".header .branding h1").show();c("#header-menu-icon").detach();b=window.innerWidth;a=0}if((window.innerWidth<=769)&&(b>768)){b=window.innerWidth;c(".header").before('<div id="header-menu-icon"></div>');if(a==0){c(".branding h1 img").clone().appendTo("#header-menu-icon");a=1}c("#header-menu-icon").click(function(){c(".header").slideToggle();if(a==1){c(".header .branding h1").hide()}})}})});
|
||||
1128
wp-content/themes/piratenkleider/js/jquery.flexslider.js
Normal file
1128
wp-content/themes/piratenkleider/js/jquery.flexslider.js
Normal file
File diff suppressed because it is too large
Load Diff
1
wp-content/themes/piratenkleider/js/jquery.flexslider.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/jquery.flexslider.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
148
wp-content/themes/piratenkleider/js/layout.js
Normal file
148
wp-content/themes/piratenkleider/js/layout.js
Normal file
@@ -0,0 +1,148 @@
|
||||
/**
|
||||
* JS-Frameset fuer Piratenkleider
|
||||
*
|
||||
*/
|
||||
var $htmlOnSwitch = '';
|
||||
var $htmlOffSwitch = '';
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
|
||||
/*
|
||||
* Klasse no-js entfernen. Diese Klasse wurde im HTML statisch gesetzt.
|
||||
* Mit CSS werden die mit dieser Klasse bezeichneten Bereiche
|
||||
* unsichtbar gemacht. Durch JS entfernen wir die Klasse und
|
||||
* machen sie also erst dann aktiv, wenn JS an ist.
|
||||
*/
|
||||
$("div").removeClass('no-js');
|
||||
|
||||
|
||||
/* Barrierefreie Hauptnavigation mit Tastatur
|
||||
* Links, die via Tastatur einen Fikus bekommen, erhalten die Klasse
|
||||
* "hover". Diese Klasse wird auf das aktive Element, sowie die darübergehenden
|
||||
* Elemente vergeben.
|
||||
* Die hover-Klasse ist parallel zu der normalen hover-Funktion im CSS
|
||||
* zu definieren.
|
||||
*/
|
||||
|
||||
$(document).on("focusin", function() {
|
||||
var menuLayers = 5; //Anzahl der Menue-Ebenen
|
||||
var links = document.getElementById('nav').getElementsByTagName('a');
|
||||
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
links[i].onfocus = function(){
|
||||
var e = this;
|
||||
for(var j = 0; j < menuLayers*2; j++){
|
||||
e = e.parentNode;
|
||||
if(e.nodeName=='UL'||e.nodeName=='SPAN') continue;
|
||||
if(e.nodeName!='LI') break;
|
||||
e.className += ' hover';
|
||||
}
|
||||
};
|
||||
links[i].onblur = function(){
|
||||
var e = this;
|
||||
for(var j = 0; j < menuLayers*2; j++){
|
||||
e = e.parentNode;
|
||||
if(e.nodeName=='UL'||e.nodeName=='SPAN') continue;
|
||||
if(e.nodeName!='LI') break;
|
||||
e.className = e.className.replace( /(?:^|\s)hover(?!\S)/ , '' );
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
var $cssPrimaryOnHideSidebar = {
|
||||
'width' : '100%'
|
||||
};
|
||||
var $cssASideOnHideSidebar = {
|
||||
'width' : '0'
|
||||
};
|
||||
var $cssPrimaryOnViewSidebar = {
|
||||
'width' : '705px'
|
||||
};
|
||||
var $cssPrimaryOnBigViewSidebar = {
|
||||
'width' : '1024px'
|
||||
};
|
||||
var $cssASideOnViewSidebar = {
|
||||
'width' : '319px'
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$.SetOnSwitch = function() {
|
||||
$(".content-primary").prepend($htmlOnSwitch);
|
||||
};
|
||||
$.SetOffSwitch = function() {
|
||||
$(".content-primary").prepend($htmlOffSwitch);
|
||||
};
|
||||
$.OnClickOnSwitchOff = function() {
|
||||
$(".switchoff a").click(function(event) {
|
||||
$(".switchon").toggle();
|
||||
$(".switchoff").toggle();
|
||||
$(".content-aside .skin").toggle();
|
||||
$(".content-primary").css($cssPrimaryOnHideSidebar);
|
||||
$(".content-aside").css($cssASideOnHideSidebar);
|
||||
event.preventDefault();
|
||||
})
|
||||
};
|
||||
$.OnClickOnSwitchOn = function() {
|
||||
$(".switchon a").click(function(event) {
|
||||
$(".switchon").toggle();
|
||||
$(".switchoff").toggle();
|
||||
$(".content-aside .skin").toggle();
|
||||
curwidth = $(window).width();
|
||||
if (curwidth >1350) {
|
||||
$(".content-primary").css($cssPrimaryOnBigViewSidebar);
|
||||
} else {
|
||||
$(".content-primary").css($cssPrimaryOnViewSidebar);
|
||||
}
|
||||
$(".content-aside").css($cssASideOnViewSidebar);
|
||||
event.preventDefault();
|
||||
})
|
||||
};
|
||||
|
||||
var breite = $(window).width();
|
||||
$.SetOnSwitch();
|
||||
$.SetOffSwitch();
|
||||
$(".switchon").toggle();
|
||||
$.OnClickOnSwitchOff();
|
||||
$.OnClickOnSwitchOn();
|
||||
|
||||
|
||||
|
||||
$(window).scroll(function () {
|
||||
if (( $(window).scrollTop() > 184 ) && (breite > 800)) {
|
||||
$("body").addClass("nav-fixed");
|
||||
};
|
||||
if (( $(window).scrollTop() <= 184 )&& (breite > 800)) {
|
||||
$("body").removeClass("nav-fixed");
|
||||
};
|
||||
});
|
||||
$(window).resize(function() {
|
||||
breite = $(window).width();
|
||||
if (( $(window).scrollTop() > 184 ) && (breite > 800)) {
|
||||
$("body").addClass("nav-fixed");
|
||||
};
|
||||
if (( $(window).scrollTop() <= 184 )&& (breite > 800)) {
|
||||
$("body").removeClass("nav-fixed");
|
||||
};
|
||||
});
|
||||
|
||||
$("#nav-select").change(function(){
|
||||
//alert('url = ' + this.value );
|
||||
window.location.href = this.value;
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
$(".accordion h2:gt(0)").addClass("closed");
|
||||
$(".accordion div:gt(0)").hide();
|
||||
$(".accordion h2").click(function(){
|
||||
$(this).next("div").slideToggle("slow");
|
||||
$(this).toggleClass("closed");
|
||||
});
|
||||
});
|
||||
|
||||
1
wp-content/themes/piratenkleider/js/layout.min.js
vendored
Normal file
1
wp-content/themes/piratenkleider/js/layout.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var $htmlOnSwitch="";var $htmlOffSwitch="";jQuery(document).ready(function(e){e("div").removeClass("no-js");e(document).on("focusin",function(){var k=5;var h=document.getElementById("nav").getElementsByTagName("a");for(var j=0;j<h.length;j++){h[j].onfocus=function(){var l=this;for(var i=0;i<k*2;i++){l=l.parentNode;if(l.nodeName=="UL"||l.nodeName=="SPAN"){continue}if(l.nodeName!="LI"){break}l.className+=" hover"}};h[j].onblur=function(){var l=this;for(var i=0;i<k*2;i++){l=l.parentNode;if(l.nodeName=="UL"||l.nodeName=="SPAN"){continue}if(l.nodeName!="LI"){break}l.className=l.className.replace(/(?:^|\s)hover(?!\S)/,"")}}}});var f={width:"100%"};var c={width:"0"};var b={width:"705px"};var a={width:"1024px"};var g={width:"319px"};e.SetOnSwitch=function(){e(".content-primary").prepend($htmlOnSwitch)};e.SetOffSwitch=function(){e(".content-primary").prepend($htmlOffSwitch)};e.OnClickOnSwitchOff=function(){e(".switchoff a").click(function(h){e(".switchon").toggle();e(".switchoff").toggle();e(".content-aside .skin").toggle();e(".content-primary").css(f);e(".content-aside").css(c);h.preventDefault()})};e.OnClickOnSwitchOn=function(){e(".switchon a").click(function(h){e(".switchon").toggle();e(".switchoff").toggle();e(".content-aside .skin").toggle();curwidth=e(window).width();if(curwidth>1350){e(".content-primary").css(a)}else{e(".content-primary").css(b)}e(".content-aside").css(g);h.preventDefault()})};var d=e(window).width();e.SetOnSwitch();e.SetOffSwitch();e(".switchon").toggle();e.OnClickOnSwitchOff();e.OnClickOnSwitchOn();e(window).scroll(function(){if((e(window).scrollTop()>184)&&(d>800)){e("body").addClass("nav-fixed")}if((e(window).scrollTop()<=184)&&(d>800)){e("body").removeClass("nav-fixed")}});e(window).resize(function(){d=e(window).width();if((e(window).scrollTop()>184)&&(d>800)){e("body").addClass("nav-fixed")}if((e(window).scrollTop()<=184)&&(d>800)){e("body").removeClass("nav-fixed")}});e("#nav-select").change(function(){window.location.href=this.value})});jQuery(document).ready(function(a){a(".accordion h2:gt(0)").addClass("closed");a(".accordion div:gt(0)").hide();a(".accordion h2").click(function(){a(this).next("div").slideToggle("slow");a(this).toggleClass("closed")})});
|
||||
4
wp-content/themes/piratenkleider/js/modernizr-2.0.6.min.js
vendored
Normal file
4
wp-content/themes/piratenkleider/js/modernizr-2.0.6.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user