Template
HSK-Vorlage aus der Olzinger-Website ableiten
Firmendaten durch Platzhalter ersetzt (Mustermann Haustechnik GmbH, Musterstraße 1, 12345 Musterstadt, 01234 567890, example.com), Design und Funktionen unverändert. - Feiertage im Öffnungsstatus per BUNDESLAND (alle 16 Länder) statt fest Bayern - Datenschutz: Aufsichtsbehörde als TODO je Bundesland - Skript-Namensraum olz -> hsk, Logo-SVG und OG-Bild neu - .webklar-preview.json von Olzinger entfernt (sonst Deploy auf olzinger) - .gitea/template: neue Repos aus der Vorlage erben die Preview-Datei nicht - README: Anleitung für neue HSK-Seiten, Platzhalter-Tabelle, Checkliste Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ad155124b1
commit
8da5102333
21 files changed
+238
-180
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Olzinger Haustechnik – Stylesheet
|
||||
HSK-Vorlage – Stylesheet
|
||||
Gestaltung: Wärmebild-Ästhetik · warm (Vorlauf) trifft kalt (Rücklauf)
|
||||
========================================================================== */
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 260 56" role="img" aria-label="Olzinger Haustechnik">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 290 56" role="img" aria-label="Mustermann Haustechnik">
|
||||
<defs>
|
||||
<linearGradient id="g" x1="0" y1="0" x2="1" y2="0">
|
||||
<stop offset="0" stop-color="#2E9BEF"/>
|
||||
@@ -8,6 +8,6 @@
|
||||
</defs>
|
||||
<path d="M17.1 43.6A19 19 0 1 1 38.9 43.6" fill="none" stroke="url(#g)" stroke-width="7" stroke-linecap="round"/>
|
||||
<circle cx="28" cy="28" r="4.4" fill="#0B151E"/>
|
||||
<text x="62" y="31" font-family="Instrument Sans, Arial, sans-serif" font-weight="700" font-size="26" letter-spacing="1" fill="#0B151E">OLZINGER</text>
|
||||
<text x="62" y="31" font-family="Instrument Sans, Arial, sans-serif" font-weight="700" font-size="26" letter-spacing="1" fill="#0B151E">MUSTERMANN</text>
|
||||
<text x="63" y="47" font-family="Instrument Sans, Arial, sans-serif" font-weight="500" font-size="10.5" letter-spacing="3.2" fill="#4D5963">HAUSTECHNIK</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 833 B After Width: | Height: | Size: 837 B |
Binary file not shown.
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 103 KiB |
+38
-11
@@ -1,10 +1,14 @@
|
||||
/* ==========================================================================
|
||||
Olzinger – Öffnungszeiten (live, inkl. bayerischer Feiertage) & Kontaktformular
|
||||
HSK-Vorlage – Öffnungszeiten (live, inkl. Feiertage des Bundeslands) & Kontaktformular
|
||||
========================================================================== */
|
||||
(function (w, d) {
|
||||
'use strict';
|
||||
|
||||
/* ---------- Öffnungszeiten ---------- */
|
||||
// Bundesland des Betriebs für die Feiertage:
|
||||
// BW BY BE BB HB HH HE MV NI NW RP SL SN ST SH TH
|
||||
var BUNDESLAND = 'BY';
|
||||
|
||||
// Minuten seit Mitternacht; Index = Wochentag (0 = Sonntag)
|
||||
var SCHEDULE = {
|
||||
0: [],
|
||||
@@ -31,23 +35,46 @@
|
||||
return Date.UTC(y, month - 1, day);
|
||||
}
|
||||
|
||||
// Gesetzliche Feiertage in Bayern (Gemeinde mit überwiegend katholischer Bevölkerung)
|
||||
// Gesetzliche Feiertage: bundesweit plus die des eingestellten Bundeslands.
|
||||
// Nur landesweite Feiertage; Fronleichnam in Teilen von Sachsen/Thüringen und
|
||||
// Mariä Himmelfahrt in Bayern gelten nicht überall (BY: hier mitgezählt, wie in
|
||||
// Gemeinden mit überwiegend katholischer Bevölkerung).
|
||||
var REGIONAL = {
|
||||
dreikoenige: ['BW', 'BY', 'ST'],
|
||||
frauentag: ['BE', 'MV'],
|
||||
fronleichnam: ['BW', 'BY', 'HE', 'NW', 'RP', 'SL'],
|
||||
mariae: ['BY', 'SL'],
|
||||
kindertag: ['TH'],
|
||||
reformation: ['BB', 'HB', 'HH', 'MV', 'NI', 'SN', 'ST', 'SH', 'TH'],
|
||||
allerheiligen: ['BW', 'BY', 'NW', 'RP', 'SL'],
|
||||
busstag: ['SN']
|
||||
};
|
||||
function inLand(key) { return REGIONAL[key].indexOf(BUNDESLAND) > -1; }
|
||||
|
||||
var holidayCache = {};
|
||||
function holidays(y) {
|
||||
if (holidayCache[y]) return holidayCache[y];
|
||||
var DAY = 864e5, e = easter(y), map = {};
|
||||
var add = function (t, name) { var dt = new Date(t); map[dt.getUTCMonth() + 1 + '-' + dt.getUTCDate()] = name; };
|
||||
add(Date.UTC(y, 0, 1), 'Neujahr');
|
||||
add(Date.UTC(y, 0, 6), 'Heilige Drei Könige');
|
||||
if (inLand('dreikoenige')) add(Date.UTC(y, 0, 6), 'Heilige Drei Könige');
|
||||
if (inLand('frauentag')) add(Date.UTC(y, 2, 8), 'Internationaler Frauentag');
|
||||
add(e - 2 * DAY, 'Karfreitag');
|
||||
add(e + 1 * DAY, 'Ostermontag');
|
||||
add(Date.UTC(y, 4, 1), 'Tag der Arbeit');
|
||||
add(e + 39 * DAY, 'Christi Himmelfahrt');
|
||||
add(e + 50 * DAY, 'Pfingstmontag');
|
||||
add(e + 60 * DAY, 'Fronleichnam');
|
||||
add(Date.UTC(y, 7, 15), 'Mariä Himmelfahrt');
|
||||
if (inLand('fronleichnam')) add(e + 60 * DAY, 'Fronleichnam');
|
||||
if (inLand('mariae')) add(Date.UTC(y, 7, 15), 'Mariä Himmelfahrt');
|
||||
if (inLand('kindertag')) add(Date.UTC(y, 8, 20), 'Weltkindertag');
|
||||
add(Date.UTC(y, 9, 3), 'Tag der Deutschen Einheit');
|
||||
add(Date.UTC(y, 10, 1), 'Allerheiligen');
|
||||
if (inLand('reformation')) add(Date.UTC(y, 9, 31), 'Reformationstag');
|
||||
if (inLand('allerheiligen')) add(Date.UTC(y, 10, 1), 'Allerheiligen');
|
||||
if (inLand('busstag')) {
|
||||
// Mittwoch vor dem 23. November
|
||||
var nov23 = Date.UTC(y, 10, 23);
|
||||
add(nov23 - (((new Date(nov23).getUTCDay() + 4) % 7) || 7) * DAY, 'Buß- und Bettag');
|
||||
}
|
||||
add(Date.UTC(y, 11, 25), '1. Weihnachtstag');
|
||||
add(Date.UTC(y, 11, 26), '2. Weihnachtstag');
|
||||
return (holidayCache[y] = map);
|
||||
@@ -124,7 +151,7 @@
|
||||
var ts = form.querySelector('[data-ts]');
|
||||
if (ts) ts.value = String(Date.now());
|
||||
|
||||
var RECIPIENT = 'kontakt@olzinger.de';
|
||||
var RECIPIENT = 'kontakt@example.com';
|
||||
var fields = {
|
||||
name: form.querySelector('[name="name"]'),
|
||||
email: form.querySelector('[name="email"]'),
|
||||
@@ -164,8 +191,8 @@
|
||||
Array.prototype.forEach.call(radios, function (r) { r.checked = (r.value === topic); });
|
||||
}
|
||||
|
||||
w.addEventListener('olz:topic', function (e) { selectTopic(e.detail); });
|
||||
w.addEventListener('olz:prefill', function (e) {
|
||||
w.addEventListener('hsk:topic', function (e) { selectTopic(e.detail); });
|
||||
w.addEventListener('hsk:prefill', function (e) {
|
||||
var det = e.detail || {};
|
||||
selectTopic(det.topic);
|
||||
if (det.message && fields.message) {
|
||||
@@ -186,7 +213,7 @@
|
||||
String(data.get('message') || '')
|
||||
];
|
||||
return 'mailto:' + RECIPIENT +
|
||||
'?subject=' + encodeURIComponent('Anfrage über olzinger.de – ' + topic) +
|
||||
'?subject=' + encodeURIComponent('Anfrage über example.com – ' + topic) +
|
||||
'&body=' + encodeURIComponent(lines.join('\n'));
|
||||
}
|
||||
|
||||
@@ -213,7 +240,7 @@
|
||||
setStatus('error', 'Bitte prüfen Sie Ihre Angaben – einige Felder sind unvollständig.');
|
||||
} else {
|
||||
w.location.href = buildMail(data);
|
||||
setStatus('info', '<strong>Fast geschafft:</strong> Ihr E-Mail-Programm öffnet sich mit Ihrer vorbereiteten Anfrage – bitte dort nur noch auf „Senden“ klicken. Alternativ erreichen Sie uns unter <a href="tel:+4987172617">0871 72617</a>.');
|
||||
setStatus('info', '<strong>Fast geschafft:</strong> Ihr E-Mail-Programm öffnet sich mit Ihrer vorbereiteten Anfrage – bitte dort nur noch auf „Senden“ klicken. Alternativ erreichen Sie uns unter <a href="tel:+491234567890">01234 567890</a>.');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Olzinger – Heizungs-Finder
|
||||
HSK-Vorlage – Heizungs-Finder
|
||||
Vier Fragen → erste, unverbindliche Empfehlung (Wärmepumpe / Pellets / Hybrid).
|
||||
Das Ergebnis kann direkt ins Kontaktformular übernommen werden.
|
||||
========================================================================== */
|
||||
@@ -193,7 +193,7 @@
|
||||
var applyBtn = result.querySelector('[data-finder-apply]');
|
||||
if (applyBtn) {
|
||||
applyBtn.addEventListener('click', function () {
|
||||
w.dispatchEvent(new CustomEvent('olz:prefill', {
|
||||
w.dispatchEvent(new CustomEvent('hsk:prefill', {
|
||||
detail: { topic: applyBtn.getAttribute('data-topic'), message: applyBtn.getAttribute('data-message') }
|
||||
}));
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Olzinger – Energie-Haus
|
||||
HSK-Vorlage – Energie-Haus
|
||||
Tabs + Hotspots steuern, welches System im Hausschnitt hervorgehoben wird.
|
||||
========================================================================== */
|
||||
(function (w, d) {
|
||||
|
||||
+6
-6
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Olzinger – Hauptskript
|
||||
HSK-Vorlage – Hauptskript
|
||||
Navigation, mobiles Menü, dezente Einblendungen, Leistungs-Karussell (mobil)
|
||||
und Kartenstapel (Desktop). Bewusst ohne Bibliotheken.
|
||||
========================================================================== */
|
||||
@@ -12,17 +12,17 @@
|
||||
|
||||
var reduce = w.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
var hasIO = 'IntersectionObserver' in w;
|
||||
w.__olzReady = true;
|
||||
w.__hskReady = true;
|
||||
|
||||
/* ---------- Dynamische Jahreszahlen ---------- */
|
||||
var nowYear = new Date().getFullYear();
|
||||
$$('[data-current-year]').forEach(function (el) { el.textContent = nowYear; });
|
||||
$$('[data-years]').forEach(function (el) { el.textContent = nowYear - 1985; });
|
||||
$$('[data-years]').forEach(function (el) { el.textContent = nowYear - 1990; });
|
||||
|
||||
/* ---------- Wärmebild (ruhiger Hintergrund im Hero) ---------- */
|
||||
var canvas = $('[data-thermal]');
|
||||
if (canvas && w.OlzThermal) {
|
||||
var thermal = w.OlzThermal.init(canvas, {
|
||||
if (canvas && w.HskThermal) {
|
||||
var thermal = w.HskThermal.init(canvas, {
|
||||
hero: $('[data-hero]'),
|
||||
calm: $('.hero__aside'),
|
||||
reduceMotion: reduce
|
||||
@@ -64,7 +64,7 @@
|
||||
d.addEventListener('click', function (e) {
|
||||
var a = e.target.closest('a[href*="#"]');
|
||||
if (!a) return;
|
||||
if (a.dataset.topic) w.dispatchEvent(new CustomEvent('olz:topic', { detail: a.dataset.topic }));
|
||||
if (a.dataset.topic) w.dispatchEvent(new CustomEvent('hsk:topic', { detail: a.dataset.topic }));
|
||||
if (menuOpen) setMenu(false);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* ==========================================================================
|
||||
Olzinger – „Wärmebild“ (WebGL)
|
||||
HSK-Vorlage – „Wärmebild“ (WebGL)
|
||||
Ein ruhiges thermografisches Feld mit Isothermen als Hero-Hintergrund.
|
||||
Eine langsam wandernde Wärmequelle hält das Bild lebendig – ganz ohne
|
||||
Maus- oder Touch-Interaktion. Hinter Fließtext wird die Wärme gedämpft.
|
||||
@@ -283,5 +283,5 @@
|
||||
|
||||
function d() { return document; }
|
||||
|
||||
w.OlzThermal = { init: init };
|
||||
w.HskThermal = { init: init };
|
||||
})(window);
|
||||
Reference in new issue
Block a user