Initial commit: Backup der Webseiten
- zoesch.de - blitzkiste.net - gruene-hassberge (norbert.zoesch.de) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1341
zoesch.de/test/js/blueimp-gallery.js
Normal file
1341
zoesch.de/test/js/blueimp-gallery.js
Normal file
File diff suppressed because it is too large
Load Diff
1
zoesch.de/test/js/bootstrap-image-gallery.min.js
vendored
Normal file
1
zoesch.de/test/js/bootstrap-image-gallery.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","./blueimp-gallery"],a):a(window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a.extend(b.prototype.options,{useBootstrapModal:!0});var c=b.prototype.close,d=b.prototype.imageFactory,e=b.prototype.videoFactory,f=b.prototype.textFactory;a.extend(b.prototype,{modalFactory:function(a,b,c,d){if(!this.options.useBootstrapModal||c)return d.call(this,a,b,c);var e=this,f=this.container.children(".modal"),g=f.clone().show().on("click",function(a){(a.target===g[0]||a.target===g.children()[0])&&(a.preventDefault(),a.stopPropagation(),e.close())}),h=d.call(this,a,function(a){b({type:a.type,target:g[0]}),g.addClass("in")},c);return g.find(".modal-title").text(h.title||String.fromCharCode(160)),g.find(".modal-body").append(h),g[0]},imageFactory:function(a,b,c){return this.modalFactory(a,b,c,d)},videoFactory:function(a,b,c){return this.modalFactory(a,b,c,e)},textFactory:function(a,b,c){return this.modalFactory(a,b,c,f)},close:function(){this.container.find(".modal").removeClass("in"),c.call(this)}})});
|
||||
2306
zoesch.de/test/js/bootstrap.js
vendored
Normal file
2306
zoesch.de/test/js/bootstrap.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
zoesch.de/test/js/bootstrap.min.js
vendored
Normal file
7
zoesch.de/test/js/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
38
zoesch.de/test/js/control.js
Normal file
38
zoesch.de/test/js/control.js
Normal file
@@ -0,0 +1,38 @@
|
||||
$(document).ready(function() {
|
||||
$('.about-content .profile-picture').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'both' || visiblePartY == 'bottom') {
|
||||
$('.about-content').css('visibility', 'visible');
|
||||
$('.about-content').addClass('animated zoomIn');
|
||||
$('.about-content').unbind('inview');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.gallery-content .first-img').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'both' || visiblePartY == 'bottom') {
|
||||
$('.gallery-content').css('visibility', 'visible');
|
||||
$('.gallery-content').addClass('animated zoomIn');
|
||||
$('.gallery-content').unbind('inview');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.clients-content .first-img').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'both' || visiblePartY == 'bottom') {
|
||||
$('.clients-content').css('visibility', 'visible');
|
||||
$('.clients-content').addClass('animated zoomIn');
|
||||
$('.clients-content').unbind('inview');
|
||||
}
|
||||
}
|
||||
});
|
||||
$('.contact-content .first_input').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||
if (isInView) {
|
||||
if (visiblePartY == 'both' || visiblePartY == 'bottom') {
|
||||
$('.contact-content').css('visibility', 'visible');
|
||||
$('.contact-content').addClass('animated zoomIn');
|
||||
$('.contact-content').unbind('inview');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
52
zoesch.de/test/js/dialog.js
Normal file
52
zoesch.de/test/js/dialog.js
Normal file
@@ -0,0 +1,52 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
// Variable to hold request
|
||||
var request;
|
||||
|
||||
// Bind to the submit event of our form
|
||||
$("#contact_form").submit(function(event){
|
||||
|
||||
// Abort any pending request
|
||||
if (request) {
|
||||
request.abort();
|
||||
}
|
||||
// setup some local variables
|
||||
var $form = $(this);
|
||||
|
||||
// Let's select and cache all the fields
|
||||
var $inputs = $form.find("input, textarea");
|
||||
|
||||
// Serialize the data in the form
|
||||
var serializedData = $form.serialize();
|
||||
|
||||
// Fire off the request to /form.php
|
||||
request = $.ajax({
|
||||
url: "/contact.php",
|
||||
type: "post",
|
||||
data: serializedData,
|
||||
success: function(data){
|
||||
$('#dialog').html(data);
|
||||
$( "#dialog" ).dialog({
|
||||
dialogClass: "contact-dialog",
|
||||
height: 200,
|
||||
width: 350,
|
||||
resizable: false,
|
||||
draggable: false,
|
||||
modal: true,
|
||||
show: { effect: "clip", direction: "vertical", duration: 600},
|
||||
hide: { effect: "clip", direction: "vertical", duration: 600 },
|
||||
title: "Kontakt",
|
||||
buttons: { "OK": function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Prevent default posting of form
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
30
zoesch.de/test/js/getStatus.js
Normal file
30
zoesch.de/test/js/getStatus.js
Normal file
@@ -0,0 +1,30 @@
|
||||
function getStatus(code, elemID) {
|
||||
|
||||
var request = new XMLHttpRequest();
|
||||
|
||||
request.open('GET', 'https://api.charge-it-mobility.com/RNs/Prod/EVSEs-%3EStatus', true);
|
||||
|
||||
request.onload = function () {
|
||||
var data = JSON.parse(this.response);
|
||||
var state = "";
|
||||
var icon = "";
|
||||
var status = data[code];
|
||||
if (status) {
|
||||
var timeKey = Object.keys(status)[0];
|
||||
var value = status[timeKey];
|
||||
if (value == "Available") {
|
||||
state = "frei";
|
||||
icon = '<i class="fa fa-check" aria-hidden="true"></i>';
|
||||
} else {
|
||||
state = "belegt";
|
||||
icon = '<i class="fa fa-bolt" aria-hidden="true"></i>';
|
||||
}
|
||||
} else {
|
||||
state = "Keine Info";
|
||||
icon = '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>';
|
||||
}
|
||||
document.getElementById(elemID + "_icon").innerHTML = icon;
|
||||
document.getElementById(elemID).innerHTML = state;
|
||||
};
|
||||
request.send();
|
||||
}
|
||||
4
zoesch.de/test/js/jquery-2.1.3.min.js
vendored
Normal file
4
zoesch.de/test/js/jquery-2.1.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
13
zoesch.de/test/js/jquery-ui.min.js
vendored
Normal file
13
zoesch.de/test/js/jquery-ui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
zoesch.de/test/js/jquery.blueimp-gallery.min.js
vendored
Normal file
1
zoesch.de/test/js/jquery.blueimp-gallery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
44
zoesch.de/test/js/jquery.easing.min.js
vendored
Normal file
44
zoesch.de/test/js/jquery.easing.min.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
*
|
||||
* Uses the built in easing capabilities added In jQuery 1.1
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}});
|
||||
3
zoesch.de/test/js/jquery.inview.min.js
vendored
Normal file
3
zoesch.de/test/js/jquery.inview.min.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
(function(d){var p={},e,a,h=document,i=window,f=h.documentElement,j=d.expando;d.event.special.inview={add:function(a){p[a.guid+"-"+this[j]]={data:a,$element:d(this)}},remove:function(a){try{delete p[a.guid+"-"+this[j]]}catch(d){}}};d(i).bind("scroll resize",function(){e=a=null});!f.addEventListener&&f.attachEvent&&f.attachEvent("onfocusin",function(){a=null});setInterval(function(){var k=d(),j,n=0;d.each(p,function(a,b){var c=b.data.selector,d=b.$element;k=k.add(c?d.find(c):d)});if(j=k.length){var b;
|
||||
if(!(b=e)){var g={height:i.innerHeight,width:i.innerWidth};if(!g.height&&((b=h.compatMode)||!d.support.boxModel))b="CSS1Compat"===b?f:h.body,g={height:b.clientHeight,width:b.clientWidth};b=g}e=b;for(a=a||{top:i.pageYOffset||f.scrollTop||h.body.scrollTop,left:i.pageXOffset||f.scrollLeft||h.body.scrollLeft};n<j;n++)if(d.contains(f,k[n])){b=d(k[n]);var l=b.height(),m=b.width(),c=b.offset(),g=b.data("inview");if(!a||!e)break;c.top+l>a.top&&c.top<a.top+e.height&&c.left+m>a.left&&c.left<a.left+e.width?
|
||||
(m=a.left>c.left?"right":a.left+e.width<c.left+m?"left":"both",l=a.top>c.top?"bottom":a.top+e.height<c.top+l?"top":"both",c=m+"-"+l,(!g||g!==c)&&b.data("inview",c).trigger("inview",[!0,m,l])):g&&b.data("inview",!1).trigger("inview",[!1])}}},250)})(jQuery);
|
||||
28
zoesch.de/test/js/main.js
Normal file
28
zoesch.de/test/js/main.js
Normal file
@@ -0,0 +1,28 @@
|
||||
jQuery(document).ready(function($){
|
||||
// browser window scroll (in pixels) after which the "back to top" link is shown
|
||||
var offset = 300,
|
||||
//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
|
||||
offset_opacity = 1200,
|
||||
//duration of the top scrolling animation (in ms)
|
||||
scroll_top_duration = 700,
|
||||
//grab the "back to top" link
|
||||
$back_to_top = $('.cd-top');
|
||||
|
||||
//hide or show the "back to top" link
|
||||
$(window).scroll(function(){
|
||||
( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
|
||||
if( $(this).scrollTop() > offset_opacity ) {
|
||||
$back_to_top.addClass('cd-fade-out');
|
||||
}
|
||||
});
|
||||
|
||||
//smooth scroll to top
|
||||
$back_to_top.on('click', function(event){
|
||||
event.preventDefault();
|
||||
$('body,html').animate({
|
||||
scrollTop: 0 ,
|
||||
}, scroll_top_duration
|
||||
);
|
||||
});
|
||||
|
||||
});
|
||||
1406
zoesch.de/test/js/modernizr.js
Normal file
1406
zoesch.de/test/js/modernizr.js
Normal file
File diff suppressed because it is too large
Load Diff
13
zoesch.de/test/js/npm.js
Normal file
13
zoesch.de/test/js/npm.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
|
||||
require('../../js/transition.js')
|
||||
require('../../js/alert.js')
|
||||
require('../../js/button.js')
|
||||
require('../../js/carousel.js')
|
||||
require('../../js/collapse.js')
|
||||
require('../../js/dropdown.js')
|
||||
require('../../js/modal.js')
|
||||
require('../../js/tooltip.js')
|
||||
require('../../js/popover.js')
|
||||
require('../../js/scrollspy.js')
|
||||
require('../../js/tab.js')
|
||||
require('../../js/affix.js')
|
||||
267
zoesch.de/test/js/purl.js
Normal file
267
zoesch.de/test/js/purl.js
Normal file
@@ -0,0 +1,267 @@
|
||||
/*
|
||||
* Purl (A JavaScript URL parser) v2.3.1
|
||||
* Developed and maintanined by Mark Perkins, mark@allmarkedup.com
|
||||
* Source repository: https://github.com/allmarkedup/jQuery-URL-Parser
|
||||
* Licensed under an MIT-style license. See https://github.com/allmarkedup/jQuery-URL-Parser/blob/master/LICENSE for details.
|
||||
*/
|
||||
|
||||
;(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(factory);
|
||||
} else {
|
||||
window.purl = factory();
|
||||
}
|
||||
})(function() {
|
||||
|
||||
var tag2attr = {
|
||||
a : 'href',
|
||||
img : 'src',
|
||||
form : 'action',
|
||||
base : 'href',
|
||||
script : 'src',
|
||||
iframe : 'src',
|
||||
link : 'href',
|
||||
embed : 'src',
|
||||
object : 'data'
|
||||
},
|
||||
|
||||
key = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'], // keys available to query
|
||||
|
||||
aliases = { 'anchor' : 'fragment' }, // aliases for backwards compatability
|
||||
|
||||
parser = {
|
||||
strict : /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, //less intuitive, more accurate to the specs
|
||||
loose : /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ // more intuitive, fails on relative paths and deviates from specs
|
||||
},
|
||||
|
||||
isint = /^[0-9]+$/;
|
||||
|
||||
function parseUri( url, strictMode ) {
|
||||
var str = decodeURI( url ),
|
||||
res = parser[ strictMode || false ? 'strict' : 'loose' ].exec( str ),
|
||||
uri = { attr : {}, param : {}, seg : {} },
|
||||
i = 14;
|
||||
|
||||
while ( i-- ) {
|
||||
uri.attr[ key[i] ] = res[i] || '';
|
||||
}
|
||||
|
||||
// build query and fragment parameters
|
||||
uri.param['query'] = parseString(uri.attr['query']);
|
||||
uri.param['fragment'] = parseString(uri.attr['fragment']);
|
||||
|
||||
// split path and fragement into segments
|
||||
uri.seg['path'] = uri.attr.path.replace(/^\/+|\/+$/g,'').split('/');
|
||||
uri.seg['fragment'] = uri.attr.fragment.replace(/^\/+|\/+$/g,'').split('/');
|
||||
|
||||
// compile a 'base' domain attribute
|
||||
uri.attr['base'] = uri.attr.host ? (uri.attr.protocol ? uri.attr.protocol+'://'+uri.attr.host : uri.attr.host) + (uri.attr.port ? ':'+uri.attr.port : '') : '';
|
||||
|
||||
return uri;
|
||||
}
|
||||
|
||||
function getAttrName( elm ) {
|
||||
var tn = elm.tagName;
|
||||
if ( typeof tn !== 'undefined' ) return tag2attr[tn.toLowerCase()];
|
||||
return tn;
|
||||
}
|
||||
|
||||
function promote(parent, key) {
|
||||
if (parent[key].length === 0) return parent[key] = {};
|
||||
var t = {};
|
||||
for (var i in parent[key]) t[i] = parent[key][i];
|
||||
parent[key] = t;
|
||||
return t;
|
||||
}
|
||||
|
||||
function parse(parts, parent, key, val) {
|
||||
var part = parts.shift();
|
||||
if (!part) {
|
||||
if (isArray(parent[key])) {
|
||||
parent[key].push(val);
|
||||
} else if ('object' == typeof parent[key]) {
|
||||
parent[key] = val;
|
||||
} else if ('undefined' == typeof parent[key]) {
|
||||
parent[key] = val;
|
||||
} else {
|
||||
parent[key] = [parent[key], val];
|
||||
}
|
||||
} else {
|
||||
var obj = parent[key] = parent[key] || [];
|
||||
if (']' == part) {
|
||||
if (isArray(obj)) {
|
||||
if ('' !== val) obj.push(val);
|
||||
} else if ('object' == typeof obj) {
|
||||
obj[keys(obj).length] = val;
|
||||
} else {
|
||||
obj = parent[key] = [parent[key], val];
|
||||
}
|
||||
} else if (~part.indexOf(']')) {
|
||||
part = part.substr(0, part.length - 1);
|
||||
if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
|
||||
parse(parts, obj, part, val);
|
||||
// key
|
||||
} else {
|
||||
if (!isint.test(part) && isArray(obj)) obj = promote(parent, key);
|
||||
parse(parts, obj, part, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function merge(parent, key, val) {
|
||||
if (~key.indexOf(']')) {
|
||||
var parts = key.split('[');
|
||||
parse(parts, parent, 'base', val);
|
||||
} else {
|
||||
if (!isint.test(key) && isArray(parent.base)) {
|
||||
var t = {};
|
||||
for (var k in parent.base) t[k] = parent.base[k];
|
||||
parent.base = t;
|
||||
}
|
||||
if (key !== '') {
|
||||
set(parent.base, key, val);
|
||||
}
|
||||
}
|
||||
return parent;
|
||||
}
|
||||
|
||||
function parseString(str) {
|
||||
return reduce(String(str).split(/&|;/), function(ret, pair) {
|
||||
try {
|
||||
pair = decodeURIComponent(pair.replace(/\+/g, ' '));
|
||||
} catch(e) {
|
||||
// ignore
|
||||
}
|
||||
var eql = pair.indexOf('='),
|
||||
brace = lastBraceInKey(pair),
|
||||
key = pair.substr(0, brace || eql),
|
||||
val = pair.substr(brace || eql, pair.length);
|
||||
|
||||
val = val.substr(val.indexOf('=') + 1, val.length);
|
||||
|
||||
if (key === '') {
|
||||
key = pair;
|
||||
val = '';
|
||||
}
|
||||
|
||||
return merge(ret, key, val);
|
||||
}, { base: {} }).base;
|
||||
}
|
||||
|
||||
function set(obj, key, val) {
|
||||
var v = obj[key];
|
||||
if (typeof v === 'undefined') {
|
||||
obj[key] = val;
|
||||
} else if (isArray(v)) {
|
||||
v.push(val);
|
||||
} else {
|
||||
obj[key] = [v, val];
|
||||
}
|
||||
}
|
||||
|
||||
function lastBraceInKey(str) {
|
||||
var len = str.length,
|
||||
brace,
|
||||
c;
|
||||
for (var i = 0; i < len; ++i) {
|
||||
c = str[i];
|
||||
if (']' == c) brace = false;
|
||||
if ('[' == c) brace = true;
|
||||
if ('=' == c && !brace) return i;
|
||||
}
|
||||
}
|
||||
|
||||
function reduce(obj, accumulator){
|
||||
var i = 0,
|
||||
l = obj.length >> 0,
|
||||
curr = arguments[2];
|
||||
while (i < l) {
|
||||
if (i in obj) curr = accumulator.call(undefined, curr, obj[i], i, obj);
|
||||
++i;
|
||||
}
|
||||
return curr;
|
||||
}
|
||||
|
||||
function isArray(vArg) {
|
||||
return Object.prototype.toString.call(vArg) === "[object Array]";
|
||||
}
|
||||
|
||||
function keys(obj) {
|
||||
var key_array = [];
|
||||
for ( var prop in obj ) {
|
||||
if ( obj.hasOwnProperty(prop) ) key_array.push(prop);
|
||||
}
|
||||
return key_array;
|
||||
}
|
||||
|
||||
function purl( url, strictMode ) {
|
||||
if ( arguments.length === 1 && url === true ) {
|
||||
strictMode = true;
|
||||
url = undefined;
|
||||
}
|
||||
strictMode = strictMode || false;
|
||||
url = url || window.location.toString();
|
||||
|
||||
return {
|
||||
|
||||
data : parseUri(url, strictMode),
|
||||
|
||||
// get various attributes from the URI
|
||||
attr : function( attr ) {
|
||||
attr = aliases[attr] || attr;
|
||||
return typeof attr !== 'undefined' ? this.data.attr[attr] : this.data.attr;
|
||||
},
|
||||
|
||||
// return query string parameters
|
||||
param : function( param ) {
|
||||
return typeof param !== 'undefined' ? this.data.param.query[param] : this.data.param.query;
|
||||
},
|
||||
|
||||
// return fragment parameters
|
||||
fparam : function( param ) {
|
||||
return typeof param !== 'undefined' ? this.data.param.fragment[param] : this.data.param.fragment;
|
||||
},
|
||||
|
||||
// return path segments
|
||||
segment : function( seg ) {
|
||||
if ( typeof seg === 'undefined' ) {
|
||||
return this.data.seg.path;
|
||||
} else {
|
||||
seg = seg < 0 ? this.data.seg.path.length + seg : seg - 1; // negative segments count from the end
|
||||
return this.data.seg.path[seg];
|
||||
}
|
||||
},
|
||||
|
||||
// return fragment segments
|
||||
fsegment : function( seg ) {
|
||||
if ( typeof seg === 'undefined' ) {
|
||||
return this.data.seg.fragment;
|
||||
} else {
|
||||
seg = seg < 0 ? this.data.seg.fragment.length + seg : seg - 1; // negative segments count from the end
|
||||
return this.data.seg.fragment[seg];
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
purl.jQuery = function($){
|
||||
if ($ != null) {
|
||||
$.fn.url = function( strictMode ) {
|
||||
var url = '';
|
||||
if ( this.length ) {
|
||||
url = $(this).attr( getAttrName(this[0]) ) || '';
|
||||
}
|
||||
return purl( url, strictMode );
|
||||
};
|
||||
|
||||
$.url = purl;
|
||||
}
|
||||
};
|
||||
|
||||
purl.jQuery(window.jQuery);
|
||||
|
||||
return purl;
|
||||
|
||||
});
|
||||
19
zoesch.de/test/js/scrolling-nav.js
Normal file
19
zoesch.de/test/js/scrolling-nav.js
Normal file
@@ -0,0 +1,19 @@
|
||||
//jQuery to collapse the navbar on scroll
|
||||
$(window).scroll(function() {
|
||||
if ($(".navbar").offset().top > 50) {
|
||||
$(".navbar-fixed-top").addClass("top-nav-collapse");
|
||||
} else {
|
||||
$(".navbar-fixed-top").removeClass("top-nav-collapse");
|
||||
}
|
||||
});
|
||||
|
||||
//jQuery for page scrolling feature - requires jQuery Easing plugin
|
||||
$(function() {
|
||||
$('a.page-scroll').bind('click', function(event) {
|
||||
var $anchor = $(this);
|
||||
$('html, body').stop().animate({
|
||||
scrollTop: $($anchor.attr('href')).offset().top
|
||||
}, 1500, 'easeInOutExpo');
|
||||
event.preventDefault();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user