Modernes Goju-Kai Dojo Theme, visuelles Hauptseiten-Dashboard (Kyu-Wegweiser & Kacheln) und Mobile-Menue
Deploy Development / deploy (push) Successful in 18s

This commit is contained in:
Lars Stommer committed 2026-10-24 22:08:17 +02:00
1 parent b5da977ae1
commit 5e62482c56
5 files changed
+1034 -38

No files matched your search

@@ -4,11 +4,12 @@
.karate-media-wrapper {
display: inline-block;
max-width: 100%;
margin: 4px 0;
margin: 6px 0;
background: #1a1a1a;
border-radius: 6px;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
border: 1px solid #2e2e2e;
}
.karate-video-player {
@@ -20,59 +21,702 @@
.karate-video-controls {
display: flex;
gap: 4px;
padding: 4px 8px;
background: #262626;
border-top: 1px solid #3a3a3a;
gap: 5px;
padding: 6px 10px;
background: #1f1f1f;
border-top: 1px solid #333;
justify-content: flex-end;
align-items: center;
flex-wrap: wrap;
}
.km-controls-label {
font-size: 11px;
color: #9ca3af;
margin-right: auto;
font-weight: 600;
letter-spacing: 0.02em;
}
.karate-video-controls button {
background: #3a3a3a;
color: #e0e0e0;
border: 1px solid #505050;
border-radius: 3px;
padding: 2px 7px;
font-size: 11px;
background: #333333;
color: #f3f4f6;
border: 1px solid #4b5563;
border-radius: 4px;
padding: 3px 9px;
font-size: 11.5px;
font-weight: 500;
cursor: pointer;
line-height: 1.3;
transition: all 0.15s ease;
}
.karate-video-controls button:hover {
background: #505050;
background: #4b5563;
color: #fff;
}
.karate-video-controls button.active {
background: #b71c1c;
border-color: #d32f2f;
background: #e41b1b;
border-color: #ef4444;
color: #fff;
font-weight: bold;
font-weight: 700;
}
.karate-media-missing {
display: inline-block;
padding: 4px 8px;
background: #ffebee;
border: 1px solid #ef9a9a;
border-radius: 4px;
color: #b71c1c;
padding: 6px 10px;
background: #fef2f2;
border: 1px solid #fecaca;
border-radius: 6px;
color: #b91c1c;
font-size: 0.9rem;
}
/* ============================================================================
* 2. Wiki-Seitenleisten-Logo (#p-logo) optimal fuer das breite Banner-Logo
* 2. Modernes Goju-Kai Dojo Theme (Seitenleiste, Header, Content, Tabellen)
* ============================================================================ */
#p-logo,
#p-logo a.mw-wiki-logo {
width: 10.5em !important;
height: 5.5em !important;
background-size: 92% auto !important;
body.mediawiki:not(.mw-special-Userlogin) {
background-color: #f3f4f6 !important;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
color: #1f2937 !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-page-base {
background: #f3f4f6 !important;
height: 4.5em !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-head-base {
margin-top: -4.5em !important;
height: 4.5em !important;
border-bottom: none !important;
}
/* Edle dunkle Dojo-Seitenleiste links (#mw-panel) passend zu karate.hn */
body.mediawiki:not(.mw-special-Userlogin) #mw-panel {
background: #1a1a1a !important;
color: #e5e7eb !important;
width: 11.5em !important;
padding-top: 0 !important;
top: 0 !important;
bottom: 0 !important;
min-height: 100vh !important;
box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15) !important;
border-right: 3px solid #e41b1b !important;
z-index: 100;
}
/* Weisses Vereinslogo (logo-light.svg) auf der dunklen Seitenleiste */
body.mediawiki:not(.mw-special-Userlogin) #p-logo {
width: 100% !important;
height: 6.2em !important;
margin: 0 0 0.8em 0 !important;
padding: 0.6em 0.5em !important;
box-sizing: border-box !important;
background: #121212 !important;
border-bottom: 1px solid #2e2e2e !important;
position: static !important;
}
body.mediawiki:not(.mw-special-Userlogin) #p-logo a.mw-wiki-logo {
width: 100% !important;
height: 5em !important;
background-image: url('/resources/assets/logo-light.svg') !important;
background-size: 94% auto !important;
background-position: center center !important;
background-repeat: no-repeat !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-portal {
margin: 0 0.7em 1em 0.7em !important;
padding: 0.4em 0 !important;
background-image: none !important;
border-bottom: 1px solid #2d2d2d !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal h3,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-heading {
color: #e41b1b !important;
font-size: 0.78rem !important;
font-weight: 700 !important;
text-transform: uppercase !important;
letter-spacing: 0.06em !important;
padding: 0.3em 0.5em !important;
margin: 0 0 0.25em 0 !important;
border: none !important;
background-image: none !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal .body,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-content {
margin-left: 0 !important;
padding-top: 0 !important;
background-image: none !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal ul,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-content-list {
list-style: none !important;
margin: 0 !important;
padding: 0 !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal li,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-content-list li {
margin: 0 !important;
padding: 0 !important;
font-size: 0.88rem !important;
line-height: 1.35 !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal li a,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-content-list li a {
display: block !important;
padding: 0.42em 0.65em !important;
color: #e5e7eb !important;
text-decoration: none !important;
border-radius: 5px !important;
transition: background-color 0.15s ease, color 0.15s ease !important;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .portal li a:hover,
body.mediawiki:not(.mw-special-Userlogin) #mw-panel .vector-menu-content-list li a:hover {
background-color: #2d2d2d !important;
color: #ffffff !important;
}
/* Content-Karte (#content.mw-body) */
body.mediawiki:not(.mw-special-Userlogin) #content.mw-body {
margin-left: 12.6em !important;
margin-right: 1.2em !important;
margin-top: 0.4em !important;
margin-bottom: 2em !important;
padding: 1.75em 2.2em 2.4em 2.2em !important;
background: #ffffff !important;
border: 1px solid #e5e7eb !important;
border-radius: 12px !important;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}
body.mediawiki:not(.mw-special-Userlogin) #left-navigation {
margin-left: 12.6em !important;
}
body.mediawiki:not(.mw-special-Userlogin) #footer {
margin-left: 12.6em !important;
}
/* Typografie & Überschriften im Artikel */
body.mediawiki:not(.mw-special-Userlogin) .mw-body-content {
font-size: 0.98rem !important;
line-height: 1.65 !important;
color: #1f2937 !important;
}
body.mediawiki:not(.mw-special-Userlogin) h1.firstHeading {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
font-size: 1.85rem !important;
font-weight: 800 !important;
color: #111827 !important;
border-bottom: 3px solid #e41b1b !important;
padding-bottom: 0.3em !important;
margin-bottom: 0.8em !important;
}
/* Auf der Hauptseite blenden wir die nackte Überschrift "Hauptseite" aus, da unser Dojo-Hero-Banner oben steht */
body.page-Hauptseite.action-view h1.firstHeading,
body.page-Hauptseite.action-view #siteSub {
display: none !important;
}
body.mediawiki:not(.mw-special-Userlogin) .mw-body-content h2 {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
font-size: 1.38rem !important;
font-weight: 700 !important;
color: #111827 !important;
border-bottom: 2px solid #e5e7eb !important;
padding-bottom: 0.25em !important;
margin-top: 1.6em !important;
}
body.mediawiki:not(.mw-special-Userlogin) .mw-body-content h3 {
font-size: 1.15rem !important;
font-weight: 700 !important;
color: #1f2937 !important;
}
/* Moderne Tabellen-Darstellung (auch fuer alte 2014er border="1" Video-Tabellen!) */
#mw-content-text table {
border-collapse: collapse !important;
border: 1px solid #e5e7eb !important;
border-radius: 8px !important;
overflow: hidden !important;
margin: 1em 0 !important;
background: #ffffff !important;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}
#mw-content-text table th {
background: #1a1a1a !important;
color: #ffffff !important;
font-weight: 600 !important;
padding: 10px 14px !important;
border: 1px solid #2e2e2e !important;
text-align: left !important;
}
#mw-content-text table td {
padding: 10px 14px !important;
border: 1px solid #e5e7eb !important;
vertical-align: top !important;
}
#mw-content-text table tr:nth-child(even) td {
background-color: #f9fafb !important;
}
/* Inhaltsverzeichnis (#toc) modernisieren */
#toc, .toc {
background-color: #f9fafb !important;
border: 1px solid #e5e7eb !important;
border-left: 4px solid #e41b1b !important;
border-radius: 8px !important;
padding: 14px 18px !important;
box-shadow: none !important;
}
/* ============================================================================
* 3. Vereins-Anmeldeseite (Spezial:Anmelden / .mw-special-Userlogin)
* 3. Visuelles Dojo-Dashboard auf der Hauptseite (.kd-dashboard)
* ============================================================================ */
.kd-dashboard {
margin-bottom: 2.2rem;
}
.kd-hero {
background: linear-gradient(135deg, #1a1a1a 0%, #2b1414 100%);
border-bottom: 4px solid #e41b1b;
border-radius: 12px;
padding: 28px 32px;
color: #ffffff;
margin-bottom: 24px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.kd-hero-kicker {
display: inline-block;
background: #e41b1b;
color: #ffffff;
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.08em;
padding: 3px 10px;
border-radius: 99px;
margin-bottom: 10px;
}
.kd-hero-title {
margin: 0 0 8px 0 !important;
padding: 0 !important;
border: none !important;
font-size: 1.75rem !important;
font-weight: 800 !important;
color: #ffffff !important;
line-height: 1.25 !important;
}
.kd-hero-subtitle {
margin: 0 0 18px 0 !important;
color: #d1d5db !important;
font-size: 0.96rem !important;
max-width: 760px;
}
.kd-hero-search {
display: flex;
gap: 10px;
max-width: 680px;
}
.kd-hero-search-input {
flex: 1;
padding: 11px 16px;
border-radius: 8px;
border: 1px solid #4b5563;
background: #ffffff;
color: #111827;
font-size: 0.96rem;
outline: none;
}
.kd-hero-search-input:focus {
border-color: #e41b1b;
box-shadow: 0 0 0 3px rgba(228, 27, 27, 0.25);
}
.kd-hero-search-btn {
background: #e41b1b;
color: #ffffff;
border: none;
border-radius: 8px;
padding: 11px 22px;
font-size: 0.96rem;
font-weight: 700;
cursor: pointer;
transition: background-color 0.15s ease;
}
.kd-hero-search-btn:hover {
background: #c81616;
}
/* Gürtel-Wegweiser (Kyu-Karten) */
.kd-belt-section {
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 20px 24px;
margin-bottom: 24px;
}
.kd-section-header {
display: flex;
justify-content: space-between;
align-items: baseline;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 14px;
}
.kd-section-title {
margin: 0 !important;
padding: 0 !important;
border: none !important;
font-size: 1.15rem !important;
font-weight: 800 !important;
color: #111827 !important;
}
.kd-section-links {
font-size: 0.86rem;
}
.kd-section-links a {
color: #b91c1c !important;
font-weight: 600;
text-decoration: none;
}
.kd-section-links a:hover {
text-decoration: underline;
}
.kd-belt-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
gap: 10px;
}
.kd-belt-card {
display: flex;
align-items: center;
gap: 11px;
padding: 10px 12px;
background: #ffffff;
border: 1px solid #d1d5db;
border-radius: 8px;
text-decoration: none !important;
color: #111827 !important;
transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.kd-belt-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
border-color: #9ca3af;
}
.kd-belt-stripe {
width: 14px;
height: 36px;
border-radius: 4px;
flex-shrink: 0;
border: 1px solid rgba(0, 0, 0, 0.2);
}
/* Echte Gürtelfarben für 9. bis 1. Kyu */
.belt-9kyu .kd-belt-stripe {
background: linear-gradient(180deg, #ffffff 0%, #ffffff 50%, #facc15 50%, #facc15 100%);
}
.belt-8kyu .kd-belt-stripe {
background: #facc15;
}
.belt-7kyu .kd-belt-stripe {
background: #f97316;
}
.belt-6kyu .kd-belt-stripe {
background: #16a34a;
}
.belt-5kyu .kd-belt-stripe,
.belt-4kyu .kd-belt-stripe {
background: #2563eb;
}
.belt-3kyu .kd-belt-stripe,
.belt-2kyu .kd-belt-stripe,
.belt-1kyu .kd-belt-stripe {
background: #78350f;
}
.kd-belt-info {
display: flex;
flex-direction: column;
line-height: 1.2;
}
.kd-belt-kyu {
font-size: 0.92rem;
font-weight: 800;
color: #111827;
}
.kd-belt-name {
font-size: 0.78rem;
color: #6b7280;
font-weight: 500;
}
/* 6 Themen-Kacheln (.kd-cards-grid) */
.kd-cards-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
gap: 18px;
margin-bottom: 26px;
}
.kd-topic-card {
background: #ffffff;
border: 1px solid #e5e7eb;
border-radius: 12px;
padding: 20px 22px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
display: flex;
flex-direction: column;
border-top: 4px solid #1a1a1a;
}
.kd-topic-card.kd-card-red {
border-top-color: #e41b1b;
}
.kd-card-badge {
display: inline-block;
align-self: flex-start;
font-size: 0.68rem;
font-weight: 800;
letter-spacing: 0.07em;
padding: 2px 8px;
border-radius: 4px;
background: #f3f4f6;
color: #4b5563;
margin-bottom: 6px;
}
.kd-card-red .kd-card-badge {
background: #fef2f2;
color: #b91c1c;
}
.kd-card-title {
margin: 0 0 6px 0 !important;
padding: 0 !important;
border: none !important;
font-size: 1.18rem !important;
font-weight: 800 !important;
color: #111827 !important;
}
.kd-card-desc {
margin: 0 0 14px 0 !important;
font-size: 0.87rem !important;
color: #6b7280 !important;
line-height: 1.45 !important;
}
.kd-card-list {
list-style: none !important;
margin: 0 !important;
padding: 0 !important;
border-top: 1px solid #f3f4f6;
}
.kd-card-list li {
margin: 0 !important;
padding: 0 !important;
border-bottom: 1px solid #f3f4f6;
}
.kd-card-list li:last-child {
border-bottom: none;
}
.kd-card-list li a {
display: flex;
justify-content: space-between;
align-items: center;
padding: 7px 4px;
color: #1f2937 !important;
font-weight: 600;
font-size: 0.9rem;
text-decoration: none !important;
transition: color 0.12s ease, padding-left 0.12s ease;
}
.kd-card-list li a::after {
content: "→";
color: #9ca3af;
font-weight: 400;
}
.kd-card-list li a:hover {
color: #e41b1b !important;
padding-left: 8px;
}
.kd-card-list li a:hover::after {
color: #e41b1b;
}
/* Kata-Pills in der Kata-Videothek-Karte */
.kd-kata-grid {
display: flex;
flex-wrap: wrap;
gap: 7px;
padding-top: 6px;
}
.kd-kata-pill {
display: inline-block;
padding: 6px 11px;
background: #f3f4f6;
border: 1px solid #d1d5db;
border-radius: 6px;
font-size: 0.84rem;
font-weight: 600;
color: #1f2937 !important;
text-decoration: none !important;
transition: all 0.12s ease;
}
.kd-kata-pill:hover {
background: #e41b1b;
border-color: #e41b1b;
color: #ffffff !important;
}
.kd-kata-pill-all {
background: #1a1a1a;
border-color: #1a1a1a;
color: #ffffff !important;
}
.kd-classic-divider {
display: flex;
align-items: center;
text-align: center;
margin: 12px 0 4px 0;
color: #6b7280;
font-size: 0.82rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.kd-classic-divider::before,
.kd-classic-divider::after {
content: "";
flex: 1;
border-bottom: 1px solid #e5e7eb;
}
.kd-classic-divider span {
padding: 0 14px;
}
/* ============================================================================
* 4. Mobile & Tablet Optimierung (Hamburger-Menü & Responsive Layout)
* ============================================================================ */
.km-mobile-menu-btn {
display: none;
position: fixed;
bottom: 18px;
right: 18px;
z-index: 1001;
background: #e41b1b;
color: #ffffff;
border: none;
border-radius: 99px;
padding: 12px 18px;
font-size: 0.92rem;
font-weight: 700;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
cursor: pointer;
}
@media (max-width: 900px) {
.km-mobile-menu-btn {
display: inline-flex;
align-items: center;
gap: 6px;
}
body.mediawiki:not(.mw-special-Userlogin) #mw-panel {
position: fixed !important;
left: -13em !important;
top: 0 !important;
bottom: 0 !important;
width: 12.2em !important;
overflow-y: auto !important;
transition: left 0.22s ease !important;
z-index: 1000 !important;
}
body.mediawiki.km-sidebar-open:not(.mw-special-Userlogin) #mw-panel {
left: 0 !important;
}
body.mediawiki:not(.mw-special-Userlogin) #content.mw-body,
body.mediawiki:not(.mw-special-Userlogin) #left-navigation,
body.mediawiki:not(.mw-special-Userlogin) #footer {
margin-left: 0.6em !important;
margin-right: 0.6em !important;
}
body.mediawiki:not(.mw-special-Userlogin) #content.mw-body {
padding: 1.1em 1.1em 1.8em 1.1em !important;
}
.kd-hero {
padding: 20px 18px;
}
.kd-hero-title {
font-size: 1.35rem !important;
}
.kd-hero-search {
flex-direction: column;
}
#mw-content-text table {
display: block !important;
overflow-x: auto !important;
}
}
/* ============================================================================
* 5. Vereins-Anmeldeseite (Spezial:Anmelden / .mw-special-Userlogin)
* ============================================================================ */
body.mw-special-Userlogin {
background: linear-gradient(135deg, #f4f1ea 0%, #e8e2d5 100%) !important;
@@ -105,7 +749,6 @@ body.mw-special-Userlogin #content.mw-body {
margin-bottom: 22px;
}
/* Dunkler Dojo-Header-Balken wie auf karate.hn fuer das breite weisse SVG-Logo */
.karate-login-brand {
display: flex;
flex-direction: column;
@@ -1,6 +1,46 @@
( function () {
'use strict';
// 1. Mobiler Menü-Button fuer Smartphones & kleine Tablets
function initMobileMenu() {
if ( document.body.classList.contains( 'mw-special-Userlogin' ) ) {
return;
}
if ( document.querySelector( '.km-mobile-menu-btn' ) ) {
return;
}
var panel = document.getElementById( 'mw-panel' );
if ( !panel ) {
return;
}
var btn = document.createElement( 'button' );
btn.type = 'button';
btn.className = 'km-mobile-menu-btn';
btn.innerHTML = '☰ Dojo-Menü';
btn.addEventListener( 'click', function ( ev ) {
ev.stopPropagation();
var isOpen = document.body.classList.toggle( 'km-sidebar-open' );
btn.innerHTML = isOpen ? '✕ Schließen' : '☰ Dojo-Menü';
} );
document.body.appendChild( btn );
document.addEventListener( 'click', function ( ev ) {
if ( document.body.classList.contains( 'km-sidebar-open' ) &&
!ev.target.closest( '#mw-panel' ) &&
!ev.target.closest( '.km-mobile-menu-btn' ) ) {
document.body.classList.remove( 'km-sidebar-open' );
btn.innerHTML = '☰ Dojo-Menü';
}
} );
}
if ( document.readyState === 'loading' ) {
document.addEventListener( 'DOMContentLoaded', initMobileMenu );
} else {
initMobileMenu();
}
// 2. Zeitlupen- & Loop-Steuerung fuer alle Karate-Videos
document.addEventListener( 'click', function ( ev ) {
var speedBtn = ev.target.closest( '.km-speed-btn' );
if ( speedBtn ) {
@@ -123,13 +123,15 @@ class KarateMediaHooks {
}
/**
* Laedt CSS und JS fuer die Video-Steuerung sowie die gestaltete Vereins-Anmeldeseite.
* Fängt auch MediaWikis interne "Special:Badtitle" ("Anmeldung erforderlich") Seite ab
* und leitet sofort per HTTP 302 auf Spezial:Anmelden weiter.
* Laedt CSS und JS fuer die Video-Steuerung, das moderne Dojo-Theme, das Hauptseiten-Dashboard
* sowie die gestaltete Vereins-Anmeldeseite.
*/
public static function onBeforePageDisplay( $out, $skin ): void {
$out->addModules( [ 'ext.karateMedia' ] );
// Wichtig fuer moderne Smartphone- & Tablet-Darstellung
$out->addMeta( 'viewport', 'width=device-width, initial-scale=1.0' );
$title = $out->getTitle();
$user = $out->getUser();
@@ -149,7 +151,7 @@ class KarateMediaHooks {
}
if ( $title && $title->isSpecial( 'Userlogin' ) ) {
global $wgLogo, $wgKarateLoginTitle, $wgKarateLoginSubtitle, $wgKarateLoginNotice, $wgKarateAccessRequestUrl;
global $wgKarateLoginTitle, $wgKarateLoginSubtitle, $wgKarateLoginNotice, $wgKarateAccessRequestUrl;
$loginTitle = $wgKarateLoginTitle ?? 'Goju-Kai Dojo Heilbronn e.V.';
$loginSubtitle = $wgKarateLoginSubtitle ?? 'Internes Vereins-Wiki & Technik-Videothek';
@@ -213,7 +215,287 @@ class KarateMediaHooks {
$out->prependHTML( $headerCard );
$out->addHTML( $footerLinks );
return;
}
// Visuelles Dojo-Dashboard auf der Hauptseite (im Lese-Modus)
$action = $out->getRequest()->getVal( 'action', 'view' );
if ( $title && $title->isMainPage() && $user->isRegistered() && $action === 'view' ) {
$out->prependHTML( self::buildMainPageDashboard() );
}
}
/**
* Erzeugt das visuelle Dojo-Dashboard (Gürtel-Wegweiser & Themen-Kacheln) fuer die Hauptseite.
*/
private static function pageUrl( string $pageName ): string {
$t = Title::newFromText( $pageName );
return $t ? $t->getLocalURL() : ( '/index.php?title=' . rawurlencode( $pageName ) );
}
private static function buildMainPageDashboard(): string {
$belts = [
[
'kyu' => '9. Kyu',
'name' => 'Weiß-Gelb',
'class' => 'belt-9kyu',
'page' => 'IGKR Prüfungsanforderungen 9. Kyu',
],
[
'kyu' => '8. Kyu',
'name' => 'Gelbgurt',
'class' => 'belt-8kyu',
'page' => 'IGKR Prüfungsanforderungen 8. Kyu',
],
[
'kyu' => '7. Kyu',
'name' => 'Orangegurt',
'class' => 'belt-7kyu',
'page' => 'IGKR Prüfungsanforderungen 7. Kyu',
],
[
'kyu' => '6. Kyu',
'name' => 'Grüngurt',
'class' => 'belt-6kyu',
'page' => 'IGKR Prüfungsanforderungen 6. Kyu',
],
[
'kyu' => '5. Kyu',
'name' => 'Blaugurt I',
'class' => 'belt-5kyu',
'page' => 'IGKR Prüfungsanforderungen 5. Kyu',
],
[
'kyu' => '4. Kyu',
'name' => 'Blaugurt II',
'class' => 'belt-4kyu',
'page' => 'IGKR Prüfungsanforderungen 4. Kyu',
],
[
'kyu' => '3. Kyu',
'name' => 'Braungurt I',
'class' => 'belt-3kyu',
'page' => 'IGKR Prüfungsanforderungen 3. Kyu',
],
[
'kyu' => '2. Kyu',
'name' => 'Braungurt II',
'class' => 'belt-2kyu',
'page' => 'IGKR Prüfungsanforderungen 2. Kyu',
],
[
'kyu' => '1. Kyu',
'name' => 'Braungurt III',
'class' => 'belt-1kyu',
'page' => 'IGKR Prüfungsanforderungen 1. Kyu',
],
];
$beltHtml = '';
foreach ( $belts as $b ) {
$beltHtml .= Html::rawElement(
'a',
[
'href' => self::pageUrl( $b['page'] ),
'class' => 'kd-belt-card ' . $b['class'],
],
Html::element( 'span', [ 'class' => 'kd-belt-stripe' ], '' ) .
Html::rawElement(
'span',
[ 'class' => 'kd-belt-info' ],
Html::element( 'strong', [ 'class' => 'kd-belt-kyu' ], $b['kyu'] ) .
Html::element( 'span', [ 'class' => 'kd-belt-name' ], $b['name'] )
)
);
}
$cards = [
[
'badge' => 'EINSTEIGER',
'title' => 'Neu im Dojo? Hier starten!',
'desc' => 'Die wichtigsten Grundlagen für deine ersten Trainingswochen im Goju-Kai Dojo.',
'accent' => 'kd-card-red',
'links' => [
[ 'Obi binden', 'Gürtel (Obi) richtig binden' ],
[ 'Dojo Rei', 'Begrüßung & Etikette im Dojo' ],
[ 'Dojokun', 'Dojokun – Unsere Verhaltensregeln' ],
[ 'Karate Wörterbuch', 'Karate-Wörterbuch (Japanisch – Deutsch)' ],
[ 'Körperwaffen', 'Körperwaffen im Goju-Ryu' ],
],
],
[
'badge' => 'FORMEN (KATA)',
'title' => 'Kata-Videothek',
'desc' => 'Alle Schüler- und Meister-Katas mit Lehrvideos und Zeitlupen-Steuerung.',
'accent' => 'kd-card-dark',
'pills' => [
[ 'Goju-Ryu_Kata', 'Alle Katas' ],
[ 'Taikyoku Jodan', 'Taikyoku Jodan' ],
[ 'Taikyoku Chudan', 'Taikyoku Chudan' ],
[ 'Taikyoku Gedan', 'Taikyoku Gedan' ],
[ 'Gekisai Dai Ichi', 'Gekisai Dai Ichi' ],
[ 'Gekisai Dai Ni', 'Gekisai Dai Ni' ],
[ 'Saifa', 'Saifa' ],
[ 'Seienchin', 'Seienchin' ],
[ 'Sanseru', 'Sanseru' ],
[ 'Seisan', 'Seisan' ],
[ 'Seipai', 'Seipai' ],
[ 'Sanchin', 'Sanchin' ],
[ 'Tensho', 'Tensho' ],
],
],
[
'badge' => 'GRUNDSCHULE',
'title' => 'Kihon & Grundtechniken',
'desc' => 'Stände, Abwehrblöcke, Fauststöße, Fußtritte und Würfe Schritt für Schritt erklärt.',
'accent' => 'kd-card-red',
'links' => [
[ 'Dachi-Waza', 'Dachi-Waza – Stellungen & Stände' ],
[ 'Uke-Waza', 'Uke-Waza – Abwehr- & Blocktechniken' ],
[ 'Zuki-Waza', 'Zuki-Waza – Fauststoßtechniken' ],
[ 'Keri-Waza', 'Keri-Waza – Fuß- & Tritttechniken' ],
[ 'Uchi-Waza', 'Uchi-Waza – Schlagtechniken' ],
[ 'Nage-Waza', 'Nage-Waza – Wurftechniken & Feger' ],
[ 'Kihon-Ido', 'Kihon-Ido – Grundschule in Bewegung' ],
],
],
[
'badge' => 'PARTNER & PRAXIS',
'title' => 'Kumite & Selbstverteidigung',
'desc' => 'Partnerformen, Bunkai-Anwendungen, Hebeltechniken und realistische Abwehr.',
'accent' => 'kd-card-dark',
'links' => [
[ 'Kumite', 'Kumite – Übersicht & Formen' ],
[ 'Yakusoku-Kumite', 'Yakusoku-Kumite (abgesprochener Kampf)' ],
[ 'Sedeho Kumite', 'Sedeho Kumite (Zeitlupen-Kumite)' ],
[ 'Selbstverteidigung', 'Selbstverteidigung (SV-Videos)' ],
[ 'Hebeltechniken', 'Hebeltechniken & Fixierungen' ],
[ 'Kakie', 'Kakie – Klebende Hände' ],
],
],
[
'badge' => 'ATHLETIK & SPIELE',
'title' => 'Fitness, Dehnung & Kinder',
'desc' => 'Übungen für zu Hause und fürs Dojo: Beweglichkeit, Kraft, Reaktion und Koordination.',
'accent' => 'kd-card-red',
'links' => [
[ 'Dehnung - Koordination - Lockern', 'Dehnung, Koordination & Lockern (34 Videos)' ],
[ 'Muskelaufbau', 'Muskelaufbau & Kräftigung' ],
[ 'Schnelligkeit und Reaktionzeit', 'Schnelligkeit, Agilität & Reaktionszeit' ],
[ 'Partnerübungen mit Pratze', 'Partnerübungen mit und ohne Pratze' ],
[ '5 Tibeter', 'Die 5 Tibeter & Energieübungen' ],
[ 'Kindertraining', 'Kindertraining & Karatespiele' ],
],
],
[
'badge' => 'DOJO & VIDEOS',
'title' => 'Aufzeichnungen & Hintergrund',
'desc' => 'Mitschnitte aus dem Training, Physik der Karate-Techniken und Geschichte.',
'accent' => 'kd-card-dark',
'links' => [
[ 'Letzte Trainings', 'Video-Mitschnitte der letzten Trainings' ],
[ 'Training beim Sensei', 'Training beim Sensei' ],
[ 'Technikabläufe physikalisch erkärt', 'Technikabläufe physikalisch erklärt' ],
[ 'Prüfungsordnung des IGKR', 'Prüfungsordnung (IGKR & DKV)' ],
[ 'Geschichte des Karate', 'Geschichte des Goju-Ryu Karate' ],
],
],
];
$cardsHtml = '';
foreach ( $cards as $c ) {
$bodyHtml = '';
if ( isset( $c['links'] ) ) {
$li = '';
foreach ( $c['links'] as $pair ) {
$li .= Html::rawElement(
'li',
[],
Html::element( 'a', [ 'href' => self::pageUrl( $pair[0] ) ], $pair[1] )
);
}
$bodyHtml = Html::rawElement( 'ul', [ 'class' => 'kd-card-list' ], $li );
} elseif ( isset( $c['pills'] ) ) {
$pills = '';
foreach ( $c['pills'] as $idx => $pair ) {
$pillClass = $idx === 0 ? 'kd-kata-pill kd-kata-pill-all' : 'kd-kata-pill';
$pills .= Html::element(
'a',
[ 'href' => self::pageUrl( $pair[0] ), 'class' => $pillClass ],
$pair[1]
);
}
$bodyHtml = Html::rawElement( 'div', [ 'class' => 'kd-kata-grid' ], $pills );
}
$cardsHtml .= Html::rawElement(
'div',
[ 'class' => 'kd-topic-card ' . $c['accent'] ],
Html::element( 'span', [ 'class' => 'kd-card-badge' ], $c['badge'] ) .
Html::element( 'h3', [ 'class' => 'kd-card-title' ], $c['title'] ) .
Html::element( 'p', [ 'class' => 'kd-card-desc' ], $c['desc'] ) .
$bodyHtml
);
}
return Html::rawElement(
'div',
[ 'class' => 'kd-dashboard' ],
// 1. Hero-Banner mit Schnellsuche
Html::rawElement(
'div',
[ 'class' => 'kd-hero' ],
Html::rawElement(
'div',
[ 'class' => 'kd-hero-content' ],
Html::element( 'span', [ 'class' => 'kd-hero-kicker' ], 'GOJU-KAI DOJO HEILBRONN E.V.' ) .
Html::element( 'h2', [ 'class' => 'kd-hero-title' ], 'Dojo-Wissen & Technik-Videothek' ) .
Html::element(
'p',
[ 'class' => 'kd-hero-subtitle' ],
'Wähle unten deinen nächsten Gürtelgrad (Kyu), starte mit dem Einsteiger-Guide oder suche direkt nach einer Kata oder Technik:'
) .
Html::rawElement(
'form',
[ 'action' => '/index.php', 'method' => 'get', 'class' => 'kd-hero-search' ],
Html::element( 'input', [ 'type' => 'hidden', 'name' => 'title', 'value' => 'Spezial:Suche' ] ) .
Html::element( 'input', [
'type' => 'search',
'name' => 'search',
'placeholder' => 'Technik, Kata oder Begriff suchen (z. B. Seienchin, Mawashi-Geri, Dojokun) …',
'class' => 'kd-hero-search-input',
] ) .
Html::element( 'button', [ 'type' => 'submit', 'class' => 'kd-hero-search-btn' ], 'Suchen' )
)
)
) .
// 2. Gürtel-Wegweiser (Kyu-Prüfungsanforderungen)
Html::rawElement(
'div',
[ 'class' => 'kd-belt-section' ],
Html::rawElement(
'div',
[ 'class' => 'kd-section-header' ],
Html::element( 'h3', [ 'class' => 'kd-section-title' ], 'Dein Weg zum nächsten Gürtel – Prüfungsprogramm (IGKR)' ) .
Html::rawElement(
'div',
[ 'class' => 'kd-section-links' ],
Html::element( 'a', [ 'href' => self::pageUrl( 'Prüfungsordnung des IGKR' ) ], 'IGKR-Ordnung' ) .
' · ' .
Html::element( 'a', [ 'href' => self::pageUrl( 'Prüfungsordnung des DKV' ) ], 'DKV-Ordnung' )
)
) .
Html::rawElement( 'div', [ 'class' => 'kd-belt-grid' ], $beltHtml )
) .
// 3. Themen-Kacheln
Html::rawElement( 'div', [ 'class' => 'kd-cards-grid' ], $cardsHtml ) .
// 4. Hinweis-Trenner zum klassischen Nachschlagewerk darunter
Html::rawElement(
'div',
[ 'class' => 'kd-classic-divider' ],
Html::element( 'span', [], 'Vollständiges Inhaltsverzeichnis & Hintergrundwissen' )
)
);
}
/**
@@ -225,8 +507,6 @@ class KarateMediaHooks {
}
$rawTarget = trim( $input );
// Entferne vorangestelltes "File:" oder "Datei:" falls vorhanden
$cleanFileName = preg_replace( '/^(file|datei|image|bild)\s*:\s*/i', '', $rawTarget );
$services = MediaWikiServices::getInstance();
@@ -255,10 +535,10 @@ class KarateMediaHooks {
];
if ( isset( $args['width'] ) && is_numeric( $args['width'] ) ) {
$attrs['width'] = (int)$args['width'];
$attrs['width'] = max( 280, (int)$args['width'] );
}
if ( isset( $args['height'] ) && is_numeric( $args['height'] ) ) {
$attrs['height'] = (int)$args['height'];
$attrs['height'] = max( 158, (int)$args['height'] );
}
if ( in_array( $ext, [ 'mp3', 'ogg' ], true ) && strpos( $file->getMimeType(), 'audio/' ) === 0 ) {
@@ -280,6 +560,7 @@ class KarateMediaHooks {
$controls = Html::rawElement(
'div',
[ 'class' => 'karate-video-controls', 'title' => 'Abspielgeschwindigkeit fuer Kata/Bunkai-Studium' ],
Html::element( 'span', [ 'class' => 'km-controls-label' ], 'Tempo:' ) .
Html::element( 'button', [ 'type' => 'button', 'class' => 'km-speed-btn active', 'data-speed' => '1' ], '1x' ) .
Html::element( 'button', [ 'type' => 'button', 'class' => 'km-speed-btn', 'data-speed' => '0.5' ], '0.5x' ) .
Html::element( 'button', [ 'type' => 'button', 'class' => 'km-speed-btn', 'data-speed' => '0.25' ], '0.25x' ) .
@@ -43,6 +43,14 @@ class KarateVideoHandler extends MediaHandler {
if ( !isset( $params['width'] ) || $params['width'] <= 0 ) {
$params['width'] = 320;
}
// Verhindere briefmarkengrosse 2014er Video-Player (z.B. 150x100px), in denen die Bedienelemente unbenutzbar sind
if ( $params['width'] < 280 ) {
$ratio = ( isset( $params['height'] ) && $params['height'] > 0 )
? ( $params['height'] / $params['width'] )
: ( 9 / 16 );
$params['width'] = 280;
$params['height'] = (int)round( 280 * $ratio );
}
if ( !isset( $params['height'] ) || $params['height'] <= 0 ) {
$params['height'] = (int)round( $params['width'] * 9 / 16 );
}
+24
View File
@@ -134,6 +134,30 @@ class MigrateHtml5MediaTags extends Maintenance {
$tagsReplacedTotal,
$dryRun ? 'gefunden (Dry-Run)' : 'erfolgreich auf [[Datei:...]] umgestellt'
) );
// Bereinige zusätzlich den fehlerhaften Tab-Einzug (<pre>-Box) auf der Hauptseite
$mainTitle = Title::newFromText( 'Hauptseite' );
if ( $mainTitle && !$dryRun ) {
$mainRev = $revisionLookup->getRevisionByTitle( $mainTitle );
if ( $mainRev ) {
$mainContent = $mainRev->getContent( SlotRecord::MAIN );
if ( $mainContent instanceof TextContent ) {
$mainText = $mainContent->getText();
$fixedMain = preg_replace( '/^\s+(Dieses Nachschlagewerk dient)/m', '$1', $mainText );
$fixedMain = str_replace( 'http://www.karate-sv-heilbronn.de/', 'https://karate.hn/', $fixedMain );
if ( $fixedMain !== $mainText ) {
$wp = $wikiPageFactory->newFromTitle( $mainTitle );
$up = $wp->newPageUpdater( $systemUser );
$up->setContent( SlotRecord::MAIN, ContentHandler::makeContent( $fixedMain, $mainTitle ) );
$up->saveRevision(
CommentStoreComment::newUnsavedComment( 'Hauptseite: Formatierungsfehler (<pre>-Einzug) & Vereinslink korrigiert' ),
EDIT_UPDATE | EDIT_MINOR | EDIT_FORCE_BOT | EDIT_SUPPRESS_RC
);
$this->output( "[UPDATE] Hauptseite (<pre>-Einzug & Vereinslink korrigiert)\n" );
}
}
}
}
}
}