mAi: #3 - Impressum-Konsistenz: shared als Single-Source-of-Truth
- shared/impressum.js: Name korrigiert (msbls/flexsiebels = Matthias Siebels, nicht Martin), echte Adresse aus youpc.org übernommen (c/o Online-Impressum.de #5892, Sankt Augustin). Neuer Owner 'flexsiebels', neuer Owner 'martinsiebels' (für Martin als separate Person mit eigener Adresse in Osnabrück). data-variant als offizielles Attribut, data-style weiterhin als Legacy-Alias. Rendert in #impressum falls vorhanden, sonst footer. - paragraphenraiter.de: hardcoded "Ein Projekt von Matthias Flexsiebels" → shared (msbls minimal) - patentonkel.de: hardcoded "Matthias Flexsiebels" + kaputter window.__impressum() → shared (msbls minimal) - smartin3.de: inline Impressum-Text → shared (martinsiebels full) in #impressum Div - ichbinotto.de: shared (flexsiebels full) mit echter § 5 TMG-Angabe Caddyfile: Regenerierung hat fehlende Einträge für 6034.de, traihard.de, zensiebels.de ergänzt. Refs: #3
This commit is contained in:
@@ -1,45 +1,77 @@
|
||||
/**
|
||||
* Modulares Impressum für Onepager-Sites.
|
||||
* Modulares Impressum — Single Source of Truth für alle Onepager-Sites.
|
||||
*
|
||||
* Einbinden: <script src="/shared/impressum.js"></script>
|
||||
* Einbinden:
|
||||
* <script src="/shared/impressum.js"></script>
|
||||
* <script src="/shared/impressum.js" data-owner="flexsiebels"></script>
|
||||
* <script src="/shared/impressum.js" data-owner="flexsiebels" data-variant="full"></script>
|
||||
*
|
||||
* Konfiguration via data-Attribute am Script-Tag:
|
||||
* data-owner="msbls" (default) — Kurzform, msbls.de Satire-Impressum
|
||||
* data-owner="martinsiebels" — Volles Impressum Martin Siebels
|
||||
* data-style="minimal" (default) — Einzeiler
|
||||
* data-style="full" — Komplettes Impressum mit Adresse etc.
|
||||
* data-owner="msbls" (default) — Kurzverweis auf msbls.de
|
||||
* data-owner="flexsiebels" — Kurzverweis auf flexsiebels.de
|
||||
* data-owner="martinsiebels" — volles Impressum Martin Siebels (separate Person, Osnabrück)
|
||||
* data-variant="minimal" (default) — Einzeiler im Footer
|
||||
* data-variant="full" — vollständige Angaben nach § 5 TMG
|
||||
*
|
||||
* Legacy-Alias: data-style (gleiche Werte wie data-variant).
|
||||
*
|
||||
* Render-Ziel: Element mit id="impressum" falls vorhanden, sonst <footer>, sonst body.
|
||||
*/
|
||||
(function () {
|
||||
const script = document.currentScript;
|
||||
const owner = script?.getAttribute('data-owner') || 'msbls';
|
||||
const style = script?.getAttribute('data-style') || 'minimal';
|
||||
const variant = script?.getAttribute('data-variant')
|
||||
|| script?.getAttribute('data-style')
|
||||
|| 'minimal';
|
||||
|
||||
// Gemeinsamer Block für Matthias Siebels (m) — beide Domains, gleiche Anschrift.
|
||||
const matthiasAddress = 'Matthias Siebels<br>'
|
||||
+ 'c/o Online-Impressum.de #5892<br>'
|
||||
+ 'Europaring 90<br>'
|
||||
+ '53757 Sankt Augustin';
|
||||
|
||||
const owners = {
|
||||
msbls: {
|
||||
minimal: 'Ein Projekt von <a href="https://msbls.de" target="_blank" rel="noopener">msbls.de</a>',
|
||||
full: '<strong>Angaben gemäß § 5 TMG:</strong><br>msbls.de — Martin Siebels<br><a href="https://msbls.de/impressum" target="_blank" rel="noopener">Vollständiges Impressum</a>',
|
||||
full: '<strong>Angaben gemäß § 5 TMG:</strong><br>'
|
||||
+ matthiasAddress + '<br>'
|
||||
+ 'E-Mail: <a href="mailto:mail@msbls.de">mail@msbls.de</a>',
|
||||
},
|
||||
flexsiebels: {
|
||||
minimal: 'Ein Projekt von <a href="https://flexsiebels.de" target="_blank" rel="noopener">flexsiebels.de</a>',
|
||||
full: '<strong>Angaben gemäß § 5 TMG:</strong><br>'
|
||||
+ matthiasAddress + '<br>'
|
||||
+ 'E-Mail: <a href="mailto:mail@flexsiebels.de">mail@flexsiebels.de</a>',
|
||||
},
|
||||
martinsiebels: {
|
||||
minimal: 'Ein Projekt von <a href="https://martinsiebels.de" target="_blank" rel="noopener">Martin Siebels</a>',
|
||||
full: '<strong>Angaben gemäß § 5 TMG:</strong><br>'
|
||||
+ 'Martin Siebels<br>'
|
||||
+ 'Leyer Str. 38<br>'
|
||||
+ '49076 Osnabrück<br>'
|
||||
+ 'E-Mail: <a href="mailto:Martin_Siebels@web.de">Martin_Siebels@web.de</a>',
|
||||
},
|
||||
};
|
||||
|
||||
const config = owners[owner] || owners.msbls;
|
||||
const html = config[style] || config.minimal;
|
||||
const html = config[variant] || config.minimal;
|
||||
|
||||
// Impressum-Element erstellen
|
||||
const el = document.createElement('div');
|
||||
el.className = 'onepager-impressum';
|
||||
el.innerHTML = html;
|
||||
|
||||
// Styling — erbt Farben vom footer/body, bleibt dezent
|
||||
el.style.cssText = 'text-align:center;font-size:0.7rem;opacity:0.5;padding:8px 0;margin-top:4px;';
|
||||
el.querySelector('a')?.style && Object.assign(el.querySelector('a').style, {
|
||||
color: 'inherit', textDecoration: 'none'
|
||||
// Dezent, erbt Farben vom Container.
|
||||
el.style.cssText = 'text-align:center;font-size:0.75rem;opacity:0.6;padding:12px 0;margin-top:4px;line-height:1.7;';
|
||||
el.querySelectorAll('a').forEach(a => {
|
||||
a.style.color = 'inherit';
|
||||
a.style.textDecoration = 'underline';
|
||||
a.style.textDecorationThickness = '1px';
|
||||
a.style.textUnderlineOffset = '2px';
|
||||
});
|
||||
|
||||
// Einfügen: in <footer> falls vorhanden, sonst ans body-Ende
|
||||
const footer = document.querySelector('footer .container, footer');
|
||||
if (footer) {
|
||||
footer.appendChild(el);
|
||||
} else {
|
||||
document.body.appendChild(el);
|
||||
}
|
||||
const target = document.getElementById('impressum')
|
||||
|| document.querySelector('footer .container')
|
||||
|| document.querySelector('footer')
|
||||
|| document.body;
|
||||
target.appendChild(el);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user