Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aabc4e37e5 | |||
| d5baf0cadb | |||
| 4b28dc465d | |||
| 9a36bd94d0 | |||
| 33a1fe6848 | |||
| f1eabc1c9d | |||
| ad1ff1843b | |||
| 9fe45108d8 | |||
| f315469c41 | |||
| 5987417f36 | |||
| 79b798d5fe | |||
| ea1331c266 | |||
| 903333cac3 | |||
| 446e08dc91 | |||
| 231cf8fc6c | |||
| 2f93e98220 | |||
| 43f19e926a | |||
| 41e46b8804 |
@@ -1,42 +1,74 @@
|
||||
<?php
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// === 1. Stylesheets korrekt laden ===
|
||||
function child_theme_enqueue_styles() {
|
||||
// Lädt das Stylesheet des Parent Themes
|
||||
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
|
||||
|
||||
// Lädt das Stylesheet des Child Themes (abhängig vom Parent-Style)
|
||||
wp_enqueue_style( 'child-style',
|
||||
get_stylesheet_directory_uri() . '/style.css',
|
||||
array( 'parent-style' ),
|
||||
wp_get_theme()->get('Version')
|
||||
);
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles' );
|
||||
|
||||
|
||||
// === 2. Nur das FAQ-Skript austauschen ===
|
||||
function child_theme_swap_faq_script() {
|
||||
// Entfernt das Skript, das das Parent Theme geladen hat
|
||||
wp_deregister_script( 'faq-accordion-script' );
|
||||
|
||||
// Lädt Ihr neues, verbessertes Skript aus dem Child Theme
|
||||
// Wir verwenden den gleichen Namen ('Handle'), um Konflikte zu vermeiden
|
||||
wp_enqueue_script(
|
||||
'faq-accordion-script', // Gleicher Name wie im Parent Theme
|
||||
get_stylesheet_directory_uri() . '/js/faq-accordion.js', // Pfad zur neuen JS-Datei
|
||||
array( 'jquery' ),
|
||||
'1.0',
|
||||
true
|
||||
);
|
||||
}
|
||||
// Diese Funktion wird mit einer höheren Priorität (20) ausgeführt,
|
||||
// also NACHDEM das Parent Theme sein Skript geladen hat.
|
||||
add_action( 'wp_enqueue_scripts', 'child_theme_swap_faq_script', 20 );
|
||||
|
||||
<?php
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* =============================================================================
|
||||
* HAUPTFUNKTION: Stylesheets korrekt laden
|
||||
* =============================================================================
|
||||
*
|
||||
* Diese Funktion lädt das Stylesheet des Parents zuerst.
|
||||
* Danach wird das Stylesheet des Childs geladen.
|
||||
* So können CSS-Regeln im Child Theme das Parent Theme gezielt überschreiben.
|
||||
*/
|
||||
function minecraft_modern_child_enqueue_styles() {
|
||||
// 1. Das Stylesheet des Parent Themes laden
|
||||
// get_template_directory_uri() zeigt auf den Ordner des Parent Themes.
|
||||
// Der Handle 'minecraft-modern-style' sollte exakt dem im Parent übereinstimmen.
|
||||
$parent_style = 'minecraft-modern-style';
|
||||
|
||||
wp_enqueue_style(
|
||||
$parent_style,
|
||||
get_template_directory_uri() . '/style.css',
|
||||
array(),
|
||||
wp_get_theme( get_template() )->get( 'Version' ) // WICHTIG: Wir nutzen die Version des Parents
|
||||
);
|
||||
|
||||
// 2. Das Stylesheet des Child Themes laden
|
||||
// get_stylesheet_directory_uri() zeigt auf den Ordner des Child Themes.
|
||||
// Die Abhängigkeit 'parent-style' stellt sicher, dass es NACH dem Parent geladen wird.
|
||||
wp_enqueue_style(
|
||||
'minecraft-modern-child-style',
|
||||
get_stylesheet_directory_uri() . '/style.css',
|
||||
array( $parent_style ),
|
||||
wp_get_theme()->get( 'Version' ) // Die Version des Childs (für Cache-Reset)
|
||||
);
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'minecraft_modern_child_enqueue_styles' );
|
||||
|
||||
|
||||
/**
|
||||
* =============================================================================
|
||||
* (OPTIONAL) Beispiel: Ein Skript des Parent Themes überschreiben
|
||||
* =============================================================================
|
||||
*
|
||||
* Falls du die Logik des Sliders (z.B. die slider-init.js) im Child Theme
|
||||
* anpassen möchtest, könntest du diese Technik nutzen.
|
||||
* Dies ist NUR NOTWENDIG, wenn du Änderungen am JavaScript des Sliders vornehmen willst.
|
||||
*
|
||||
* Um dies zu aktivieren, entferne die Slashs (/) am Anfang und Ende dieses Blocks.
|
||||
*/
|
||||
/*
|
||||
function minecraft_modern_child_swap_faq_script() {
|
||||
// Entfernt das Skript, das vom Parent Theme mit dem Handle 'faq-accordion-script' registriert wurde.
|
||||
wp_deregister_script( 'faq-accordion-script' );
|
||||
|
||||
// Lädt dein neues Skript aus dem Child Theme.
|
||||
// Wir verwenden denselben Namen ('Handle'), um WordPress klar zu machen,
|
||||
// dass dieses Skript das Original ersetzt.
|
||||
wp_enqueue_script(
|
||||
'faq-accordion-script', // Derselbe Handle wie im Parent Theme
|
||||
get_stylesheet_directory_uri() . '/js/faq-accordion.js', // Pfad zur neuen JS-Datei im Child Theme
|
||||
array( 'jquery' ), // Abhängigkeiten (hier jQuery)
|
||||
'1.0', // Version deines Skripts
|
||||
true // Im Footer laden
|
||||
);
|
||||
}
|
||||
// Diese Funktion wird mit einer höheren Priorität (20) ausgeführt,
|
||||
// also NACHDEM das Parent Theme sein Skript geladen hat.
|
||||
add_action( 'wp_enqueue_scripts', 'minecraft_modern_child_swap_faq_script', 20 );
|
||||
*/
|
||||
?>
|
||||
@@ -1,40 +1,55 @@
|
||||
/*
|
||||
Theme Name: Minecraft Modern Theme Child
|
||||
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||
Description: Ein Child Theme für das Minecraft Modern Theme.
|
||||
Author: M_Viper
|
||||
Author URI: https://M-Viper.de
|
||||
Template: minecraft-modern-theme
|
||||
Version: 1.0.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: minecraft-modern-theme-child
|
||||
*/
|
||||
|
||||
/* =Hier kommen Ihre CSS-Anpassungen hin
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Kopieren Sie Ihre geänderten CSS-Regeln hierhin.
|
||||
Zum Beispiel die neuen Regeln für die FAQ-Tabs:
|
||||
*/
|
||||
.faq-tab-content-container {
|
||||
display: grid; /* Wichtig: Erzeugt ein Gitter-Layout */
|
||||
/* Alle direkten Kinder (.faq-tab-pane) werden automatisch auf die gleiche Höhe gesetzt */
|
||||
}
|
||||
|
||||
.faq-tab-pane {
|
||||
/* Grid-Item-Styling */
|
||||
grid-area: 1 / 1 / 2 / 2; /* Alle Panes belegen dieselbe Gitterzelle */
|
||||
|
||||
/* Visuelles Ein- und Ausblenden */
|
||||
opacity: 0; /* Standardmäßig unsichtbar */
|
||||
pointer-events: none; /* Nicht klickbar, wenn unsichtbar */
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
.faq-tab-pane.active {
|
||||
opacity: 1; /* Sichtbar machen */
|
||||
pointer-events: auto; /* Wieder klickbar machen */
|
||||
}
|
||||
|
||||
/*
|
||||
Theme Name: Minecraft Modern Theme Child
|
||||
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||
Description: Ein Child Theme für das Minecraft Modern Theme.
|
||||
Author: M_Viper
|
||||
Author URI: https://M-Viper.de
|
||||
Template: Minecraft-Modern-Theme
|
||||
Version: 1.1.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: minecraft-modern-theme-child
|
||||
*/
|
||||
|
||||
/* =Hier kommen Ihre CSS-Anpassungen hin
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
/* Kopieren Sie Ihre geänderten CSS-Regeln hierhin.
|
||||
Zum Beispiel die neuen Regeln für die FAQ-Tabs:
|
||||
*/
|
||||
.faq-tab-content-container {
|
||||
display: grid; /* Wichtig: Erzeugt ein Gitter-Layout */
|
||||
/* Alle direkten Kinder (.faq-tab-pane) werden automatisch auf die gleiche Höhe gesetzt */
|
||||
}
|
||||
|
||||
.faq-tab-pane {
|
||||
/* Grid-Item-Styling */
|
||||
grid-area: 1 / 1 / 2 / 2; /* Alle Panes belegen dieselbe Gitterzelle */
|
||||
|
||||
/* Visuelles Ein- und Ausblenden */
|
||||
opacity: 0; /* Standardmäßig unsichtbar */
|
||||
pointer-events: none; /* Nicht klickbar, wenn unsichtbar */
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
.faq-tab-pane.active {
|
||||
opacity: 1; /* Sichtbar machen */
|
||||
pointer-events: auto; /* Wieder klickbar machen */
|
||||
}
|
||||
|
||||
/* ===================================================================
|
||||
LAYOUT-SHIFT-FIX: Slider verstecken, bis er initialisiert ist
|
||||
=================================================================== */
|
||||
.hero-slider {
|
||||
/* Verstecke den Slider initial, um ein "Zusammenschnappen" zu verhindern */
|
||||
opacity: 0;
|
||||
/* Füge einen sanften Übergangseffekt für das Einblenden hinzu */
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
/* Diese Klasse wird vom JavaScript hinzugefügt, wenn der Slider bereit ist */
|
||||
.hero-slider.swiper-initialized {
|
||||
/* Mache den Slider sichtbar */
|
||||
opacity: 1;
|
||||
}
|
||||
/* Fügen Sie hier zukünftig weiteres eigenes CSS hinzu */
|
||||
@@ -1,229 +1,276 @@
|
||||
/* Minecraft Modern Theme Login Styles */
|
||||
body.login {
|
||||
background-color: #14151a; /* Fallback-Farbe */
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
}
|
||||
|
||||
/* Dunkler Overlay für bessere Lesbarkeit */
|
||||
body.login::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(20, 21, 26, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Logo zentrieren */
|
||||
.login h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 50px; /* ANGEPASST: Mehr Abstand für das größere Logo */
|
||||
}
|
||||
.login h1 a {
|
||||
width: auto;
|
||||
height: 160px; /* ANGEPASST: Logo ist jetzt doppelt so groß */
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
/* Haupt-Container, der alles umschließt */
|
||||
#login {
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* NEU: Der Wrapper, der vom Skript erstellt wird. Dies ist unsere "Tabelle". */
|
||||
#login-content-wrapper {
|
||||
display: flex;
|
||||
align-items: stretch; /* Sorgt dafür, dass beide Spalten die gleiche Höhe haben */
|
||||
background-color: #252830;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden; /* Sorgt für abgerundete Ecken an den Kind-Elementen */
|
||||
}
|
||||
|
||||
/* Linke Spalte: Minecraft Avatar Slider (27.8%) */
|
||||
#minecraft-avatar-slider {
|
||||
flex: 0 0 27.8%; /* Feste Breite, wächst nicht, schrumpft nicht */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
padding-top: 50px; /* ANGEPASST: Erzeugt den Raum, in den die Avatare verschoben werden */
|
||||
background-color: #1a1c23; /* Leicht anderer Hintergrund für Kontrast */
|
||||
height: auto; /* Höhe anpassen, damit sie nicht fest ist */
|
||||
position: relative; /* Wichtig für den Slider */
|
||||
overflow: hidden; /* Verhindert, dass Bilder überstehen */
|
||||
}
|
||||
|
||||
#minecraft-avatar-slider .avatar-slide {
|
||||
width: 100%;
|
||||
height: auto; /* Seitenverhältnis beibehalten */
|
||||
max-height: 400px; /* Maximale Höhe des Avatars, damit er nicht zu groß wird */
|
||||
border-radius: 4px;
|
||||
|
||||
/* Slider-spezifische Stile */
|
||||
position: absolute;
|
||||
top: 25px; /* KORRIGIERT: Verschiebt alle Avatare um 50px nach unten */
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.7s ease-in-out;
|
||||
}
|
||||
|
||||
#minecraft-avatar-slider .avatar-slide-active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Rechte Spalte: Login-Formular (72.2%) */
|
||||
#loginform {
|
||||
flex: 1; /* Nimmt den restlichen verfügbaren Platz ein */
|
||||
padding: 40px;
|
||||
background: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Formular-Felder */
|
||||
#loginform p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#loginform label {
|
||||
color: #e4e4e4;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#loginform input[type="text"],
|
||||
#loginform input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: #1e2029;
|
||||
border: 1px solid #333;
|
||||
border-radius: 4px;
|
||||
color: #e4e4e4;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
font-size: 16px;
|
||||
transition: border-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
#loginform input[type="text"]:focus,
|
||||
#loginform input[type="password"]:focus {
|
||||
border-color: #00d4ff;
|
||||
box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Container für "Angemeldet bleiben" und "Passwort vergessen" */
|
||||
.login-options-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.login-options-container .forgetmenot,
|
||||
.login-options-container #nav {
|
||||
margin: 0; /* Entfernt Standard-Abstände */
|
||||
}
|
||||
|
||||
.forgetmenot label {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #a0a0a0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.forgetmenot input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.login-options-container #nav a {
|
||||
color: #a0a0a0;
|
||||
text-decoration: none;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.login-options-container #nav a:hover {
|
||||
color: #00d4ff;
|
||||
}
|
||||
|
||||
/* Submit-Button */
|
||||
#loginform .submit input[type="submit"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: #00d4ff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
#loginform .submit input[type="submit"]:hover {
|
||||
background-color: #00a8cc;
|
||||
}
|
||||
|
||||
/* Anpassungen für kleinere Bildschirme */
|
||||
@media screen and (max-width: 768px) {
|
||||
#login-content-wrapper {
|
||||
flex-direction: column; /* Spalten untereinander */
|
||||
}
|
||||
#minecraft-avatar-slider {
|
||||
flex: none; /* Setzt Flexbox zurück */
|
||||
width: 100%;
|
||||
padding: 30px; /* Padding wird zurückgesetzt */
|
||||
padding-top: 30px; /* Padding oben auch auf mobilen Geräten anpassen */
|
||||
}
|
||||
#minecraft-avatar-slider .avatar-slide {
|
||||
max-height: 300px; /* Auf mobilen Geräten etwas kleiner */
|
||||
max-width: 200px; /* Und auch schmaler */
|
||||
top: 30px; /* WICHTIG: Auch hier den top-Wert anpassen! */
|
||||
}
|
||||
}
|
||||
|
||||
/* Fehlermeldungen und Hinweise */
|
||||
.login .message, .login #login_error {
|
||||
background-color: rgba(0, 212, 255, 0.1);
|
||||
border-left: 4px solid #00d4ff;
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
color: #e4e4e4;
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
=== NEU: STIL FÜR DIE LINKS UNTER DEM ANMELDE-BUTTON ====================
|
||||
========================================================================= */
|
||||
|
||||
.post-login-links {
|
||||
display: flex;
|
||||
justify-content: space-between; /* Verteilt die Links auf die ganze Breite */
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #333; /* Trennlinie über den Links */
|
||||
}
|
||||
|
||||
.post-login-links a {
|
||||
color: #a0a0a0;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.post-login-links a:hover {
|
||||
color: #00d4ff;
|
||||
/* Minecraft Modern Theme Login & Registrierungs-Styles */
|
||||
body.login, body.login-action-register {
|
||||
background-color: #14151a; /* Fallback-Farbe */
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
}
|
||||
|
||||
/* Dunkler Overlay für bessere Lesbarkeit */
|
||||
body.login::before, body.login-action-register::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(20, 21, 26, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* Logo zentrieren */
|
||||
body.login h1, body.login-action-register h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
body.login h1 a, body.login-action-register h1 a {
|
||||
width: auto;
|
||||
height: 160px;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
/* Haupt-Container, der alles umschließt */
|
||||
body.login #login, body.login-action-register #login {
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Der Wrapper, der vom Skript erstellt wird. */
|
||||
body.login #login-content-wrapper, body.login-action-register #login-content-wrapper {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
background-color: #252830;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Linke Spalte: Minecraft Avatar Slider (27.8%) */
|
||||
body.login #minecraft-avatar-slider, body.login-action-register #minecraft-avatar-slider {
|
||||
flex: 0 0 27.8%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
padding-top: 50px;
|
||||
background-color: #1a1c23;
|
||||
height: auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.login #minecraft-avatar-slider .avatar-slide, body.login-action-register #minecraft-avatar-slider .avatar-slide {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 400px;
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.7s ease-in-out;
|
||||
}
|
||||
|
||||
body.login #minecraft-avatar-slider .avatar-slide-active, body.login-action-register #minecraft-avatar-slider .avatar-slide-active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Rechte Spalte: Login/Registrierungs-Formular (72.2%) */
|
||||
body.login #loginform, body.login-action-register #registerform, body.login #loginform, body.login-action-register #registerform {
|
||||
flex: 1;
|
||||
padding: 40px;
|
||||
background: none;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* Formular-Felder */
|
||||
body.login #loginform p, body.login-action-register #registerform p,
|
||||
body.login #loginform label, body.login-action-register #registerform label {
|
||||
margin-bottom: 20px;
|
||||
color: #e4e4e4;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
body.login #loginform input[type="text"], body.login #loginform input[type="password"], body.login-action-register #registerform input[type="text"], body.login-action-register #registerform input[type="password"], body.login #loginform input[type="email"], body.login-action-register #registerform input[type="email"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: #1e2029;
|
||||
border: 1px solid #333;
|
||||
border-radius: 4px;
|
||||
color: #e4e4e4;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
font-size: 16px;
|
||||
transition: border-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
body.login #loginform input[type="text"]:focus, body.login #loginform input[type="password"]:focus, body.login-action-register #registerform input[type="text"]:focus, body.login-action-register #registerform input[type="password"]:focus, body.login-action-register #registerform input[type="email"]:focus {
|
||||
border-color: #00d4ff;
|
||||
box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* "Angemeldet bleiben" Checkbox (nur Login) */
|
||||
body.login .forgetmenot label, body.login .forgetmenot input[type="checkbox"] {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #a0a0a0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
body.login .forgetmenot input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* NEU: Stile für die Registrierungsseite */
|
||||
.auth-title {
|
||||
text-align: center;
|
||||
color: #e4e4e4;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.auth-subtitle {
|
||||
text-align: center;
|
||||
color: #a0a0a0;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.login-form-link {
|
||||
text-align: center;
|
||||
margin-top: 30px;
|
||||
}
|
||||
.login-form-link p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.login-form-link a {
|
||||
color: #00d4ff;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
.login-form-link a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
.logged-in-message {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
background-color: #252830;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.logged-in-message h2 {
|
||||
margin-top: 0;
|
||||
color: #00d4ff;
|
||||
}
|
||||
.logged-in-message .button {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
padding: 12px 25px;
|
||||
background-color: #00d4ff;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.logged-in-message .button:hover {
|
||||
background-color: #00a8cc;
|
||||
}
|
||||
|
||||
/* Container für "Angemeldet bleiben" und "Passwort vergessen" (nur Login) */
|
||||
body.login .login-options-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
body.login .login-options-container .forgetmenot,
|
||||
body.login .login-options-container #nav {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body.login .login-options-container #nav a {
|
||||
color: #a0a0a0;
|
||||
text-decoration: none;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
body.login .login-options-container #nav a:hover {
|
||||
color: #00d4ff;
|
||||
}
|
||||
|
||||
/* Submit-Button (gilt für Login & Registrierung) */
|
||||
body.login #loginform .submit input[type="submit"], body.login-action-register #registerform .submit input[type="submit"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: #00d4ff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-family: 'Raleway', sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
body.login #loginform .submit input[type="submit"]:hover, body.login-action-register #registerform .submit input[type="submit"]:hover {
|
||||
background-color: #00a8cc;
|
||||
}
|
||||
|
||||
/* Anpassungen für kleinere Bildschirme */
|
||||
@media screen and (max-width: 768px) {
|
||||
body.login #login-content-wrapper, body.login-action-register #login-content-wrapper {
|
||||
flex-direction: column;
|
||||
}
|
||||
body.login #minecraft-avatar-slider, body.login-action-register #minecraft-avatar-slider {
|
||||
flex: none;
|
||||
width: 100%;
|
||||
padding: 30px;
|
||||
padding-top: 30px;
|
||||
}
|
||||
body.login #minecraft-avatar-slider .avatar-slide, body.login-action-register #minecraft-avatar-slider .avatar-slide {
|
||||
max-height: 300px;
|
||||
max-width: 200px;
|
||||
top: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fehlermeldungen und Hinweise */
|
||||
body.login .message, body.login #login_error, body.login-action-register .message, body.login-action-register #login_error {
|
||||
background-color: rgba(0, 212, 255, 0.1);
|
||||
border-left: 4px solid #00d4ff;
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
color: #e4e4e4;
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
=== STIL FÜR DIE LINKS UNTER DEM ANMELDE-BUTTON ====================
|
||||
========================================================================= */
|
||||
|
||||
body.login .post-login-links, body.login-action-register .post-login-links {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
body.login .post-login-links a, body.login-action-register .post-login-links a {
|
||||
color: #a0a0a0;
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
body.login .post-login-links a:hover, body.login-action-register .post-login-links a:hover {
|
||||
color: #00d4ff;
|
||||
}
|
||||
@@ -1,93 +1,103 @@
|
||||
<footer id="colophon" class="site-footer">
|
||||
<div class="container">
|
||||
<div class="footer-widgets-container">
|
||||
<div class="footer-widgets">
|
||||
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
||||
<nav class="footer-navigation">
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'footer',
|
||||
'menu_class' => 'footer-menu',
|
||||
'container' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="site-info">
|
||||
<?php
|
||||
// Den Copyright-Text aus dem Customizer holen
|
||||
$copyright_text = get_theme_mod( 'footer_copyright', '© ' . date('Y') . ' ' . get_bloginfo('name') );
|
||||
|
||||
// Prüfen, ob der Credit angezeigt werden soll
|
||||
if ( get_theme_mod('show_footer_credit', true) ) {
|
||||
// Wenn ja, den Credit-Text mit einem Trennzeichen anhängen
|
||||
$full_footer_text = $copyright_text . ' | <span class="footer-credit">Minecraft Theme Erstellt von M_Viper 2025</span>';
|
||||
} else {
|
||||
// Wenn nein, nur den Copyright-Text verwenden
|
||||
$full_footer_text = $copyright_text;
|
||||
}
|
||||
|
||||
// Den kompletten Text ausgeben
|
||||
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- NEU: Impressum & Datenschutz Links -->
|
||||
<div class="footer-legal-links">
|
||||
<?php
|
||||
$impressum_url = get_theme_mod('footer_impressum_url');
|
||||
$datenschutz_url = get_theme_mod('footer_datenschutz_url');
|
||||
$links = array();
|
||||
|
||||
if (!empty($impressum_url)) {
|
||||
$links[] = '<a href="' . esc_url($impressum_url) . '">Impressum</a>';
|
||||
}
|
||||
|
||||
if (!empty($datenschutz_url)) {
|
||||
$links[] = '<a href="' . esc_url($datenschutz_url) . '">Datenschutz</a>';
|
||||
}
|
||||
|
||||
// Nur anzeigen, wenn mindestens ein Link vorhanden ist
|
||||
if (!empty($links)) {
|
||||
echo implode(' | ', $links);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Ovaler Dark / Light Mode Toggle mit Sonne & Mond -->
|
||||
<button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode">
|
||||
<div class="theme-toggle-icons">
|
||||
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
||||
</svg>
|
||||
<svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="5"/>
|
||||
<line x1="12" y1="1" x2="12" y2="3"/>
|
||||
<line x1="12" y1="21" x2="12" y2="23"/>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
|
||||
<line x1="1" y1="12" x2="3" y2="12"/>
|
||||
<line x1="21" y1="12" x2="23" y2="12"/>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
<footer id="colophon" class="site-footer">
|
||||
<div class="container">
|
||||
<!-- 1. OBERER BEREICH: Widgets -->
|
||||
<div class="footer-widgets">
|
||||
<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-1' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-2' ); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
|
||||
<div class="footer-widget"><?php dynamic_sidebar( 'footer-3' ); ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- 2. UNTERER BEREICH: Menü, Copyright, Legal -->
|
||||
<div class="footer-bottom-bar">
|
||||
|
||||
<div class="footer-left-group">
|
||||
<!-- Copyright -->
|
||||
<div class="site-info">
|
||||
<?php
|
||||
$copyright_text = get_theme_mod( 'footer_copyright', '© ' . date('Y') . ' ' . get_bloginfo('name') );
|
||||
|
||||
if ( get_theme_mod('show_footer_credit', true) ) {
|
||||
$full_footer_text = $copyright_text . ' <span class="footer-separator">|</span> <span class="footer-credit">
|
||||
<a href="https://m-viper.de" target="_blank" rel="noopener noreferrer">
|
||||
Minecraft Theme by M_Viper
|
||||
</a>
|
||||
</span>';
|
||||
} else {
|
||||
$full_footer_text = $copyright_text;
|
||||
}
|
||||
echo '<p>' . wp_kses_post( $full_footer_text ) . '</p>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Footer Menü ( falls vorhanden ) -->
|
||||
<?php if ( has_nav_menu( 'footer' ) ) : ?>
|
||||
<nav class="footer-navigation">
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'footer',
|
||||
'menu_class' => 'footer-menu',
|
||||
'container' => false,
|
||||
'depth' => 1, // Nur eine Ebene
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="footer-right-group">
|
||||
<!-- Impressum & Datenschutz -->
|
||||
<div class="footer-legal-links">
|
||||
<?php
|
||||
$impressum_url = get_theme_mod('footer_impressum_url');
|
||||
$datenschutz_url = get_theme_mod('footer_datenschutz_url');
|
||||
$links = array();
|
||||
|
||||
if (!empty($impressum_url)) {
|
||||
$links[] = '<a href="' . esc_url($impressum_url) . '"><i class="fas fa-info-circle"></i> Impressum</a>';
|
||||
}
|
||||
|
||||
if (!empty($datenschutz_url)) {
|
||||
$links[] = '<a href="' . esc_url($datenschutz_url) . '"><i class="fas fa-shield-alt"></i> Datenschutz</a>';
|
||||
}
|
||||
|
||||
if (!empty($links)) {
|
||||
echo implode('', $links); // Kein Trennzeichen mehr, da wir Icons haben
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- Ende footer-bottom-bar -->
|
||||
</div> <!-- Ende Container -->
|
||||
|
||||
<!-- THEME TOGGLE (Fixiert unten rechts) -->
|
||||
<button class="theme-toggle" aria-label="Dark/Light Mode umschalten" title="Dark / Light Mode">
|
||||
<div class="theme-toggle-icons">
|
||||
<svg class="icon-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
||||
</svg>
|
||||
<svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<circle cx="12" cy="12" r="5"/>
|
||||
<line x1="12" y1="1" x2="12" y2="3"/>
|
||||
<line x1="12" y1="21" x2="12" y2="23"/>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
|
||||
<line x1="1" y1="12" x2="3" y2="12"/>
|
||||
<line x1="21" y1="12" x2="23" y2="12"/>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -47,6 +47,15 @@ function minecraft_modern_scripts() {
|
||||
true
|
||||
);
|
||||
|
||||
// NEU: Navigation Script für Dropdown Menü laden
|
||||
wp_enqueue_script(
|
||||
'minecraft-navigation',
|
||||
get_template_directory_uri() . '/js/navigation.js',
|
||||
array(), // Keine Abhängigkeiten
|
||||
'1.0',
|
||||
true
|
||||
);
|
||||
|
||||
// NEU: Ankündigungs-Skript laden
|
||||
wp_enqueue_script(
|
||||
'announcement-script',
|
||||
@@ -108,7 +117,6 @@ function minecraft_modern_scripts() {
|
||||
)
|
||||
);
|
||||
|
||||
// === NEU & WICHTIG: Header-Skript-Informationen übergeben ===
|
||||
// Dies verhindert das Flackern im Customizer.
|
||||
wp_localize_script(
|
||||
'minecraft-modern-header-script', // <-- Richtiges Skript-Handle!
|
||||
@@ -123,6 +131,9 @@ add_action( 'wp_enqueue_scripts', 'minecraft_modern_scripts' );
|
||||
// === Customizer-Datei laden ===
|
||||
require get_template_directory() . '/inc/customizer.php';
|
||||
|
||||
// === Theme-Updater-Datei laden ===
|
||||
require get_template_directory() . '/inc/theme-updater.php';
|
||||
|
||||
// === Footer-Widgets registrieren ===
|
||||
function minecraft_modern_footer_widgets() {
|
||||
register_sidebar( array(
|
||||
@@ -199,7 +210,7 @@ function create_faq_post_type() {
|
||||
add_action('init', 'create_faq_post_type');
|
||||
|
||||
// =============================================================================
|
||||
// NEU: Automatische "Home" Seitenerstellung und Zuweisung (kombiniert)
|
||||
// ===== Automatische "Home" Seitenerstellung und Zuweisung (kombiniert) =======
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
@@ -300,7 +311,7 @@ add_filter( 'template_include', 'load_faq_page_template' );
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === CUSTOM LOGIN FUNCTIONS (KOMPLETT NEU & KORRIGIERT) ==========
|
||||
// === CUSTOM LOGIN FUNCTIONS =============================================
|
||||
// =========================================================================
|
||||
|
||||
// Lädt alle notwendigen Styles und Scripts nur für die Login-Seite
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
the_custom_logo();
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
|
||||
<?php
|
||||
if ( is_front_page() && is_home() ) :
|
||||
?>
|
||||
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
@@ -25,9 +25,25 @@
|
||||
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- NAVIGATION START -->
|
||||
<nav id="site-navigation" class="main-navigation">
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false ) ); ?>
|
||||
<!-- Mobile Toggle Button -->
|
||||
<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'primary',
|
||||
'container' => false, // Wichtig: Kein Div-Wrapper drumherum
|
||||
'menu_class' => 'primary-menu', // Unsere CSS Klasse
|
||||
'fallback_cb' => false, // Kein Fallback anzeigen
|
||||
) );
|
||||
?>
|
||||
</nav>
|
||||
<!-- NAVIGATION ENDE -->
|
||||
|
||||
<div class="header-info">
|
||||
<div class="social-links">
|
||||
<?php
|
||||
|
||||
@@ -85,22 +85,9 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
) );
|
||||
|
||||
// =========================================================================
|
||||
// === NEU: Slider-Effekt-Einstellungen ===================================
|
||||
// === ENTFERNT: Slider-Effekt-Einstellungen ==============================
|
||||
// =========================================================================
|
||||
|
||||
$wp_customize->add_setting( 'slider_effect', array( 'default' => 'fade', 'sanitize_callback' => 'sanitize_key' ) );
|
||||
$wp_customize->add_control( 'slider_effect', array(
|
||||
'label' => 'Slider-Effekt', 'section' => 'header_slider', 'settings' => 'slider_effect', 'type' => 'select',
|
||||
'choices' => array( 'slide' => 'Horizontales Gleiten', 'fade' => 'Überblenden', 'cube' => 'Würfel-Effekt' ),
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'slider_direction', array( 'default' => 'horizontal', 'sanitize_callback' => 'sanitize_key' ) );
|
||||
$wp_customize->add_control( 'slider_direction', array(
|
||||
'label' => 'Slider-Richtung (nur für "Gleiten")', 'section' => 'header_slider', 'settings' => 'slider_direction', 'type' => 'select',
|
||||
'choices' => array( 'horizontal' => 'Horizontal', 'vertical' => 'Vertikal' ),
|
||||
) );
|
||||
|
||||
|
||||
// --- Sektion: Startseiten-Hero (Fallback) ---
|
||||
$wp_customize->add_section( 'hero_section', array(
|
||||
'title' => 'Startseiten-Hero (wenn Slider deaktiviert)',
|
||||
@@ -124,6 +111,19 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
||||
$wp_customize->add_setting( 'hero_button_2_url', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw' ) );
|
||||
$wp_customize->add_control( 'hero_button_2_url', array( 'label' => 'Button 2 URL', 'section' => 'hero_section', 'settings' => 'hero_button_2_url', 'type' => 'url' ) );
|
||||
|
||||
// --- Checkbox: Seitentitel auf Startseite verstecken ---
|
||||
$wp_customize->add_setting( 'show_home_title', array(
|
||||
'default' => false, // Standard: Aus (Titel wird versteckt)
|
||||
'sanitize_callback' => 'wp_validate_boolean',
|
||||
) );
|
||||
$wp_customize->add_control( 'show_home_title', array(
|
||||
'label' => 'Seitentitel "Home" anzeigen',
|
||||
'description' => 'Aktiviere diese Option, wenn der Titel "Home" über dem Slider/Inhalt angezeigt werden soll.',
|
||||
'section' => 'hero_section',
|
||||
'settings' => 'show_home_title',
|
||||
'type' => 'checkbox',
|
||||
) );
|
||||
|
||||
|
||||
// =========================================================================
|
||||
// === 2. FARBEN & DARSTELLUNG (KOMBINIERT) ================================
|
||||
|
||||
125
Minecraft-Modern-Theme/inc/theme-updater.php
Normal file
125
Minecraft-Modern-Theme/inc/theme-updater.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
// Exit if accessed directly.
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
// === ZENTRALE VERSIONSKONSTANTE ===
|
||||
// Bitte passen Sie diese Version bei jedem Release an!
|
||||
define( 'MINECRAFT_MODERN_THEME_VERSION', '1.4' );
|
||||
|
||||
|
||||
// === THEME UPDATE NOTIFICATION SYSTEM ===
|
||||
|
||||
// Funktion zum Abrufen der neuesten Release-Informationen vom Git-Repository
|
||||
function minecraft_modern_get_latest_release_info() {
|
||||
$transient_key = 'minecraft_modern_latest_release';
|
||||
|
||||
// Versuche, die Daten aus dem Transient-Cache zu holen
|
||||
$release_info = get_transient($transient_key);
|
||||
|
||||
// Wenn der Cache leer oder abgelaufen ist, rufe neue Daten ab
|
||||
if (false === $release_info) {
|
||||
$response = wp_remote_get('https://git.viper.ipv64.net/api/v1/repos/M_Viper/Minecraft-Modern-Theme/releases/latest');
|
||||
|
||||
if (!is_wp_error($response) && 200 === wp_remote_retrieve_response_code($response)) {
|
||||
$body = wp_remote_retrieve_body($response);
|
||||
$release_data = json_decode($body, true);
|
||||
|
||||
if ($release_data && isset($release_data['tag_name'])) {
|
||||
$release_info = array(
|
||||
'version' => $release_data['tag_name'],
|
||||
'download_url' => $release_data['zipball_url'],
|
||||
'release_notes' => isset($release_data['body']) ? $release_data['body'] : '',
|
||||
'published_at' => isset($release_data['published_at']) ? $release_data['published_at'] : ''
|
||||
);
|
||||
|
||||
// Speichere die Daten für 12 Stunden im Cache
|
||||
set_transient($transient_key, $release_info, 12 * HOUR_IN_SECONDS);
|
||||
}
|
||||
} else {
|
||||
// Bei Fehler, leere Daten für 1 Stunde cachen, um wiederholte fehlgeschlagene Anfragen zu vermeiden
|
||||
set_transient($transient_key, array(), HOUR_IN_SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
return $release_info;
|
||||
}
|
||||
|
||||
// Funktion zum Anzeigen der Update-Benachrichtigung im Admin-Bereich
|
||||
function minecraft_modern_show_update_notification() {
|
||||
// Nur im Admin-Bereich und für Administratoren anzeigen
|
||||
if (!is_admin() || !current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Aktuelle Theme-Version abrufen (JETZT AUS UNSERER KONSTANTE)
|
||||
$current_version = MINECRAFT_MODERN_THEME_VERSION;
|
||||
|
||||
// Neueste Release-Informationen abrufen
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
|
||||
// Wenn wir gültige Release-Informationen haben und die Versionen unterschiedlich sind
|
||||
if (!empty($latest_release) && isset($latest_release['version']) && version_compare($current_version, $latest_release['version'], '<')) {
|
||||
?>
|
||||
<div class="notice notice-warning is-dismissible">
|
||||
<h3><?php _e('Minecraft Modern Theme Update Available', 'minecraft-modern-theme'); ?></h3>
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
__('You are using version %1$s of the Minecraft Modern Theme. Version %2$s is now available.', 'minecraft-modern-theme'),
|
||||
'<strong>' . esc_html($current_version) . '</strong>',
|
||||
'<strong>' . esc_html($latest_release['version']) . '</strong>'
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<a href="<?php echo esc_url($latest_release['download_url']); ?>" class="button button-primary" target="_blank">
|
||||
<?php _e('Download Latest Version', 'minecraft-modern-theme'); ?>
|
||||
</a>
|
||||
<a href="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/releases" class="button" target="_blank">
|
||||
<?php _e('View Release Notes', 'minecraft-modern-theme'); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
add_action('admin_notices', 'minecraft_modern_show_update_notification');
|
||||
|
||||
// Funktion zum Hinzufügen eines Update-Status-Widgets zum Dashboard
|
||||
function minecraft_modern_add_dashboard_widget() {
|
||||
wp_add_dashboard_widget(
|
||||
'minecraft_modern_update_widget', // Widget slug.
|
||||
'Minecraft Modern Theme Status', // Title.
|
||||
'minecraft_modern_update_widget_function' // Display function.
|
||||
);
|
||||
}
|
||||
add_action('wp_dashboard_setup', 'minecraft_modern_add_dashboard_widget');
|
||||
|
||||
// Funktion zum Anzeigen des Inhalts im Dashboard-Widget
|
||||
function minecraft_modern_update_widget_function() {
|
||||
// Aktuelle Theme-Version abrufen (JETZT AUS UNSERER KONSTANTE)
|
||||
$current_version = MINECRAFT_MODERN_THEME_VERSION;
|
||||
|
||||
// Neueste Release-Informationen abrufen
|
||||
$latest_release = minecraft_modern_get_latest_release_info();
|
||||
|
||||
echo '<p><strong>' . __('Current Version:', 'minecraft-modern-theme') . '</strong> ' . esc_html($current_version) . '</p>';
|
||||
|
||||
if (!empty($latest_release) && isset($latest_release['version'])) {
|
||||
if (version_compare($current_version, $latest_release['version'], '<')) {
|
||||
echo '<p><strong>' . __('Latest Version:', 'minecraft-modern-theme') . '</strong> <span style="color: #d63638;">' . esc_html($latest_release['version']) . '</span></p>';
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> <span style="color: #d63638;">' . __('Update Available', 'minecraft-modern-theme') . '</span></p>';
|
||||
echo '<p><a href="' . esc_url($latest_release['download_url']) . '" class="button button-primary" target="_blank">' . __('Download Update', 'minecraft-modern-theme') . '</a></p>';
|
||||
} else {
|
||||
echo '<p><strong>' . __('Latest Version:', 'minecraft-modern-theme') . '</strong> <span style="color: #46b450;">' . esc_html($latest_release['version']) . '</span></p>';
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> <span style="color: #46b450;">' . __('Up to Date', 'minecraft-modern-theme') . '</span></p>';
|
||||
}
|
||||
} else {
|
||||
echo '<p><strong>' . __('Status:', 'minecraft-modern-theme') . '</strong> ' . __('Unable to check for updates', 'minecraft-modern-theme') . '</p>';
|
||||
}
|
||||
|
||||
echo '<p><a href="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/releases" target="_blank">' . __('View All Releases', 'minecraft-modern-theme') . '</a></p>';
|
||||
}
|
||||
40
Minecraft-Modern-Theme/js/navigation.js
Normal file
40
Minecraft-Modern-Theme/js/navigation.js
Normal file
@@ -0,0 +1,40 @@
|
||||
( function() {
|
||||
const siteNavigation = document.getElementById( 'site-navigation' );
|
||||
const menuToggle = siteNavigation.querySelector( '.menu-toggle' );
|
||||
|
||||
// Early exit wenn kein Toggle da ist
|
||||
if ( ! menuToggle ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Toggle Klassen hinzufügen (Menü öffnen/schließen)
|
||||
menuToggle.addEventListener( 'click', function() {
|
||||
siteNavigation.classList.toggle( 'toggled' );
|
||||
|
||||
// Aria States aktualisieren
|
||||
if ( menuToggle.getAttribute( 'aria-expanded' ) === 'true' ) {
|
||||
menuToggle.setAttribute( 'aria-expanded', 'false' );
|
||||
menuToggle.innerHTML = '<i class="fas fa-bars"></i>';
|
||||
} else {
|
||||
menuToggle.setAttribute( 'aria-expanded', 'true' );
|
||||
menuToggle.innerHTML = '<i class="fas fa-times"></i>';
|
||||
}
|
||||
} );
|
||||
|
||||
// Mobile Submenu Toggle (Klick auf Parent-Item öffnet Untermenü)
|
||||
const subMenuParents = siteNavigation.querySelectorAll( '.menu-item-has-children' );
|
||||
|
||||
subMenuParents.forEach( function( subMenuParent ) {
|
||||
subMenuParent.addEventListener( 'click', function( e ) {
|
||||
// Nur auf Mobil aktivieren (Media Query Check)
|
||||
if ( window.innerWidth <= 992 ) {
|
||||
// Optional: Verhindern, dass der Link geklickt wird, wenn man nur das Menü öffnen will
|
||||
// e.preventDefault();
|
||||
|
||||
// Klasse 'active' umschalten für das CSS Display
|
||||
this.classList.toggle( 'active' );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
} )();
|
||||
@@ -1,65 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<header id="masthead" class="site-header">
|
||||
<div class="container">
|
||||
<div class="header-main">
|
||||
<div class="site-branding">
|
||||
<?php
|
||||
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
|
||||
the_custom_logo();
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Hole den Slider-Container
|
||||
const heroSlider = document.querySelector('.hero-slider');
|
||||
|
||||
if ( is_front_page() && is_home() ) :
|
||||
?>
|
||||
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<?php else : ?>
|
||||
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<nav id="site-navigation" class="main-navigation">
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'container' => false ) ); ?>
|
||||
</nav>
|
||||
<div class="header-info">
|
||||
<div class="social-links">
|
||||
<?php
|
||||
// Array mit den Social-Media-Plattformen und ihren Font Awesome Klassen
|
||||
$social_icons = array(
|
||||
'discord' => 'fab fa-discord',
|
||||
'youtube' => 'fab fa-youtube',
|
||||
'twitter' => 'fab fa-x-twitter', // Neues Icon für Twitter/X
|
||||
'facebook' => 'fab fa-facebook-f',
|
||||
'instagram' => 'fab fa-instagram',
|
||||
'tiktok' => 'fab fa-tiktok',
|
||||
'twitch' => 'fab fa-twitch',
|
||||
'steam' => 'fab fa-steam',
|
||||
'github' => 'fab fa-github',
|
||||
'linkedin' => 'fab fa-linkedin-in',
|
||||
'pinterest' => 'fab fa-pinterest-p',
|
||||
'reddit' => 'fab fa-reddit-alien',
|
||||
'teamspeak' => 'fab fa-teamspeak',
|
||||
'spotify' => 'fab fa-spotify'
|
||||
);
|
||||
|
||||
// Schleife, die alle verfügbaren Icons durchgeht
|
||||
foreach ($social_icons as $key => $class) {
|
||||
// Prüfen, ob für diese Plattform eine URL im Customizer hinterlegt wurde
|
||||
if (get_theme_mod('social_' . $key)) {
|
||||
// Wenn ja, Link und Icon ausgeben
|
||||
echo '<a href="' . esc_url(get_theme_mod('social_' . $key)) . '" target="_blank"><i class="' . esc_attr($class) . '"></i></a>';
|
||||
}
|
||||
// Stelle sicher, dass der Slider auf der Seite existiert
|
||||
if (!heroSlider) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
// Konfiguration für den Slider vorbereiten
|
||||
const swiperConfig = {
|
||||
// Der Effekt ist jetzt fest auf "Überblenden" eingestellt
|
||||
effect: 'fade',
|
||||
fadeEffect: {
|
||||
crossFade: true
|
||||
},
|
||||
|
||||
// Loop-Einstellung ist jetzt DYNAMISCH
|
||||
loop: sliderSettings.loop === '1',
|
||||
|
||||
// Autoplay
|
||||
autoplay: {
|
||||
delay: 5000,
|
||||
disableOnInteraction: false,
|
||||
},
|
||||
|
||||
pauseOnMouseEnter: true,
|
||||
|
||||
// Prüfe, ob die Pfeile NICHT ausgeblendet werden sollen
|
||||
navigation: sliderSettings.hideArrows !== '1' ? {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
} : false,
|
||||
|
||||
// Prüfe, ob die Paginierung NICHT ausgeblendet werden soll
|
||||
pagination: sliderSettings.hidePagination !== '1' ? {
|
||||
el: '.swiper-pagination',
|
||||
clickable: true,
|
||||
} : false,
|
||||
|
||||
on: {
|
||||
init: function () {
|
||||
setTimeout(() => {
|
||||
heroSlider.classList.add('swiper-initialized');
|
||||
}, 50);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
// Initialisiere den Slider mit der konfigurierten Optionen
|
||||
new Swiper('.hero-slider', swiperConfig);
|
||||
});
|
||||
@@ -1,208 +1,84 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Minecraft Modern Theme
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="container">
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main">
|
||||
<div class="custom-login-container">
|
||||
<?php
|
||||
// Wenn der Benutzer nicht angemeldet ist, zeige das Login-Formular
|
||||
if (!is_user_logged_in()) {
|
||||
// Custom Login Formular
|
||||
$args = array(
|
||||
'echo' => true,
|
||||
'redirect' => admin_url(), // Weiterleitung zum Dashboard nach dem Login
|
||||
'form_id' => 'custom_loginform',
|
||||
'label_username' => __( 'Benutzername' ),
|
||||
'label_password' => __( 'Passwort' ),
|
||||
'label_remember' => __( 'Angemeldet bleiben' ),
|
||||
'label_log_in' => __( 'Anmelden' ),
|
||||
'id_username' => 'user_login',
|
||||
'id_password' => 'user_pass',
|
||||
'id_remember' => 'rememberme',
|
||||
'id_submit' => 'wp-submit',
|
||||
'remember' => true,
|
||||
'value_username' => NULL,
|
||||
'value_remember' => false
|
||||
);
|
||||
|
||||
// Minecraft Avatar Container
|
||||
$avatar_uuid = get_theme_mod('login_avatar_uuid', '069a79f444e94726a5befca90e38eaf6');
|
||||
if (!empty($avatar_uuid)) {
|
||||
// === KORRIGIERT: Nutzen wir nun Minotar.net für den VOLLKÖRPER ===
|
||||
$avatar_url = "https://minotar.net/full/{$avatar_uuid}/256";
|
||||
echo '<div id="minecraft-avatar-container"><img src="' . esc_url($avatar_url) . '" alt="Minecraft Avatar"></div>';
|
||||
}
|
||||
|
||||
// Login-Formular anzeigen
|
||||
wp_login_form($args);
|
||||
} else {
|
||||
// Wenn der Benutzer bereits angemeldet ist, zeige eine Nachricht und einen Logout-Link
|
||||
$current_user = wp_get_current_user();
|
||||
echo '<div class="logged-in-message">';
|
||||
echo '<h2>Willkommen zurück, ' . esc_html($current_user->display_name) . '!</h2>';
|
||||
echo '<p>Du bist bereits angemeldet.</p>';
|
||||
echo '<p><a href="' . esc_url(wp_logout_url(home_url())) . '" class="button">Abmelden</a></p>';
|
||||
echo '<p><a href="' . esc_url(admin_url()) . '" class="button">Zum Dashboard</a></p>';
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Login-Hintergrundbild aus dem Customizer holen und als Inline-CSS ausgeben
|
||||
$login_bg_image = get_theme_mod('login_background_image');
|
||||
if ($login_bg_image):
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-image: url('<?php echo esc_url($login_bg_image); ?>') !important;
|
||||
background-size: cover !important;
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(20, 21, 26, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.custom-login-container {
|
||||
max-width: 800px;
|
||||
margin: 60px auto;
|
||||
padding: 40px;
|
||||
background-color: var(--card-bg, #252830);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid var(--border-color, #333);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
#minecraft-avatar-container {
|
||||
flex: 0 0 27.8%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20px;
|
||||
background-color: #1a1c23;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#minecraft-avatar-container img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 400px;
|
||||
border-radius: 4px;
|
||||
border: 3px solid var(--primary-accent, #00d4ff);
|
||||
box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
|
||||
}
|
||||
|
||||
#custom_loginform {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#custom_loginform p {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#custom_loginform label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 600;
|
||||
color: var(--text-color, #e4e4e4);
|
||||
}
|
||||
|
||||
#custom_loginform input[type="text"],
|
||||
#custom_loginform input[type="password"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: var(--surface-color, #1e2029);
|
||||
border: 1px solid var(--border-color, #333);
|
||||
border-radius: 4px;
|
||||
color: var(--text-color, #e4e4e4);
|
||||
font-family: 'Raleway', sans-serif;
|
||||
}
|
||||
|
||||
#custom_loginform .forgetmenot label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#custom_loginform .submit {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#custom_loginform input[type="submit"] {
|
||||
width: 100%;
|
||||
padding: 14px;
|
||||
background-color: var(--primary-accent, #00d4ff);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
#custom_loginform input[type="submit"]:hover {
|
||||
background-color: #00a8cc;
|
||||
}
|
||||
|
||||
.logged-in-message {
|
||||
text-align: center;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.logged-in-message h2 {
|
||||
margin-top: 0;
|
||||
color: var(--primary-accent, #00d4ff);
|
||||
}
|
||||
|
||||
.logged-in-message .button {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
padding: 12px 25px;
|
||||
background-color: var(--primary-accent, #00d4ff);
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border-radius: 4px;
|
||||
font-weight: 600;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.logged-in-message .button:hover {
|
||||
background-color: #00a8cc;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.custom-login-container {
|
||||
flex-direction: column;
|
||||
gap: 30px;
|
||||
}
|
||||
#minecraft-avatar-container {
|
||||
width: 100%;
|
||||
}
|
||||
#minecraft-avatar-container img {
|
||||
max-height: 300px;
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
/*
|
||||
Template Name: Benutzerdefinierte Authentifizierungsseite
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
|
||||
<div class="container">
|
||||
<div id="primary" class="content-area">
|
||||
<main id="main" class="site-main">
|
||||
<div class="custom-auth-container">
|
||||
<?php if (is_user_logged_in()) : ?>
|
||||
<!-- Wenn der Benutzer angemeldet ist, zeige eine Nachricht und einen Logout-Link -->
|
||||
<div class="logged-in-message">
|
||||
<h2>Willkommen zurück, <?php echo esc_html(wp_get_current_user()->display_name); ?>!</h2>
|
||||
<p>Du bist bereits angemeldet.</p>
|
||||
<p>
|
||||
<a href="<?php echo esc_url(wp_logout_url(home_url())); ?>" class="button">Abmelden</a>
|
||||
<a href="<?php echo esc_url(admin_url()); ?>" class="button">Zum Dashboard</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<!-- Wenn der Benutzer nicht angemeldet ist, zeige das Registrierungsformular -->
|
||||
<h1 class="auth-title">Willkommen auf <?php bloginfo('name'); ?></h1>
|
||||
<p class="auth-subtitle">Erstelle deinen Account und werde Teil unserer Community!</p>
|
||||
|
||||
<?php
|
||||
// Zeige das Registrierungsformular an
|
||||
$args = array(
|
||||
'echo' => true,
|
||||
'redirect' => home_url('/login/?checkemail=registered'), // Weiterleitung nach der Registrierung
|
||||
'form_id' => 'custom_registerform',
|
||||
'label_username' => __( 'Benutzername' ),
|
||||
'label_email' => __( 'E-Mail-Adresse' ),
|
||||
'label_password' => __( 'Passwort' ),
|
||||
'label_remember' => __( 'Angemeldet bleiben' ),
|
||||
'label_log_in' => __( 'Registrieren' ),
|
||||
'id_username' => 'user_login',
|
||||
'id_email' => 'user_email',
|
||||
'id_password' => 'user_pass',
|
||||
'id_remember' => 'rememberme',
|
||||
'id_submit' => 'wp-submit',
|
||||
'remember' => true,
|
||||
'value_username' => NULL,
|
||||
'value_remember' => false
|
||||
);
|
||||
wp_register_form($args);
|
||||
?>
|
||||
|
||||
<div class="login-form-link">
|
||||
<p>Schon hast du einen Account? <a href="<?php echo esc_url(wp_login_url()); ?>">Hier anmelden</a>.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// Hintergrundbild aus dem Customizer holen und als Inline-CSS ausgeben
|
||||
$auth_bg_image = get_theme_mod('login_background_image');
|
||||
if ($auth_bg_image):
|
||||
?>
|
||||
<style>
|
||||
body.login, body.login-action-register {
|
||||
background-image: url('<?php echo esc_url($auth_bg_image); ?>') !important;
|
||||
background-size: cover !important;
|
||||
background-position: center !important;
|
||||
background-repeat: no-repeat !important;
|
||||
}
|
||||
body.login::before, body.login-action-register::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(20, 21, 26, 0.8);
|
||||
z-index: -1;
|
||||
}
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php get_footer(); ?>
|
||||
@@ -4,7 +4,7 @@ Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||
Author: M_Viper
|
||||
Description: Ein modernes Gaming-Theme mit konfigurierbarem Header-Slider.
|
||||
Author URI: https://M-Viper.de
|
||||
Version: 1.2
|
||||
Version: 1.5
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: minecraft-modern-theme
|
||||
@@ -84,22 +84,16 @@ a:hover { color: #fff; }
|
||||
box-shadow: 0 2px 15px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === KORRIGIERT: Header-Layout für linksbündige Ausrichtung ========= */
|
||||
/* =================================================================== */
|
||||
|
||||
.header-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start; /* <== KORREKTUR: Alle Elemente linksbündig anordnen */
|
||||
justify-content: flex-start;
|
||||
gap: 120px; /* Gleichmäßiger Abstand zwischen den Elementen */
|
||||
}
|
||||
/* =================================================================== */
|
||||
|
||||
.site-branding {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.custom-logo-link img, .custom-logo {
|
||||
@@ -119,28 +113,150 @@ a:hover { color: #fff; }
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === NEUE DROPDOWN NAVIGATION ======================================= */
|
||||
/* =================================================================== */
|
||||
|
||||
.main-navigation {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center; /* Zentriert das Menü */
|
||||
align-items: center;
|
||||
}
|
||||
.main-navigation ul {
|
||||
|
||||
/* Hauptliste (Top Level) */
|
||||
.primary-menu {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
gap: 30px;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
/* Menüpunkte */
|
||||
.menu-item {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Links in der Navigation */
|
||||
.main-navigation a {
|
||||
display: block;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
padding: 5px 0;
|
||||
transition: color 0.2s;
|
||||
text-decoration: none;
|
||||
padding: 10px 0;
|
||||
transition: color 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.main-navigation a:hover {
|
||||
color: var(--primary-accent);
|
||||
}
|
||||
|
||||
/* Pfeil-Icon für Untermenü-Punkte (Desktop) */
|
||||
.menu-item-has-children > a::after {
|
||||
content: '\f107'; /* FontAwesome Down Arrow */
|
||||
font-family: 'Font Awesome 6 Free';
|
||||
font-weight: 900;
|
||||
margin-left: 8px;
|
||||
font-size: 0.8em;
|
||||
display: inline-block;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
/* Pfeil drehen beim Hover */
|
||||
.menu-item-has-children:hover > a::after {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* --- DROPDOWNS (Untermenüs Level 1) --- */
|
||||
.sub-menu {
|
||||
position: absolute;
|
||||
top: 100%; /* Direkt unter dem Elternpunkt */
|
||||
left: 0;
|
||||
background-color: var(--surface-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-top: 3px solid var(--primary-accent);
|
||||
min-width: 240px;
|
||||
list-style: none;
|
||||
padding: 10px 0;
|
||||
margin: 0;
|
||||
z-index: 9999;
|
||||
|
||||
/* Animationseinstellungen */
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: translateY(20px);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
/* Dropdown anzeigen bei Hover */
|
||||
.menu-item-has-children:hover > .sub-menu {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateY(10px);
|
||||
}
|
||||
|
||||
/* Links im Dropdown */
|
||||
.sub-menu li a {
|
||||
padding: 12px 25px;
|
||||
color: var(--text-color);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.sub-menu li:last-child a {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sub-menu li a:hover {
|
||||
background-color: rgba(0, 212, 255, 0.1);
|
||||
color: var(--primary-accent);
|
||||
padding-left: 30px; /* Schiebe-Effekt */
|
||||
}
|
||||
|
||||
/* --- DROPDOWN LEVEL 2 (falls vorhanden) --- */
|
||||
.sub-menu .sub-menu {
|
||||
top: 0;
|
||||
left: 100%; /* Rechts neben dem Elternmenü */
|
||||
margin-top: -3px;
|
||||
}
|
||||
.sub-menu li:hover > .sub-menu {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: translateX(10px);
|
||||
}
|
||||
|
||||
/* Pfeil für Level 2 nach rechts zeigen */
|
||||
.sub-menu .menu-item-has-children > a::after {
|
||||
content: '\f105'; /* FontAwesome Right Arrow */
|
||||
float: right;
|
||||
margin-left: 0;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* --- MOBILE TOGGLE BUTTON --- */
|
||||
.menu-toggle {
|
||||
display: none; /* Auf Desktop ausblenden */
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--text-color);
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
padding: 5px;
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
.menu-toggle:hover {
|
||||
color: var(--primary-accent);
|
||||
}
|
||||
|
||||
/* --- HEADER INFO & SOCIAL LINKS --- */
|
||||
.header-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -155,7 +271,7 @@ a:hover { color: #fff; }
|
||||
.social-links a {
|
||||
font-size: 18px;
|
||||
color: var(--text-muted);
|
||||
transition: color 0.2s;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
.social-links a:hover {
|
||||
color: var(--primary-accent);
|
||||
@@ -212,7 +328,7 @@ a:hover { color: #fff; }
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
transition: background 0.2s;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
.swiper-button-prev:hover, .swiper-button-next:hover { background: rgba(0,0,0,0.6); }
|
||||
.swiper-button-prev::after, .swiper-button-next::after { font-size: 20px; }
|
||||
@@ -252,83 +368,232 @@ a:hover { color: #fff; }
|
||||
color: var(--primary-accent);
|
||||
}
|
||||
|
||||
/* === FOOTER === */
|
||||
.site-footer {
|
||||
background-color: var(--surface-color);
|
||||
padding: 20px 0;
|
||||
border-top: 1px solid var(--border-color);
|
||||
flex-shrink: 0; /* WICHTIG: Verhindert, dass der Footer schrumpft */
|
||||
}
|
||||
/* === FOOTER (NEUES DESIGN) ========================================== */
|
||||
|
||||
.site-footer {
|
||||
line-height: 1.4;
|
||||
background-color: var(--surface-color);
|
||||
border-top: 4px solid var(--primary-accent);
|
||||
padding: 60px 0 0 0;
|
||||
margin-top: 0;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Widget Grid Layout */
|
||||
.footer-widgets {
|
||||
display: grid;
|
||||
/* Responsive Grid: Mindestens 250px breit, füllt den Rest auf */
|
||||
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
||||
gap: 40px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
/* Widget Überschriften */
|
||||
.footer-widget .widget-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: var(--primary-accent);
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid rgba(255,255,255,0.1);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* Listen in Widgets */
|
||||
.footer-widget ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.footer-widget ul li {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.footer-widget ul li a {
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-block;
|
||||
border-left: 2px solid transparent;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.footer-widget ul li a:hover {
|
||||
color: #fff;
|
||||
border-left-color: var(--primary-accent);
|
||||
padding-left: 15px; /* Schiebe-Effekt */
|
||||
}
|
||||
|
||||
/* === FOOTER BOTTOM BAR ============================================= */
|
||||
|
||||
.footer-bottom-bar {
|
||||
border-top: 1px solid var(--border-color);
|
||||
padding: 25px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.footer-widgets-container {
|
||||
/* Dieser Container ist jetzt nur noch ein Wrapper */
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.footer-widgets {
|
||||
.footer-left-group {
|
||||
display: flex;
|
||||
justify-content: space-between; /* Platziert 1 links, 3 rechts, 2 in der Mitte */
|
||||
align-items: flex-start;
|
||||
gap: 40px; /* Gleichmäßiger Abstand zwischen den Widgets */
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.footer-widget .widget-title {
|
||||
font-size: 15px;
|
||||
.footer-right-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Site Info & Credit */
|
||||
.site-info {
|
||||
color: var(--text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.footer-credit a {
|
||||
color: var(--text-muted);
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.footer-credit a:hover {
|
||||
color: var(--primary-accent);
|
||||
margin-bottom: 10px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Footer Navigation (Menü unten) */
|
||||
.footer-navigation {
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
border-top: 1px solid var(--border-color);
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.footer-menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.footer-menu a {
|
||||
color: var(--text-muted);
|
||||
font-weight: 400;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.footer-menu a:hover { color: var(--primary-accent); }
|
||||
|
||||
.site-info {
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
color: var(--text-muted);
|
||||
margin: 0;
|
||||
}
|
||||
.site-info .footer-credit {
|
||||
font-size: 0.8em;
|
||||
opacity: 0.8;
|
||||
color: #aaaaaa;
|
||||
.footer-menu a:hover {
|
||||
color: #fff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Legal Links */
|
||||
.footer-legal-links {
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.footer-legal-links a {
|
||||
color: var(--text-muted);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.footer-legal-links a:hover {
|
||||
color: var(--primary-accent);
|
||||
}
|
||||
.footer-legal-links i {
|
||||
font-size: 14px;
|
||||
}
|
||||
.footer-legal-links a {
|
||||
color: #888;
|
||||
text-decoration: none;
|
||||
transition: color 0.3s ease;
|
||||
|
||||
/* === THEME TOGGLE (Fixiert unten links) ========================= */
|
||||
|
||||
.theme-toggle {
|
||||
position: fixed; /* Schwebend über dem Inhalt */
|
||||
left: 30px; /* <== WIEDER LINKS */
|
||||
bottom: 30px;
|
||||
z-index: 9999;
|
||||
width: 70px;
|
||||
height: 36px;
|
||||
background: var(--card-bg);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 30px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 3px;
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.4);
|
||||
backdrop-filter: blur(10px);
|
||||
transition: all 0.3s ease;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.theme-toggle:hover {
|
||||
border-color: var(--primary-accent);
|
||||
box-shadow: 0 0 25px rgba(0,212,255,0.5);
|
||||
}
|
||||
|
||||
/* Light Mode Anpassung für den Toggle */
|
||||
html.light-mode .theme-toggle {
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Der bewegliche Punkt im Toggle */
|
||||
.theme-toggle::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: linear-gradient(135deg, var(--primary-accent), #0099cc);
|
||||
border-radius: 50%;
|
||||
left: 3px;
|
||||
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
/* Im Light Mode rutscht der Punkt nach rechts */
|
||||
html.light-mode .theme-toggle::before {
|
||||
transform: translateX(34px);
|
||||
background: linear-gradient(135deg, #ffd700, #ffaa00);
|
||||
}
|
||||
|
||||
/* Icons Container */
|
||||
.theme-toggle-icons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0 6px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
pointer-events: none; /* Klicks gehen auf den Button */
|
||||
}
|
||||
|
||||
.icon-moon, .icon-sun {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
stroke: currentColor;
|
||||
}
|
||||
|
||||
.icon-moon { color: #a0a0ff; opacity: 1; }
|
||||
.icon-sun { color: #ffd700; opacity: 0.3; }
|
||||
|
||||
html.light-mode .icon-moon { opacity: 0.3; }
|
||||
html.light-mode .icon-sun { opacity: 1; }
|
||||
|
||||
.theme-toggle:hover .icon-moon,
|
||||
.theme-toggle:hover .icon-sun {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
.footer-legal-links a:hover { color: #ccc; }
|
||||
|
||||
/* === FAQ STYLING === */
|
||||
.page-header {
|
||||
@@ -466,72 +731,7 @@ a:hover { color: #fff; }
|
||||
pointer-events: auto; /* Wieder klickbar machen */
|
||||
}
|
||||
|
||||
/* === THEME TOGGLE === */
|
||||
.theme-toggle {
|
||||
position: fixed;
|
||||
left: 20px;
|
||||
bottom: 20px;
|
||||
z-index: 9999;
|
||||
width: 70px;
|
||||
height: 36px;
|
||||
background: var(--card-bg);
|
||||
border: 2px solid var(--border-color);
|
||||
border-radius: 30px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 3px;
|
||||
box-shadow: 0 4px 20px rgba(0,0,0,0.4);
|
||||
backdrop-filter: blur(10px);
|
||||
transition: all 0.3s ease;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.theme-toggle:hover {
|
||||
border-color: var(--primary-accent);
|
||||
box-shadow: 0 0 25px rgba(0,212,255,0.5);
|
||||
}
|
||||
html.light-mode .theme-toggle { box-shadow: 0 4px 20px rgba(0,0,0,0.15); }
|
||||
|
||||
.theme-toggle::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: linear-gradient(135deg, var(--primary-accent), #0099cc);
|
||||
border-radius: 50%;
|
||||
left: 3px;
|
||||
transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
html.light-mode .theme-toggle::before {
|
||||
transform: translateX(34px);
|
||||
background: linear-gradient(135deg, #ffd700, #ffaa00);
|
||||
}
|
||||
|
||||
.theme-toggle-icons {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0 6px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
.icon-moon, .icon-sun {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.icon-moon { color: #a0a0ff; opacity: 1; }
|
||||
.icon-sun { color: #ffd700; opacity: 0.3; }
|
||||
html.light-mode .icon-moon { opacity: 0.3; }
|
||||
html.light-mode .icon-sun { opacity: 1; }
|
||||
.theme-toggle:hover .icon-moon, .theme-toggle:hover .icon-sun { transform: scale(1.1); }
|
||||
|
||||
/* === ANKÜNDIGUNGSLEISTE ============================================== */
|
||||
/* =================================================================== */
|
||||
|
||||
.announcement-bar {
|
||||
background-color: var(--announcement-bg, #2c3e50);
|
||||
@@ -589,70 +789,8 @@ html.light-mode .icon-sun { opacity: 1; }
|
||||
}
|
||||
.hero-slider.slider-hide-pagination .swiper-pagination { display: none !important; }
|
||||
|
||||
|
||||
/* === RESPONSIVE DESIGN === */
|
||||
@media (max-width: 768px) {
|
||||
/* Header */
|
||||
.header-main { flex-direction: column; gap: 15px; }
|
||||
.main-navigation ul { gap: 20px; }
|
||||
.custom-logo-link img, .custom-logo { max-height: 50px; }
|
||||
|
||||
/* Hero */
|
||||
.hero-title, .slider-title { font-size: 32px; }
|
||||
.hero-subtitle, .slider-subtitle { font-size: 18px; }
|
||||
.hero-buttons a { display: block; margin: 10px auto; width: 80%; }
|
||||
|
||||
/* Footer */
|
||||
.footer-widgets {
|
||||
/* Auf mobilen Geräten das Layout ändern */
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Theme Toggle */
|
||||
.theme-toggle {
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
.theme-toggle::before {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
html.light-mode .theme-toggle::before { transform: translateX(28px); }
|
||||
.icon-moon, .icon-sun { width: 16px; height: 16px; }
|
||||
}
|
||||
|
||||
/* Ladezustand für den Slider - Verhindert das Flackern beim Laden */
|
||||
.hero-slider.swiper-loading {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
}
|
||||
.hero-slider:not(.swiper-loading) {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === Abstand für die neuen Trennlinien ============================== */
|
||||
/* =================================================================== */
|
||||
|
||||
/* Abstand nach dem Slider zum Hauptinhalt */
|
||||
main#primary.site-main {
|
||||
padding-top: 40px; /* Passe den Wert bei Bedarf an */
|
||||
}
|
||||
|
||||
/* Abstand im Footer, damit der Inhalt nicht direkt an der Linie klebt */
|
||||
.site-footer .widget-area,
|
||||
.site-footer .site-info {
|
||||
padding-top: 30px; /* Passe den Wert bei Bedarf an */
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === Titel der statischen Startseite ausblenden (KORRIGIERT) ==== */
|
||||
/* === Titel der statischen Startseite ausblenden ==================== */
|
||||
/* =================================================================== */
|
||||
|
||||
/* Zielt genau auf das <h2>-Element mit der Klasse "post-title" ab */
|
||||
@@ -666,7 +804,7 @@ body.home-title-hidden h2.post-title {
|
||||
|
||||
#scroll-to-top {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
bottom: 30px; /* <== WIEDER NORMAL POSITIONIERT */
|
||||
right: 30px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
@@ -702,10 +840,170 @@ body.home-title-hidden h2.post-title {
|
||||
/* Anpassungen für kleinere Bildschirme */
|
||||
@media screen and (max-width: 768px) {
|
||||
#scroll-to-top {
|
||||
bottom: 20px;
|
||||
bottom: 20px; /* Mobile Standard */
|
||||
right: 20px;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Ladezustand für den Slider - Verhindert das Flackern beim Laden */
|
||||
.hero-slider.swiper-loading {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.4s ease-in-out;
|
||||
}
|
||||
.hero-slider:not(.swiper-loading) {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === Abstand für die neuen Trennlinien ============================== */
|
||||
/* =================================================================== */
|
||||
|
||||
/* Abstand nach dem Slider zum Hauptinhalt */
|
||||
main#primary.site-main {
|
||||
padding-top: 40px; /* Passe den Wert bei Bedarf an */
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === RESPONSIVE DESIGN ============================================== */
|
||||
/* =================================================================== */
|
||||
|
||||
/* --- Navigation Mobile Breakpoint (992px) --- */
|
||||
@media (max-width: 992px) {
|
||||
.header-main {
|
||||
gap: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.site-branding { flex-grow: 1; }
|
||||
.header-info { order: 2; } /* Social rechts */
|
||||
.main-navigation { order: 3; width: 100%; }
|
||||
|
||||
.menu-toggle {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* Hauptliste mobil */
|
||||
.primary-menu {
|
||||
display: none; /* Standardmäßig eingeklappt */
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
gap: 0;
|
||||
background-color: var(--surface-color);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
margin-top: 20px;
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
/* Wenn .toggled aktiv ist, zeigen */
|
||||
.main-navigation.toggled .primary-menu {
|
||||
display: flex;
|
||||
animation: slideDown 0.3s ease forwards;
|
||||
}
|
||||
|
||||
.menu-item { width: 100%; text-align: left; }
|
||||
.main-navigation a { padding: 15px 20px; }
|
||||
|
||||
/* Submenus mobil - Akkordeon Style */
|
||||
.sub-menu {
|
||||
position: static;
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
transform: none;
|
||||
display: none; /* Standardmäßig eingeklappt */
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
border-left: 2px solid var(--primary-accent);
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
/* Mobil: Wenn Eltern-Element aktiv ist, zeige Submenu */
|
||||
.menu-item.active > .sub-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-menu .sub-menu { padding-left: 20px; border-left: none; }
|
||||
|
||||
/* Pfeile im Mobile-Modus ausblenden oder anpassen */
|
||||
.menu-item-has-children > a::after { float: right; }
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
from { opacity: 0; transform: translateY(-10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
/* --- General Mobile Breakpoint (768px) --- */
|
||||
@media (max-width: 768px) {
|
||||
/* Header */
|
||||
.custom-logo-link img, .custom-logo { max-height: 50px; }
|
||||
|
||||
/* Hero */
|
||||
.hero-title, .slider-title { font-size: 32px; }
|
||||
.hero-subtitle, .slider-subtitle { font-size: 18px; }
|
||||
.hero-buttons a { display: block; margin: 10px auto; width: 80%; }
|
||||
|
||||
/* Footer Responsive */
|
||||
.site-footer {
|
||||
padding: 40px 0 0 0;
|
||||
}
|
||||
|
||||
.footer-bottom-bar {
|
||||
flex-direction: column;
|
||||
align-items: flex-start; /* Links ausrichten auf Mobile */
|
||||
text-align: center; /* Zentrieren */
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.footer-left-group,
|
||||
.footer-right-group,
|
||||
.footer-navigation {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.site-info, .footer-legal-links a {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.footer-menu {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Theme Toggle Responsive */
|
||||
.theme-toggle {
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
left: 15px; /* <== Links bleiben */
|
||||
bottom: 15px;
|
||||
}
|
||||
.theme-toggle::before {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
html.light-mode .theme-toggle::before { transform: translateX(28px); }
|
||||
.icon-moon, .icon-sun { width: 16px; height: 16px; }
|
||||
}
|
||||
|
||||
/* =================================================================== */
|
||||
/* === Titel der Startseite ausblenden / anzeigen ==================== */
|
||||
/* =================================================================== */
|
||||
|
||||
/* Wenn der Body die Klasse hat, wird der komplette Header-Bereich der Startseite ausgeblendet */
|
||||
body.home-title-hidden .site-main .entry-header,
|
||||
body.home-title-hidden .site-main .page-header {
|
||||
display: none !important;
|
||||
}
|
||||
101
README.md
101
README.md
@@ -1 +1,100 @@
|
||||
<img src="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/raw/branch/main/Minecraft-Modern-Theme/screenshot.PNG" alt="Backend" width="100%">
|
||||
# Minecraft Modern Theme
|
||||
|
||||
Ein modernes und flexibles WordPress-Theme, perfekt für Minecraft-Server, Gaming-Communities und Gamer-Blogs. Passe deine Seite mit wenigen Klicks ganz nach deinem Stil an!
|
||||
|
||||
|
||||
<div align="center">
|
||||
<img src="https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme/raw/branch/main/Minecraft-Modern-Theme/screenshot.PNG" alt="Theme Screenshot" style="max-width: 500px; width: 100%; height: auto; border-radius: 8px;">
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Hauptfunktionen
|
||||
|
||||
- **🎨 Dynamischer Header-Slider:** Zeige bis zu 5 beeindruckende Banner mit individuellem Text, Effekten und Animationen.
|
||||
- **🌙 Dark & Light Mode:** Lass deine Besucher zwischen einem dunklen und einem hellen Design wählen.
|
||||
- **🎨 Komplette Farbanpassung:** Wähle deine eigene Akzentfarbe und Hintergrundfarbe, um dein Branding perfekt abzubilden.
|
||||
- **🌐 Social Media Integration:** Verlinke einfach all deine Kanäle (Discord, YouTube, Twitter, TikTok und viele mehr).
|
||||
- **📄 Eigenes FAQ-System:** Erstelle und verwalte eine eigene FAQ-Seite direkt im WordPress-Menü, ohne zusätzliche Plugins.
|
||||
- **🔐 Angepasste Login-Seite:** Gestalte die Login-Seite mit deinem eigenen Logo, Hintergrund und einem coolen Minecraft-Avatar-Slider.
|
||||
- **⬆️ "Nach oben"-Button:** Ein praktischer Button, der deinen Besuchern das Scrollen erleichtert.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Installation (in 3 einfachen Schritten)
|
||||
|
||||
1. **Lade das Theme herunter:** Lade die `minecraft-modern.zip`-Datei herunter.
|
||||
2. **Lade es in WordPress hoch:**
|
||||
* Gehe in deinem WordPress-Adminbereich zu **Design > Themes > Installieren**.
|
||||
* Klicke auf den Button **Theme hochladen**.
|
||||
* Wähle die heruntergeladene `minecraft-modern.zip`-Datei aus und installiere sie.
|
||||
3. **Aktiviere das Theme:** Klicke nach der Installation auf **Aktivieren**. Fertig!
|
||||
|
||||
---
|
||||
|
||||
## 👶 Wichtig: Nutze das Child Theme!
|
||||
|
||||
Wenn du planst, Anpassungen vorzunehmen (z.B. Farben per Code ändern oder PHP-Dateien bearbeiten), solltest du unbedingt das mitgelieferte **Child Theme** verwenden.
|
||||
|
||||
**Warum?** Damit deine persönlichen Anpassungen bei einem Theme-Update nicht überschrieben werden!
|
||||
|
||||
### Installation des Child Themes (Der einfache Weg)
|
||||
|
||||
1. **Lade das Child Theme herunter:** Lade die `minecraft-modern-child.zip`-Datei herunter.
|
||||
2. **Lade es in WordPress hoch:**
|
||||
* Gehe zu **Design > Themes > Installieren**.
|
||||
* Klicke auf **Theme hochladen**.
|
||||
* Wähle die `minecraft-modern-child.zip`-Datei aus und installiere sie.
|
||||
3. **Aktiviere das Child Theme:** Klicke auf **Aktivieren**.
|
||||
|
||||
**Wichtig:** Das Haupt-Theme (Minecraft Modern) muss weiterhin installiert bleiben, darf aber nicht aktiviert sein. WordPress erkennt dies automatisch.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ So passt du dein Theme an
|
||||
|
||||
Gehe in deinem WordPress-Dashboard zu **Design > Anpassen**, um in die Einstellungen zu gelangen.
|
||||
|
||||
### 1. Header-Slider einrichten
|
||||
|
||||
Unter dem Punkt **Header Slider** kannst du:
|
||||
- Den Slider mit einem Haken aktivieren.
|
||||
- Bis zu 5 **Bilder, Titel und Untertitel** hochladen.
|
||||
- Die **Schriftart, -größe und -farbe** anpassen.
|
||||
- Einen **Effekt** auswählen (z.B. Überblenden oder Würfel).
|
||||
- Die **Pfeile** oder **Punkte** zur Navigation ausblenden.
|
||||
|
||||
### 2. Farben & Design auswählen
|
||||
|
||||
Unter **Farben & Darstellung** findest du:
|
||||
- **Akzentfarbe:** Die Hauptfarbe deines Themes (wird für Buttons, Links etc. verwendet).
|
||||
- **Hintergrundfarbe:** Die Farbe des Seitenhintergrunds.
|
||||
- **Standard-Theme-Modus:** Entscheide, ob deine Seite standardmäßig im Dark- oder Light-Mode starten soll.
|
||||
|
||||
### 3. Social-Media-Links hinzufügen
|
||||
|
||||
Im Menüpunkt **Social Media Links** kannst du bei den jeweiligen Plattformen einfach deine URL eintragen. Die Icons erscheinen dann automatisch an der vorgesehenen Stelle.
|
||||
|
||||
### 4. Footer anpassen
|
||||
|
||||
Unter **Footer-Einstellungen** kannst du:
|
||||
- Den **Copyright-Text** ändern.
|
||||
- Die URLs für dein **Impressum** und die **Datenschutz**-Seite einfügen.
|
||||
- Den "Erstellt von"-Verweis am Ende der Seite ausblenden.
|
||||
|
||||
### 5. FAQs erstellen
|
||||
|
||||
1. Gehe zu **FAQ Einstellungen** und setze einen Haken bei "FAQ System aktivieren".
|
||||
2. Das Theme erstellt automatisch eine neue Seite namens "FAQ" und einen neuen Menüpunkt **FAQs** in deinem WordPress-Dashboard.
|
||||
3. Unter **FAQs > Neue FAQ hinzufügen** kannst du jetzt deine Fragen und Antworten erstellen. Du kannst sie sogar in Kategorien sortieren!
|
||||
|
||||
### 6. Login-Seite gestalten
|
||||
|
||||
Unter **Login-Einstellungen** kannst du:
|
||||
- Ein **Hintergrundbild** und ein **Logo** für die Login-Seite hochladen.
|
||||
- Bis zu 5 **Minecraft-Avatar-UUIDs** eintragen, um einen dynamischen Avatar-Slider zu erzeugen. (Eine UUID findest du z.B. auf [minotar.net](https://minotar.net/)).
|
||||
- Die **Geschwindigkeit** des Avatar-Wechsels einstellen.
|
||||
|
||||
---
|
||||
|
||||
Viel Spaß mit deinem neuen Theme! 🎮✨
|
||||
Reference in New Issue
Block a user