Upgrade auf MediaWiki 1.46.2 (neuestes Release) & moderne Goju-Kai Dojo Vereinsanmeldeseite
Deploy Development / deploy (push) Successful in 1m12s
Deploy Development / deploy (push) Successful in 1m12s
This commit is contained in:
1 parent
994bfd9b5b
commit
48784a59af
6 files changed
+248
-15
No files matched your search
@@ -1,3 +1,6 @@
|
||||
/* ============================================================================
|
||||
* 1. KarateMedia Video-Player & Zeitlupen-Steuerung
|
||||
* ============================================================================ */
|
||||
.karate-media-wrapper {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
@@ -56,3 +59,169 @@
|
||||
border-radius: 4px;
|
||||
color: #b71c1c;
|
||||
}
|
||||
|
||||
/* ============================================================================
|
||||
* 2. Vereins-Anmeldeseite (Spezial:Anmelden / .mw-special-Userlogin)
|
||||
* ============================================================================ */
|
||||
body.mw-special-Userlogin {
|
||||
background: linear-gradient(135deg, #f4f1ea 0%, #e8e2d5 100%) !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin #mw-page-base,
|
||||
body.mw-special-Userlogin #mw-head-base,
|
||||
body.mw-special-Userlogin #mw-panel,
|
||||
body.mw-special-Userlogin #left-navigation,
|
||||
body.mw-special-Userlogin #p-views,
|
||||
body.mw-special-Userlogin #p-cactions,
|
||||
body.mw-special-Userlogin .firstHeading,
|
||||
body.mw-special-Userlogin #siteSub,
|
||||
body.mw-special-Userlogin #footer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin #content.mw-body {
|
||||
margin: 40px auto !important;
|
||||
max-width: 520px !important;
|
||||
padding: 32px 36px !important;
|
||||
background: #ffffff !important;
|
||||
border: none !important;
|
||||
border-top: 5px solid #9b1b1b !important;
|
||||
border-radius: 12px !important;
|
||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12) !important;
|
||||
}
|
||||
|
||||
.karate-login-hero {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.karate-login-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 18px;
|
||||
padding-bottom: 18px;
|
||||
margin-bottom: 18px;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
|
||||
.karate-login-logo {
|
||||
width: 76px;
|
||||
height: auto;
|
||||
flex-shrink: 0;
|
||||
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
|
||||
}
|
||||
|
||||
.karate-login-title {
|
||||
margin: 0 0 4px 0 !important;
|
||||
padding: 0 !important;
|
||||
border: none !important;
|
||||
font-size: 1.55rem !important;
|
||||
font-weight: 700 !important;
|
||||
color: #1f1f1f !important;
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
|
||||
.karate-login-subtitle {
|
||||
margin: 0 !important;
|
||||
font-size: 0.95rem !important;
|
||||
color: #9b1b1b !important;
|
||||
font-weight: 600 !important;
|
||||
}
|
||||
|
||||
.karate-login-notice {
|
||||
background: #faf7f2;
|
||||
border-left: 4px solid #9b1b1b;
|
||||
border-radius: 6px;
|
||||
padding: 14px 16px;
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.5;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.karate-login-notice p {
|
||||
margin: 0 0 8px 0 !important;
|
||||
}
|
||||
|
||||
.karate-login-notice p:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.karate-login-contact {
|
||||
font-size: 0.86rem;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.karate-login-contact a {
|
||||
color: #9b1b1b !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin #userloginForm {
|
||||
float: none !important;
|
||||
width: 100% !important;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin .mw-htmlform-field-HTMLTextField input {
|
||||
width: 100% !important;
|
||||
box-sizing: border-box !important;
|
||||
padding: 10px 12px !important;
|
||||
font-size: 1rem !important;
|
||||
border: 1px solid #ccc !important;
|
||||
border-radius: 6px !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin .mw-htmlform-field-HTMLTextField input:focus {
|
||||
border-color: #9b1b1b !important;
|
||||
outline: none !important;
|
||||
box-shadow: 0 0 0 3px rgba(155, 27, 27, 0.15) !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin #wpLoginAttempt {
|
||||
width: 100% !important;
|
||||
padding: 11px 16px !important;
|
||||
margin-top: 8px !important;
|
||||
background-color: #9b1b1b !important;
|
||||
border-color: #7f1414 !important;
|
||||
color: #ffffff !important;
|
||||
font-size: 1rem !important;
|
||||
font-weight: 600 !important;
|
||||
border-radius: 6px !important;
|
||||
cursor: pointer !important;
|
||||
transition: background-color 0.15s ease !important;
|
||||
}
|
||||
|
||||
body.mw-special-Userlogin #wpLoginAttempt:hover {
|
||||
background-color: #7f1414 !important;
|
||||
}
|
||||
|
||||
.karate-login-footer-links {
|
||||
margin-top: 22px;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid #eee;
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.karate-login-footer-links a {
|
||||
color: #555 !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.karate-login-footer-links a:hover {
|
||||
color: #9b1b1b !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.karate-login-sep {
|
||||
margin: 0 8px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
body.mw-special-Userlogin #content.mw-body {
|
||||
margin: 16px 12px !important;
|
||||
padding: 22px 20px !important;
|
||||
}
|
||||
}
|
||||
@@ -2,35 +2,90 @@
|
||||
|
||||
namespace MediaWiki\Extension\KarateMedia;
|
||||
|
||||
use Html;
|
||||
use MediaWiki\Html\Html;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use OutputPage;
|
||||
use Parser;
|
||||
use PPFrame;
|
||||
use Skin;
|
||||
use Title;
|
||||
use MediaWiki\Title\Title;
|
||||
|
||||
class KarateMediaHooks {
|
||||
|
||||
/**
|
||||
* Registriert das <html5media>-Tag fuer Abwaertskompatibilitaet mit bestehenden Wiki-Seiten.
|
||||
*/
|
||||
public static function onParserFirstCallInit( Parser $parser ): bool {
|
||||
public static function onParserFirstCallInit( $parser ): bool {
|
||||
$parser->setHook( 'html5media', [ self::class, 'renderHtml5MediaTag' ] );
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt CSS und JS fuer die Video-Steuerung (z.B. Zeitlupe fuer Kata/Bunkai).
|
||||
* Laedt CSS und JS fuer die Video-Steuerung sowie die gestaltete Vereins-Anmeldeseite.
|
||||
*/
|
||||
public static function onBeforePageDisplay( OutputPage $out, Skin $skin ): void {
|
||||
public static function onBeforePageDisplay( $out, $skin ): void {
|
||||
$out->addModules( [ 'ext.karateMedia' ] );
|
||||
|
||||
$title = $out->getTitle();
|
||||
if ( $title && $title->isSpecial( 'Userlogin' ) ) {
|
||||
global $wgLogo, $wgKarateLoginTitle, $wgKarateLoginSubtitle, $wgKarateLoginNotice, $wgEmergencyContact;
|
||||
|
||||
$loginTitle = $wgKarateLoginTitle ?? 'Goju-Kai Karate-Do';
|
||||
$loginSubtitle = $wgKarateLoginSubtitle ?? 'Internes Vereins-Wiki & Technik-Videothek';
|
||||
$loginNotice = $wgKarateLoginNotice ?? (
|
||||
'Willkommen im Trainings- und Nachschlagewerk unseres Karate-Vereins! ' .
|
||||
'Hier findest du alle Kata-, Bunkai- und Kihon-Lehrvideos, Prüfungsordnungen sowie unser Dojo-Wissen. ' .
|
||||
'Der Zugriff ist geschützt und ausschließlich für aktive Vereinsmitglieder freigeschaltet.'
|
||||
);
|
||||
$contactEmail = $wgEmergencyContact ?? 'Wiki@gojukai-dojo.de';
|
||||
$logoUrl = $wgLogo ?: '/resources/assets/logo_goju-kai_Bleistift.png';
|
||||
|
||||
$headerCard = Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'karate-login-hero' ],
|
||||
Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'karate-login-brand' ],
|
||||
Html::element( 'img', [
|
||||
'src' => $logoUrl,
|
||||
'alt' => $loginTitle,
|
||||
'class' => 'karate-login-logo',
|
||||
] ) .
|
||||
Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'karate-login-headings' ],
|
||||
Html::element( 'h2', [ 'class' => 'karate-login-title' ], $loginTitle ) .
|
||||
Html::element( 'p', [ 'class' => 'karate-login-subtitle' ], $loginSubtitle )
|
||||
)
|
||||
) .
|
||||
Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'karate-login-notice' ],
|
||||
Html::element( 'p', [], $loginNotice ) .
|
||||
Html::rawElement(
|
||||
'p',
|
||||
[ 'class' => 'karate-login-contact' ],
|
||||
'Noch kein Benutzerkonto oder Probleme beim Anmelden? Schreib kurz an ' .
|
||||
Html::element( 'a', [ 'href' => 'mailto:' . $contactEmail ], $contactEmail ) . '.'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$footerLinks = Html::rawElement(
|
||||
'div',
|
||||
[ 'class' => 'karate-login-footer-links' ],
|
||||
Html::element( 'a', [ 'href' => '/index.php?title=Karate:Impressum' ], 'Impressum' ) .
|
||||
Html::element( 'span', [ 'class' => 'karate-login-sep' ], '·' ) .
|
||||
Html::element( 'a', [ 'href' => '/index.php?title=Karate:Datenschutz' ], 'Datenschutz' ) .
|
||||
Html::element( 'span', [ 'class' => 'karate-login-sep' ], '·' ) .
|
||||
Html::element( 'a', [ 'href' => 'mailto:' . $contactEmail ], 'Kontakt & Zugang anfragen' )
|
||||
);
|
||||
|
||||
$out->prependHTML( $headerCard );
|
||||
$out->addHTML( $footerLinks );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rendert <html5media height="200" width="300">File:Beispiel.mp4</html5media>
|
||||
*/
|
||||
public static function renderHtml5MediaTag( ?string $input, array $args, Parser $parser, PPFrame $frame ): string {
|
||||
public static function renderHtml5MediaTag( ?string $input, array $args, $parser, $frame ): string {
|
||||
if ( $input === null || trim( $input ) === '' ) {
|
||||
return Html::element( 'span', [ 'class' => 'error' ], 'KarateMedia: Keine Mediendatei angegeben.' );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user