pretix_whitelabel/signals.py aktualisiert

This commit is contained in:
tino committed 2026-11-06 18:24:29 +01:00
1 parent d3d31a1689
commit 8843b1e653
1 file changed
+28 -37
+28 -37
View File
@@ -9,11 +9,11 @@ FALKENTHAL_INJECTION = """
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<link rel="stylesheet" type="text/css" href="{css_url}?v=1.8.1">
<link rel="stylesheet" type="text/css" href="{css_url}?v=1.7.3">
<style>
/* Veranstalter-Badge im Footer */
.falkenthal-organizer-badge {{
.falkenthal-organizer-badge {
display: inline-block;
font-family: 'Space Grotesk', monospace;
font-size: 11px;
@@ -26,10 +26,10 @@ FALKENTHAL_INJECTION = """
padding: 1px 6px;
margin-right: 6px;
vertical-align: middle;
}}
}
/* Untere Plattform-Leiste (System-Ebene) */
.falkenthal-platform-bar {{
.falkenthal-platform-bar {
margin-top: 14px;
padding: 12px 16px;
border-top: 1px solid rgba(0, 210, 255, 0.12);
@@ -39,71 +39,62 @@ FALKENTHAL_INJECTION = """
color: #64748b;
line-height: 1.6;
width: 100%;
}}
}
.falkenthal-platform-bar .ft-brand {{
.falkenthal-platform-bar .ft-brand {
font-family: 'Space Grotesk', sans-serif;
color: #94a3b8;
font-weight: 600;
letter-spacing: 0.04em;
}}
}
.falkenthal-platform-bar a {{
.falkenthal-platform-bar a {
color: #94a3b8 !important;
text-decoration: none !important;
transition: color 0.2s ease, text-shadow 0.2s ease;
font-weight: 500;
}}
}
.falkenthal-platform-bar a:hover {{
.falkenthal-platform-bar a:hover {
color: #00d2ff !important;
text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}}
}
.falkenthal-platform-bar .ft-sep {{
.falkenthal-platform-bar .ft-sep {
margin: 0 6px;
color: #334155;
}}
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function() {{
// 1. Vorherige Leisten bereinigen
document.querySelectorAll('.falkenthal-platform-bar').forEach(function(el) {{
document.addEventListener("DOMContentLoaded", function() {
// Vorherige Leisten bereinigen
document.querySelectorAll('.falkenthal-platform-bar').forEach(function(el) {
el.remove();
}});
});
var footer = document.querySelector('footer, .footer, #footer');
if (!footer) {{
if (!footer) {
footer = document.querySelector('body');
}}
}
if (footer) {{
// 2. Entferne unerwünschte Standard-AGPL-/Pretix-Texte im Footer
footer.querySelectorAll('*').forEach(function(el) {{
if (el.children.length === 0 && (el.textContent.includes('basierend auf pretix') || el.textContent.includes('Theme-Plugin') || el.textContent.includes('Quellcode'))) {{
// Wenn das Element nur dieser Text ist, ausblenden
var p = el.closest('p') || el.closest('li') || el;
if (p !== footer) p.style.display = 'none';
}}
}));
// 3. Veranstalter-Badge bei echten Veranstalter-Links einfügen
var orgLinks = Array.from(footer.querySelectorAll('a')).filter(function(a) {{
if (footer) {
// Veranstalter-Badge bei echten Veranstalter-Links einfügen
var orgLinks = Array.from(footer.querySelectorAll('a')).filter(function(a) {
return a.offsetParent !== null &&
!a.href.includes('agpl_source') &&
!a.href.includes('pretix.eu') &&
!a.href.includes('falkenthal.me');
}});
});
if (orgLinks.length > 0 && !footer.querySelector('.falkenthal-organizer-badge')) {{
if (orgLinks.length > 0 && !footer.querySelector('.falkenthal-organizer-badge')) {
var badge = document.createElement('span');
badge.className = 'falkenthal-organizer-badge';
badge.textContent = 'Veranstalter';
orgLinks[0].parentNode.insertBefore(badge, orgLinks[0]);
}}
}
// 4. Saubere Plattform-Leiste anhängen
// Saubere Plattform-Leiste anhängen
var bar = document.createElement('div');
bar.className = 'falkenthal-platform-bar';
bar.innerHTML =
@@ -116,8 +107,8 @@ document.addEventListener("DOMContentLoaded", function() {{
'<a href="https://tickets.falkenthal.me/agpl_source">Quellcode (AGPLv3)</a>';
footer.appendChild(bar);
}}
}});
}
});
</script>
"""