This commit is contained in:
2026-07-11 15:14:35 +02:00
commit 82ae118d65
105 changed files with 26468 additions and 0 deletions

1022
js/custom.js Normal file

File diff suppressed because it is too large Load Diff

206
js/forms.js Normal file
View File

@@ -0,0 +1,206 @@
(function ($) {
"use strict";
var $document = $(document),
$window = $(window),
forms = {
contactForm: $('#contactform'),
appointmentForm: $('#appointment-form') ,
quoteForm: $('#quote-form')
};
$document.ready(function () {
// quote form
if (forms.quoteForm.length) {
var $quoteForm = forms.quoteForm;
$quoteForm.validate({
rules: {
name: {
required: true,
minlength: 2
},
message: {
required: true,
minlength: 20
},
email: {
required: true,
email: true
}
},
messages: {
name: {
required: "Please enter your name",
minlength: "Your name must consist of at least 2 characters"
},
message: {
required: "Please enter message",
minlength: "Your message must consist of at least 20 characters"
},
email: {
required: "Please enter your email"
}
},
submitHandler: function (form) {
$(form).ajaxSubmit({
type: "POST",
data: $(form).serialize(),
url: "form/process-quote.php",
success: function () {
$('#successQuote').fadeIn();
$('#quote-form').each(function () {
this.reset();
});
},
error: function () {
$('#quote-form').fadeTo("slow", 0, function () {
$('#errorQuote').fadeIn();
});
}
});
}
});
}
// appointment form
if (forms.appointmentForm.length) {
var $appointmentForm = forms.appointmentForm;
$appointmentForm.validate({
rules: {
name: {
required: true,
minlength: 2
},
message: {
required: true,
minlength: 20
},
email: {
required: true,
email: true
}
},
messages: {
name: {
required: "Please enter your name",
minlength: "Your name must consist of at least 2 characters"
},
message: {
required: "Please enter message",
minlength: "Your message must consist of at least 20 characters"
},
email: {
required: "Please enter your email"
}
},
submitHandler: function (form) {
$(form).ajaxSubmit({
type: "POST",
data: $(form).serialize(),
url: "form/process-appointment.php",
success: function () {
$('#successAppointment').fadeIn();
$('#appointment-form').each(function () {
this.reset();
});
},
error: function () {
$('#appointment-form').fadeTo("slow", 0, function () {
$('#errorAppointment').fadeIn();
});
}
});
}
});
}
// contact page form
if (forms.contactForm.length) {
var $contactform = forms.contactForm;
$contactform.validate({
rules: {
name: {
required: true,
minlength: 2
},
message: {
required: true,
minlength: 20
},
email: {
required: true,
email: true
}
},
messages: {
name: {
required: "Please enter your name",
minlength: "Your name must consist of at least 2 characters"
},
message: {
required: "Please enter message",
minlength: "Your message must consist of at least 20 characters"
},
email: {
required: "Please enter your email"
}
},
submitHandler: function (form) {
$(form).ajaxSubmit({
type: "POST",
data: $(form).serialize(),
url: "form/process-contact.php",
success: function () {
$('#success').fadeIn();
$('#contactform').each(function () {
this.reset();
});
},
error: function () {
$('#contactform').fadeTo("slow", 0, function () {
$('#error').fadeIn();
});
}
});
}
});
}
// datepicker
if ($('.datetimepicker').length) {
$('.datetimepicker').datetimepicker({
format: 'DD/MM/YYYY',
icons: {
time: 'icon icon-clock',
date: 'icon icon-calendar',
up: 'icon icon-arrow_up',
down: 'icon icon-arrow_down',
previous: 'icon icon-arrow-left',
next: 'icon icon-arrow-right',
today: 'icon icon-today',
clear: 'icon icon-trash',
close: 'icon icon-cancel-music'
}
});
}
if ($('.timepicker').length) {
$('.timepicker').datetimepicker({
format: 'LT',
icons: {
time: 'icon icon-clock',
up: 'icon icon-arrow_up',
down: 'icon icon-arrow_down',
previous: 'icon icon-arrow-left',
next: 'icon icon-arrow-right'
}
});
}
});
})(jQuery);

4
js/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

64
js/modern-map.js Normal file
View File

@@ -0,0 +1,64 @@
(function () {
"use strict";
var container = document.getElementById("footer-map-modern");
var footerColumn = document.querySelector(".page-footer .footer-col-right");
if (!container && footerColumn) {
footerColumn.innerHTML =
'<div class="modern-map-shell">' +
'<div id="footer-map-modern" class="footer-map footer-map-modern" aria-label="Interaktive Karte zur KFZ-Meisterwerkstatt Deniz"></div>' +
'<div class="map-location-card">' +
'<span class="map-location-kicker">Ihr Weg zu uns</span>' +
'<strong>KFZ-Meisterwerkstatt Deniz</strong>' +
'<span>Spitalstraße 25 · 67659 Kaiserslautern</span>' +
'<a href="https://www.google.com/maps/dir/?api=1&amp;destination=Spitalstra%C3%9Fe+25%2C+67659+Kaiserslautern" target="_blank" rel="noopener">Route planen <span aria-hidden="true">↗</span></a>' +
'</div>' +
'</div>';
container = document.getElementById("footer-map-modern");
}
if (!container || typeof maplibregl === "undefined") return;
var workshop = [7.763757080291502, 49.4460487802915];
var map = new maplibregl.Map({
container: container,
style: "https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",
center: workshop,
zoom: 14.7,
pitch: 18,
bearing: -7,
attributionControl: false,
renderWorldCopies: false
});
map.addControl(new maplibregl.NavigationControl({ showCompass: true }), "top-right");
map.addControl(new maplibregl.AttributionControl({ compact: true }), "bottom-right");
var markerElement = document.createElement("button");
markerElement.type = "button";
markerElement.className = "deniz-map-marker";
markerElement.setAttribute("aria-label", "KFZ-Meisterwerkstatt Deniz auf der Karte anzeigen");
var popup = new maplibregl.Popup({
offset: 30,
closeButton: false,
maxWidth: "250px"
}).setHTML("<strong>KFZ-Meisterwerkstatt Deniz</strong><span>Spitalstraße 25 · Kaiserslautern</span>");
new maplibregl.Marker({ element: markerElement, anchor: "bottom" })
.setLngLat(workshop)
.setPopup(popup)
.addTo(map);
map.on("load", function () {
window.setTimeout(function () {
map.resize();
popup.setLngLat(workshop).addTo(map);
}, 120);
});
window.addEventListener("resize", function () {
map.resize();
});
})();

13
js/modern-reviews.js Normal file
View File

@@ -0,0 +1,13 @@
(function () {
"use strict";
var tracks = document.querySelectorAll(".review-track");
tracks.forEach(function (track) {
var original = track.querySelector(".review-set");
if (!original || track.querySelectorAll(".review-set").length > 1) return;
var duplicate = original.cloneNode(true);
duplicate.setAttribute("aria-hidden", "true");
track.appendChild(duplicate);
});
})();

56
js/modern-site.js Normal file
View File

@@ -0,0 +1,56 @@
(function () {
"use strict";
document.querySelectorAll(".search-container").forEach(function (search) {
var column = search.closest("[class*='col-md-']");
if (column) column.remove();
else search.remove();
});
document.querySelectorAll("#slidemenu .col-md-11").forEach(function (navigation) {
navigation.classList.remove("col-md-11");
navigation.classList.add("col-md-12");
});
document.querySelectorAll(".page-footer .copyright").forEach(function (copyright) {
copyright.textContent = "© 2026 KFZ-Meisterwerkstatt Deniz · Alle Rechte vorbehalten";
});
})();
/* Was Wir Tun — bento grid: mouse spotlight + staggered scroll reveal */
(function () {
"use strict";
var cards = Array.prototype.slice.call(document.querySelectorAll(".wwt-card"));
if (!cards.length) return;
var fine = window.matchMedia && window.matchMedia("(hover: hover) and (pointer: fine)").matches;
if (fine) {
cards.forEach(function (card) {
card.addEventListener("mousemove", function (e) {
var r = card.getBoundingClientRect();
card.style.setProperty("--mx", (e.clientX - r.left) + "px");
card.style.setProperty("--my", (e.clientY - r.top) + "px");
});
});
}
/* reveal classes are added via JS only, so cards stay visible without JS */
if ("IntersectionObserver" in window) {
cards.forEach(function (card, i) {
card.style.setProperty("--wwt-i", i % 4);
card.classList.add("wwt-reveal");
});
var observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.classList.add("wwt-in");
observer.unobserve(entry.target);
}
});
}, { threshold: 0.15, rootMargin: "0px 0px -40px 0px" });
cards.forEach(function (card) { observer.observe(card); });
}
})();

File diff suppressed because one or more lines are too long

7
js/plugins/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
js/plugins/imagesloaded.pkgd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

12
js/plugins/isotope.pkgd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,80 @@
(function ($) {
$.fn.countTo = function (options) {
options = options || {};
return $(this).each(function () {
// set options for current element
var settings = $.extend({}, $.fn.countTo.defaults, {
from: $(this).data('from'),
to: $(this).data('to'),
speed: $(this).data('speed'),
refreshInterval: $(this).data('refresh-interval'),
decimals: $(this).data('decimals')
}, options);
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;
// references & variables that will change with each update
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data('countTo') || {};
$self.data('countTo', data);
// if an existing interval can be found, clear it first
if (data.interval) {
clearInterval(data.interval);
}
data.interval = setInterval(updateTimer, settings.refreshInterval);
// initialize the element with the starting value
render(value);
function updateTimer() {
value += increment;
loopCount++;
render(value);
if (typeof (settings.onUpdate) == 'function') {
settings.onUpdate.call(self, value);
}
if (loopCount >= loops) {
// remove the interval
$self.removeData('countTo');
clearInterval(data.interval);
value = settings.to;
if (typeof (settings.onComplete) == 'function') {
settings.onComplete.call(self, value);
}
}
}
function render(value) {
var formattedValue = settings.formatter.call(self, value, settings);
$self.html(formattedValue);
}
});
};
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 0, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
formatter: formatter, // handler for formatting the value before rendering
onUpdate: null, // callback method for every time the element is updated
onComplete: null // callback method for when the element finishes updating
};
function formatter(value, settings) {
return value.toFixed(settings.decimals);
}
}(jQuery));

1174
js/plugins/jquery.form.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

2
js/plugins/jquery.validate.min.js vendored Normal file

File diff suppressed because one or more lines are too long

7
js/plugins/jquery.waypoints.min.js vendored Normal file

File diff suppressed because one or more lines are too long

4301
js/plugins/moment.js Normal file

File diff suppressed because it is too large Load Diff

18
js/plugins/slick.min.js vendored Normal file

File diff suppressed because one or more lines are too long