Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 903333cac3 | |||
| 446e08dc91 | |||
| 231cf8fc6c | |||
| 2f93e98220 | |||
| 43f19e926a | |||
| 41e46b8804 |
@@ -1,5 +1,5 @@
|
||||
/* Minecraft Modern Theme Login Styles */
|
||||
body.login {
|
||||
/* Minecraft Modern Theme Login & Registrierungs-Styles */
|
||||
body.login, body.login-action-register {
|
||||
background-color: #14151a; /* Fallback-Farbe */
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
@@ -8,7 +8,7 @@ body.login {
|
||||
}
|
||||
|
||||
/* Dunkler Overlay für bessere Lesbarkeit */
|
||||
body.login::before {
|
||||
body.login::before, body.login-action-register::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -20,18 +20,18 @@ body.login::before {
|
||||
}
|
||||
|
||||
/* Logo zentrieren */
|
||||
.login h1 {
|
||||
body.login h1, body.login-action-register h1 {
|
||||
text-align: center;
|
||||
margin-bottom: 50px; /* ANGEPASST: Mehr Abstand für das größere Logo */
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.login h1 a {
|
||||
body.login h1 a, body.login-action-register h1 a {
|
||||
width: auto;
|
||||
height: 160px; /* ANGEPASST: Logo ist jetzt doppelt so groß */
|
||||
height: 160px;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
/* Haupt-Container, der alles umschließt */
|
||||
#login {
|
||||
body.login #login, body.login-action-register #login {
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
@@ -40,51 +40,49 @@ body.login::before {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* NEU: Der Wrapper, der vom Skript erstellt wird. Dies ist unsere "Tabelle". */
|
||||
#login-content-wrapper {
|
||||
/* Der Wrapper, der vom Skript erstellt wird. */
|
||||
body.login #login-content-wrapper, body.login-action-register #login-content-wrapper {
|
||||
display: flex;
|
||||
align-items: stretch; /* Sorgt dafür, dass beide Spalten die gleiche Höhe haben */
|
||||
align-items: stretch;
|
||||
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 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Linke Spalte: Minecraft Avatar Slider (27.8%) */
|
||||
#minecraft-avatar-slider {
|
||||
flex: 0 0 27.8%; /* Feste Breite, wächst nicht, schrumpft nicht */
|
||||
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; /* 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 */
|
||||
padding-top: 50px;
|
||||
background-color: #1a1c23;
|
||||
height: auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#minecraft-avatar-slider .avatar-slide {
|
||||
body.login #minecraft-avatar-slider .avatar-slide, body.login-action-register #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 */
|
||||
height: auto;
|
||||
max-height: 400px;
|
||||
border-radius: 4px;
|
||||
|
||||
/* Slider-spezifische Stile */
|
||||
position: absolute;
|
||||
top: 25px; /* KORRIGIERT: Verschiebt alle Avatare um 50px nach unten */
|
||||
top: 25px;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.7s ease-in-out;
|
||||
}
|
||||
|
||||
#minecraft-avatar-slider .avatar-slide-active {
|
||||
body.login #minecraft-avatar-slider .avatar-slide-active, body.login-action-register #minecraft-avatar-slider .avatar-slide-active {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Rechte Spalte: Login-Formular (72.2%) */
|
||||
#loginform {
|
||||
flex: 1; /* Nimmt den restlichen verfügbaren Platz ein */
|
||||
/* 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;
|
||||
@@ -92,19 +90,16 @@ body.login::before {
|
||||
}
|
||||
|
||||
/* Formular-Felder */
|
||||
#loginform p {
|
||||
body.login #loginform p, body.login-action-register #registerform p,
|
||||
body.login #loginform label, body.login-action-register #registerform label {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#loginform label {
|
||||
color: #e4e4e4;
|
||||
font-weight: 600;
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#loginform input[type="text"],
|
||||
#loginform input[type="password"] {
|
||||
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;
|
||||
@@ -116,50 +111,102 @@ body.login::before {
|
||||
transition: border-color 0.3s, box-shadow 0.3s;
|
||||
}
|
||||
|
||||
#loginform input[type="text"]:focus,
|
||||
#loginform input[type="password"]:focus {
|
||||
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;
|
||||
}
|
||||
|
||||
/* Container für "Angemeldet bleiben" und "Passwort vergessen" */
|
||||
.login-options-container {
|
||||
/* "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;
|
||||
}
|
||||
|
||||
.login-options-container .forgetmenot,
|
||||
.login-options-container #nav {
|
||||
margin: 0; /* Entfernt Standard-Abstände */
|
||||
body.login .login-options-container .forgetmenot,
|
||||
body.login .login-options-container #nav {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.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 {
|
||||
body.login .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 {
|
||||
body.login .login-options-container #nav a:hover {
|
||||
color: #00d4ff;
|
||||
}
|
||||
|
||||
/* Submit-Button */
|
||||
#loginform .submit input[type="submit"] {
|
||||
/* 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;
|
||||
@@ -172,30 +219,30 @@ body.login::before {
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
#loginform .submit input[type="submit"]:hover {
|
||||
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) {
|
||||
#login-content-wrapper {
|
||||
flex-direction: column; /* Spalten untereinander */
|
||||
body.login #login-content-wrapper, body.login-action-register #login-content-wrapper {
|
||||
flex-direction: column;
|
||||
}
|
||||
#minecraft-avatar-slider {
|
||||
flex: none; /* Setzt Flexbox zurück */
|
||||
body.login #minecraft-avatar-slider, body.login-action-register #minecraft-avatar-slider {
|
||||
flex: none;
|
||||
width: 100%;
|
||||
padding: 30px; /* Padding wird zurückgesetzt */
|
||||
padding-top: 30px; /* Padding oben auch auf mobilen Geräten anpassen */
|
||||
padding: 30px;
|
||||
padding-top: 30px;
|
||||
}
|
||||
#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! */
|
||||
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 */
|
||||
.login .message, .login #login_error {
|
||||
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;
|
||||
@@ -205,25 +252,25 @@ body.login::before {
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
=== NEU: STIL FÜR DIE LINKS UNTER DEM ANMELDE-BUTTON ====================
|
||||
=== STIL FÜR DIE LINKS UNTER DEM ANMELDE-BUTTON ====================
|
||||
========================================================================= */
|
||||
|
||||
.post-login-links {
|
||||
body.login .post-login-links, body.login-action-register .post-login-links {
|
||||
display: flex;
|
||||
justify-content: space-between; /* Verteilt die Links auf die ganze Breite */
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
border-top: 1px solid #333; /* Trennlinie über den Links */
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.post-login-links a {
|
||||
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;
|
||||
}
|
||||
|
||||
.post-login-links a:hover {
|
||||
body.login .post-login-links a:hover, body.login-action-register .post-login-links a:hover {
|
||||
color: #00d4ff;
|
||||
}
|
||||
@@ -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)',
|
||||
|
||||
@@ -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,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
Template Name: Minecraft Modern Theme
|
||||
Template Name: Benutzerdefinierte Authentifizierungsseite
|
||||
*/
|
||||
|
||||
get_header(); ?>
|
||||
@@ -8,20 +8,35 @@ 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
|
||||
<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' => admin_url(), // Weiterleitung zum Dashboard nach dem Login
|
||||
'form_id' => 'custom_loginform',
|
||||
'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' => __( 'Anmelden' ),
|
||||
'label_log_in' => __( 'Registrieren' ),
|
||||
'id_username' => 'user_login',
|
||||
'id_email' => 'user_email',
|
||||
'id_password' => 'user_pass',
|
||||
'id_remember' => 'rememberme',
|
||||
'id_submit' => 'wp-submit',
|
||||
@@ -29,46 +44,31 @@ get_header(); ?>
|
||||
'value_username' => NULL,
|
||||
'value_remember' => false
|
||||
);
|
||||
wp_register_form($args);
|
||||
?>
|
||||
|
||||
// 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 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
|
||||
// Login-Hintergrundbild aus dem Customizer holen und als Inline-CSS ausgeben
|
||||
$login_bg_image = get_theme_mod('login_background_image');
|
||||
if ($login_bg_image):
|
||||
// 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 {
|
||||
background-image: url('<?php echo esc_url($login_bg_image); ?>') !important;
|
||||
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::before {
|
||||
body.login::before, body.login-action-register::before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -81,128 +81,4 @@ if ($login_bg_image):
|
||||
</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 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.3
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: minecraft-modern-theme
|
||||
|
||||
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