Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa07d5bda3 | |||
| 76218121a4 | |||
| 04424d7f59 | |||
| 98640766c6 | |||
| 3e911e5ab7 | |||
| 036fa2be08 | |||
| efdda0d8ed | |||
| 1b961d75bd | |||
| 8144180b8b | |||
| 5a6a035fe1 | |||
| 7cd7abdead | |||
| e87c3f6f97 | |||
| f25fbf3869 | |||
| 32bbb0b36f | |||
| 75af878db9 | |||
| 88dd9e8c45 | |||
| 5be3e02b7d | |||
| 91df9b2f6f | |||
| f9753124e1 | |||
| 4bfd56887c | |||
| 12c762794b |
BIN
Minecraft-Modern-Theme-Child/screenshot.PNG
Normal file
BIN
Minecraft-Modern-Theme-Child/screenshot.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
229
Minecraft-Modern-Theme/css/login-style.css
Normal file
229
Minecraft-Modern-Theme/css/login-style.css
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
/* 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;
|
||||||
|
}
|
||||||
@@ -27,9 +27,18 @@ if ( get_theme_mod('slider_enabled', false) ) :
|
|||||||
endfor;
|
endfor;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="swiper-pagination"></div>
|
|
||||||
<div class="swiper-button-prev"></div>
|
<!-- Nur anzeigen, wenn die Paginierung NICHT ausgeblendet ist -->
|
||||||
<div class="swiper-button-next"></div>
|
<?php if ( ! get_theme_mod('slider_hide_pagination', false) ) : ?>
|
||||||
|
<div class="swiper-pagination"></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<!-- Nur anzeigen, wenn die Pfeile NICHT ausgeblendet sind -->
|
||||||
|
<?php if ( ! get_theme_mod('slider_hide_arrows', false) ) : ?>
|
||||||
|
<div class="swiper-button-prev"></div>
|
||||||
|
<div class="swiper-button-next"></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<?php
|
<?php
|
||||||
@@ -65,8 +74,11 @@ if ( get_theme_mod('slider_enabled', false) ) :
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||||
<div class="post-excerpt">
|
<!-- =================================================================== -->
|
||||||
<?php the_excerpt(); ?>
|
<!-- === HIER IST DIE ÄNDERUNG: Vollen Inhalt anstelle des Auszugs === -->
|
||||||
|
<!-- =================================================================== -->
|
||||||
|
<div class="post-full-content">
|
||||||
|
<?php the_content(); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@@ -47,6 +47,15 @@ function minecraft_modern_scripts() {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// NEU: Ankündigungs-Skript laden
|
||||||
|
wp_enqueue_script(
|
||||||
|
'announcement-script',
|
||||||
|
get_template_directory_uri() . '/js/announcement.js',
|
||||||
|
array(), // Keine Abhängigkeiten
|
||||||
|
'1.0',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// Swiper.js JS (von CDN)
|
// Swiper.js JS (von CDN)
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'swiper-js',
|
'swiper-js',
|
||||||
@@ -86,13 +95,14 @@ function minecraft_modern_scripts() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Übergebe ALLE Theme-Einstellungen an das JavaScript
|
// Übergebe ALLE Theme-Einstellungen an das JavaScript
|
||||||
// KORREKTUR: Der Objektname muss 'sliderSettings' bleiben, damit slider-init.js funktioniert.
|
|
||||||
wp_localize_script(
|
wp_localize_script(
|
||||||
'minecraft-modern-slider-script',
|
'minecraft-modern-slider-script',
|
||||||
'sliderSettings',
|
'sliderSettings',
|
||||||
array(
|
array(
|
||||||
'hideArrows' => get_theme_mod( 'slider_hide_arrows', false ) ? '1' : '0',
|
'hideArrows' => get_theme_mod( 'slider_hide_arrows', false ) ? '1' : '0',
|
||||||
'hidePagination' => get_theme_mod( 'slider_hide_pagination', false ) ? '1' : '0',
|
'hidePagination' => get_theme_mod( 'slider_hide_pagination', false ) ? '1' : '0',
|
||||||
|
'effect' => get_theme_mod( 'slider_effect', 'fade' ),
|
||||||
|
'direction' => get_theme_mod( 'slider_direction', 'horizontal' ),
|
||||||
'defaultMode' => get_theme_mod( 'default_theme_mode', 'dark' ),
|
'defaultMode' => get_theme_mod( 'default_theme_mode', 'dark' ),
|
||||||
'ajax_url' => admin_url('admin-ajax.php')
|
'ajax_url' => admin_url('admin-ajax.php')
|
||||||
)
|
)
|
||||||
@@ -188,9 +198,58 @@ function create_faq_post_type() {
|
|||||||
}
|
}
|
||||||
add_action('init', 'create_faq_post_type');
|
add_action('init', 'create_faq_post_type');
|
||||||
|
|
||||||
|
// =============================================================================
|
||||||
|
// NEU: Automatische "Home" Seitenerstellung und Zuweisung (kombiniert)
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Erstellt die "Home" Seite und weist sie automatisch als statische Startseite zu,
|
||||||
|
* wenn das Theme aktiviert wird und noch keine Seite festgelegt ist.
|
||||||
|
*/
|
||||||
|
function set_static_front_page_automatically() {
|
||||||
|
// Nur ausführen, wenn noch keine statische Seite als Startseite festgelegt ist
|
||||||
|
if ( 'page' !== get_option( 'show_on_front' ) ) {
|
||||||
|
|
||||||
|
// Finde die "Home" Seite (oder erstelle sie, falls sie nicht existiert)
|
||||||
|
$home_page = get_page_by_title( 'Home' );
|
||||||
|
if ( ! $home_page ) {
|
||||||
|
// Seite erstellen, falls sie nicht existiert
|
||||||
|
$home_page_id = wp_insert_post( array(
|
||||||
|
'post_title' => 'Home',
|
||||||
|
'post_content' => 'Diese Seite dient als statische Startseite.',
|
||||||
|
'post_status' => 'publish',
|
||||||
|
'post_type' => 'page',
|
||||||
|
'post_author' => 1,
|
||||||
|
) );
|
||||||
|
} else {
|
||||||
|
$home_page_id = $home_page->ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setze die Seite als statische Startseite
|
||||||
|
if ( $home_page_id ) {
|
||||||
|
update_option( 'show_on_front', 'page' );
|
||||||
|
update_option( 'page_on_front', $home_page_id );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action( 'after_switch_theme', 'set_static_front_page_automatically' );
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fügt eine Body-Klasse hinzu, um den Home-Titel per CSS auszublenden.
|
||||||
|
*/
|
||||||
|
function add_home_body_class( $classes ) {
|
||||||
|
// Prüfen, ob wir auf der Startseite sind und die Einstellung zum Ausblenden aktiv ist
|
||||||
|
if ( is_front_page() && !get_theme_mod( 'show_home_title', true ) ) {
|
||||||
|
$classes[] = 'home-title-hidden';
|
||||||
|
}
|
||||||
|
return $classes;
|
||||||
|
}
|
||||||
|
add_filter( 'body_class', 'add_home_body_class' );
|
||||||
|
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// NEU: Automatische FAQ-Seitenerstellung und Template-Zuweisung
|
// Automatische FAQ-Seitenerstellung und Template-Zuweisung
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -238,3 +297,121 @@ function load_faq_page_template( $template ) {
|
|||||||
return $template;
|
return $template;
|
||||||
}
|
}
|
||||||
add_filter( 'template_include', 'load_faq_page_template' );
|
add_filter( 'template_include', 'load_faq_page_template' );
|
||||||
|
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// === CUSTOM LOGIN FUNCTIONS (KOMPLETT NEU & KORRIGIERT) ==========
|
||||||
|
// =========================================================================
|
||||||
|
|
||||||
|
// Lädt alle notwendigen Styles und Scripts nur für die Login-Seite
|
||||||
|
function minecraft_modern_login_assets() {
|
||||||
|
// Lade die Login-spezifische CSS
|
||||||
|
wp_enqueue_style('minecraft-modern-login-style', get_template_directory_uri() . '/css/login-style.css');
|
||||||
|
|
||||||
|
// Lade Font Awesome für Icons
|
||||||
|
wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');
|
||||||
|
|
||||||
|
// Lade das JavaScript für den Avatar-Slider
|
||||||
|
wp_enqueue_script('minecraft-avatar-slider-script', get_template_directory_uri() . '/js/login-slider.js', array('jquery'), '1.0', true);
|
||||||
|
|
||||||
|
// Lade das JavaScript, das die HTML-Struktur anpasst
|
||||||
|
wp_enqueue_script('minecraft-modern-login-script', get_template_directory_uri() . '/js/login-script.js', array('jquery'), '1.0', true);
|
||||||
|
|
||||||
|
wp_add_inline_script('minecraft-modern-login-script', "
|
||||||
|
jQuery(document).ready(function($) {
|
||||||
|
$('.forgetmenot, #nav').wrapAll('<div class=\"login-options-container\"></div>');
|
||||||
|
});
|
||||||
|
");
|
||||||
|
|
||||||
|
// Übergebe die Slider-Geschwindigkeit aus dem Customizer an das JavaScript
|
||||||
|
$slider_speed = get_theme_mod('login_avatar_slider_speed', 4); // Standard: 4 Sekunden
|
||||||
|
wp_localize_script('minecraft-avatar-slider-script', 'avatarSliderSettings', array(
|
||||||
|
'speed' => $slider_speed * 1000 // Umwandlung in Millisekunden für JS
|
||||||
|
));
|
||||||
|
|
||||||
|
// Hintergrundbild und Logo als Inline-CSS hinzufügen
|
||||||
|
$login_bg_image = get_theme_mod('login_background_image');
|
||||||
|
if ($login_bg_image) {
|
||||||
|
$custom_css = "body.login { background-image: url('{$login_bg_image}') !important; }";
|
||||||
|
wp_add_inline_style('minecraft-modern-login-style', $custom_css);
|
||||||
|
}
|
||||||
|
$logo_url = get_theme_mod('login_logo');
|
||||||
|
if ($logo_url) {
|
||||||
|
$logo_css = ".login h1 a { background-image: url('{$logo_url}') !important; }";
|
||||||
|
wp_add_inline_style('minecraft-modern-login-style', $logo_css);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action('login_enqueue_scripts', 'minecraft_modern_login_assets');
|
||||||
|
|
||||||
|
// Erstellt die HTML-Struktur für den Avatar-Slider
|
||||||
|
function add_minecraft_avatar_slider_to_login() {
|
||||||
|
$avatar_html = '<div id="minecraft-avatar-slider">';
|
||||||
|
$has_avatars = false;
|
||||||
|
|
||||||
|
// Durchlaufe alle 5 möglichen Avatar-Plätze
|
||||||
|
for ($i = 1; $i <= 5; $i++) {
|
||||||
|
$uuid = get_theme_mod('login_avatar_uuid_' . $i);
|
||||||
|
if (!empty($uuid)) {
|
||||||
|
$has_avatars = true;
|
||||||
|
$avatar_url = "https://visage.surgeplay.com/full/{$uuid}.png";
|
||||||
|
// Das erste Bild wird direkt angezeigt
|
||||||
|
$active_class = ($i === 1) ? 'avatar-slide-active' : '';
|
||||||
|
$avatar_html .= '<img class="avatar-slide ' . esc_attr($active_class) . '" src="' . esc_url($avatar_url) . '" alt="Minecraft Avatar ' . ($i + 1) . '">';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$avatar_html .= '</div>';
|
||||||
|
|
||||||
|
// Nur den Slider ausgeben, wenn mindestens ein Avatar hinterlegt wurde
|
||||||
|
if ($has_avatars) {
|
||||||
|
echo $avatar_html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
add_action('login_form', 'add_minecraft_avatar_slider_to_login');
|
||||||
|
|
||||||
|
function add_post_login_links() {
|
||||||
|
?>
|
||||||
|
<div class="post-login-links">
|
||||||
|
<a href="<?php echo esc_url(home_url()); ?>">← Zu <?php bloginfo('name'); ?></a>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_action('login_form_bottom', 'add_post_login_links');
|
||||||
|
|
||||||
|
// Entfernt unnötige Elemente von der Login-Seite
|
||||||
|
function customize_login_page() {
|
||||||
|
add_filter('login_display_language_dropdown', '__return_false');
|
||||||
|
add_filter('login_display_back_to_blog', '__return_false');
|
||||||
|
}
|
||||||
|
add_action('login_head', 'customize_login_page');
|
||||||
|
|
||||||
|
// Passt Login-URL und Titel an
|
||||||
|
function custom_login_url() { return home_url(); }
|
||||||
|
add_filter('login_headerurl', 'custom_login_url');
|
||||||
|
function custom_login_title() { return get_bloginfo('name'); }
|
||||||
|
add_filter('login_headertext', 'custom_login_title');
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// === SCROLL TO TOP BUTTON ===============================================
|
||||||
|
// =========================================================================
|
||||||
|
|
||||||
|
// Fügt den HTML-Code für den Button zum Footer hinzu
|
||||||
|
function add_scroll_to_top_button() {
|
||||||
|
?>
|
||||||
|
<a href="#" id="scroll-to-top" title="Nach oben scrollen">
|
||||||
|
<i class="fas fa-chevron-up"></i>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
add_action('wp_footer', 'add_scroll_to_top_button');
|
||||||
|
|
||||||
|
// Lädt das JavaScript für den Scroll-to-Top Button
|
||||||
|
function minecraft_modern_scroll_to_top_script() {
|
||||||
|
wp_enqueue_script(
|
||||||
|
'minecraft-scroll-to-top-script',
|
||||||
|
get_template_directory_uri() . '/js/scroll-to-top.js',
|
||||||
|
array('jquery'),
|
||||||
|
'1.0',
|
||||||
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
add_action('wp_enqueue_scripts', 'minecraft_modern_scroll_to_top_script');
|
||||||
@@ -12,14 +12,12 @@
|
|||||||
<div class="header-main">
|
<div class="header-main">
|
||||||
<div class="site-branding">
|
<div class="site-branding">
|
||||||
<?php
|
<?php
|
||||||
// Zeigt das Logo an, wenn eines vorhanden ist.
|
|
||||||
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
|
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
|
||||||
the_custom_logo();
|
the_custom_logo();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php
|
<?php
|
||||||
// Zeigt den Titel der Website IMMER an.
|
|
||||||
// Verwendet <h1> auf der Startseite, sonst <p> für bessere SEO.
|
|
||||||
if ( is_front_page() && is_home() ) :
|
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>
|
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||||
|
|||||||
@@ -84,6 +84,22 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
|||||||
'label' => 'Paginierung (Punkte) ausblenden', 'section' => 'header_slider', 'settings' => 'slider_hide_pagination', 'type' => 'checkbox',
|
'label' => 'Paginierung (Punkte) ausblenden', 'section' => 'header_slider', 'settings' => 'slider_hide_pagination', 'type' => 'checkbox',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// === NEU: 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) ---
|
// --- Sektion: Startseiten-Hero (Fallback) ---
|
||||||
$wp_customize->add_section( 'hero_section', array(
|
$wp_customize->add_section( 'hero_section', array(
|
||||||
@@ -199,6 +215,67 @@ function minecraft_modern_customize_register( $wp_customize ) {
|
|||||||
'label' => 'FAQ System aktivieren', 'section' => 'faq_settings', 'settings' => 'faq_enabled', 'type' => 'checkbox',
|
'label' => 'FAQ System aktivieren', 'section' => 'faq_settings', 'settings' => 'faq_enabled', 'type' => 'checkbox',
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
// =========================================================================
|
||||||
|
// === 6. LOGIN-BEREICH ====================================================
|
||||||
|
// =========================================================================
|
||||||
|
|
||||||
|
$wp_customize->add_section( 'login_settings', array(
|
||||||
|
'title' => 'Login-Einstellungen',
|
||||||
|
'priority' => 70,
|
||||||
|
'description' => 'Passe das Aussehen der wp-admin Login-Seite an.',
|
||||||
|
) );
|
||||||
|
|
||||||
|
// Login-Hintergrundbild
|
||||||
|
$wp_customize->add_setting( 'login_background_image', array(
|
||||||
|
'sanitize_callback' => 'esc_url_raw',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'login_background_image', array(
|
||||||
|
'label' => 'Login-Hintergrundbild',
|
||||||
|
'section' => 'login_settings',
|
||||||
|
'settings' => 'login_background_image',
|
||||||
|
) ) );
|
||||||
|
|
||||||
|
// Login-Logo
|
||||||
|
$wp_customize->add_setting( 'login_logo', array(
|
||||||
|
'sanitize_callback' => 'esc_url_raw',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'login_logo', array(
|
||||||
|
'label' => 'Login-Logo (ersetzt das WordPress-Logo)',
|
||||||
|
'section' => 'login_settings',
|
||||||
|
'settings' => 'login_logo',
|
||||||
|
) ) );
|
||||||
|
|
||||||
|
// Multi-Avatar UUIDs
|
||||||
|
for ($i = 1; $i <= 5; $i++) {
|
||||||
|
$wp_customize->add_setting( 'login_avatar_uuid_' . $i, array(
|
||||||
|
'sanitize_callback' => 'sanitize_text_field',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control( 'login_avatar_uuid_' . $i, array(
|
||||||
|
'label' => sprintf( 'Avatar %d UUID', $i ),
|
||||||
|
'description' => sprintf( 'Gib die UUID für den %d. Avatar an. (Leer lassen, um zu deaktivieren)', $i ),
|
||||||
|
'section' => 'login_settings',
|
||||||
|
'settings' => 'login_avatar_uuid_' . $i,
|
||||||
|
'type' => 'text',
|
||||||
|
) );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Slider-Geschwindigkeit
|
||||||
|
$wp_customize->add_setting( 'login_avatar_slider_speed', array(
|
||||||
|
'default' => 4,
|
||||||
|
'sanitize_callback' => 'absint',
|
||||||
|
'transport' => 'refresh',
|
||||||
|
) );
|
||||||
|
$wp_customize->add_control( 'login_avatar_slider_speed', array(
|
||||||
|
'label' => 'Avatar-Wechsel (in Sekunden)',
|
||||||
|
'description' => 'Wie viele Sekunden soll ein Avatar angezeigt werden?',
|
||||||
|
'section' => 'login_settings',
|
||||||
|
'settings' => 'login_avatar_slider_speed',
|
||||||
|
'type' => 'number',
|
||||||
|
'input_attrs' => array( 'min' => 2, 'max' => 10, 'step' => 1 ),
|
||||||
|
) );
|
||||||
}
|
}
|
||||||
add_action( 'customize_register', 'minecraft_modern_customize_register' );
|
add_action( 'customize_register', 'minecraft_modern_customize_register' );
|
||||||
|
|
||||||
@@ -207,7 +284,6 @@ add_action( 'customize_register', 'minecraft_modern_customize_register' );
|
|||||||
// === DYNAMISCHES CSS =====================================================
|
// === DYNAMISCHES CSS =====================================================
|
||||||
// =========================================================================
|
// =========================================================================
|
||||||
|
|
||||||
// Diese Funktion bleibt unverändert, da sie bereits gut strukturiert ist.
|
|
||||||
function minecraft_modern_dynamic_css_output() {
|
function minecraft_modern_dynamic_css_output() {
|
||||||
$accent_color = get_theme_mod( 'primary_accent_color', '#00d4ff' );
|
$accent_color = get_theme_mod( 'primary_accent_color', '#00d4ff' );
|
||||||
$slider_font = get_theme_mod( 'slider_font_family', 'Raleway' );
|
$slider_font = get_theme_mod( 'slider_font_family', 'Raleway' );
|
||||||
@@ -252,6 +328,26 @@ function minecraft_modern_dynamic_css_output() {
|
|||||||
.slider-subtitle, .hero-subtitle {
|
.slider-subtitle, .hero-subtitle {
|
||||||
font-size: <?php echo esc_attr($chosen_sizes['subtitle']); ?>;
|
font-size: <?php echo esc_attr($chosen_sizes['subtitle']); ?>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* =================================================================== */
|
||||||
|
/* === NEU: Trennlinien mit der Akzentfarbe ========================= */
|
||||||
|
/* =================================================================== */
|
||||||
|
|
||||||
|
/* Trennlinie unter dem Header */
|
||||||
|
.site-header {
|
||||||
|
border-bottom: 4px solid var(--primary-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trennlinie unter dem Slider */
|
||||||
|
.hero-slider {
|
||||||
|
border-bottom: 4px solid var(--primary-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trennlinie am oberen Rand des Footers */
|
||||||
|
.site-footer {
|
||||||
|
border-top: 4px solid var(--primary-accent);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
19
Minecraft-Modern-Theme/js/login-script.js
Normal file
19
Minecraft-Modern-Theme/js/login-script.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
jQuery(document).ready(function($) {
|
||||||
|
// Warte, bis das DOM vollständig geladen ist
|
||||||
|
// Wir erstellen einen Wrapper um den Avatar-Slider und das Formular, um das Flexbox-Layout zu ermöglichen.
|
||||||
|
const avatar = $('#minecraft-avatar-slider');
|
||||||
|
const form = $('#loginform');
|
||||||
|
|
||||||
|
// Nur ausführen, wenn beide Elemente existieren
|
||||||
|
if (avatar.length && form.length) {
|
||||||
|
// Erstelle einen neuen Wrapper-Div
|
||||||
|
const wrapper = $('<div id="login-content-wrapper"></div>');
|
||||||
|
|
||||||
|
// Füge den Wrapper vor dem Formular in den #login Container ein
|
||||||
|
form.before(wrapper);
|
||||||
|
|
||||||
|
// Verschiebe den Avatar-Slider und das Formular in den Wrapper
|
||||||
|
wrapper.append(avatar);
|
||||||
|
wrapper.append(form);
|
||||||
|
}
|
||||||
|
});
|
||||||
25
Minecraft-Modern-Theme/js/login-slider.js
Normal file
25
Minecraft-Modern-Theme/js/login-slider.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
jQuery(document).ready(function($) {
|
||||||
|
const slider = $('#minecraft-avatar-slider');
|
||||||
|
const slides = slider.find('.avatar-slide');
|
||||||
|
|
||||||
|
// Nur starten, wenn es mehr als einen Slide gibt
|
||||||
|
if (slides.length > 1) {
|
||||||
|
let currentIndex = 0;
|
||||||
|
|
||||||
|
function showSlide(index) {
|
||||||
|
slides.removeClass('avatar-slide-active');
|
||||||
|
slides.eq(index).addClass('avatar-slide-active');
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextSlide() {
|
||||||
|
currentIndex = (currentIndex + 1) % slides.length;
|
||||||
|
showSlide(currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Geschwindigkeit aus den WordPress-Einstellungen holen
|
||||||
|
const speed = avatarSliderSettings.speed || 4000;
|
||||||
|
|
||||||
|
// Den Slider alle X Sekunden wechseln
|
||||||
|
setInterval(nextSlide, speed);
|
||||||
|
}
|
||||||
|
});
|
||||||
30
Minecraft-Modern-Theme/js/scroll-to-top.js
Normal file
30
Minecraft-Modern-Theme/js/scroll-to-top.js
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
jQuery(document).ready(function($) {
|
||||||
|
// Wähle den Button aus
|
||||||
|
var scrollButton = $('#scroll-to-top');
|
||||||
|
|
||||||
|
// Funktion zum Anzeigen oder Verstecken des Buttons
|
||||||
|
function toggleScrollButton() {
|
||||||
|
// Wenn mehr als 300px gescrollt wurde, zeige den Button
|
||||||
|
if ($(window).scrollTop() > 300) {
|
||||||
|
scrollButton.addClass('show');
|
||||||
|
} else {
|
||||||
|
scrollButton.removeClass('show');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Event Listener für das Scrollen
|
||||||
|
$(window).on('scroll', function() {
|
||||||
|
toggleScrollButton();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Event Listener für den Klick auf den Button
|
||||||
|
scrollButton.on('click', function(e) {
|
||||||
|
// Verhindere das Standardverhalten des Links
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
// Scrolle die Seite sanft nach oben
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: 0
|
||||||
|
}, 800); // 800ms für eine sanfte Animation
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,55 +1,65 @@
|
|||||||
document.addEventListener('DOMContentLoaded', function() {
|
<!DOCTYPE html>
|
||||||
// Hole den Slider-Container
|
<html <?php language_attributes(); ?>>
|
||||||
const heroSlider = document.querySelector('.hero-slider');
|
<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
|
||||||
|
|
||||||
// Stelle sicher, dass der Slider auf der Seite existiert, bevor du versuchst, ihn zu konfigurieren
|
if ( is_front_page() && is_home() ) :
|
||||||
if (!heroSlider) {
|
?>
|
||||||
return;
|
<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'
|
||||||
|
);
|
||||||
|
|
||||||
// Konfiguration für den Slider vorbereiten
|
// Schleife, die alle verfügbaren Icons durchgeht
|
||||||
const swiperConfig = {
|
foreach ($social_icons as $key => $class) {
|
||||||
// Optionen für den Slider
|
// Prüfen, ob für diese Plattform eine URL im Customizer hinterlegt wurde
|
||||||
loop: true, // Endloses Schleifen
|
if (get_theme_mod('social_' . $key)) {
|
||||||
|
// Wenn ja, Link und Icon ausgeben
|
||||||
// Autoplay
|
echo '<a href="' . esc_url(get_theme_mod('social_' . $key)) . '" target="_blank"><i class="' . esc_attr($class) . '"></i></a>';
|
||||||
autoplay: {
|
|
||||||
delay: 5000, // 5 Sekunden pro Slide
|
|
||||||
disableOnInteraction: false, // Autoplay nicht nach Klick stoppen
|
|
||||||
},
|
|
||||||
|
|
||||||
// Wenn der Nutzer die Maus darüber bewegt, pausieren
|
|
||||||
pauseOnMouseEnter: true,
|
|
||||||
|
|
||||||
// Effekt
|
|
||||||
effect: 'fade', // Übergangseffekt: 'slide', 'fade', 'cube', etc.
|
|
||||||
fadeEffect: {
|
|
||||||
crossFade: true
|
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// Prüfe, ob die Pfeile ausgeblendet werden sollen
|
|
||||||
if (sliderSettings.hideArrows === '1') {
|
|
||||||
heroSlider.classList.add('slider-hide-arrows');
|
|
||||||
} else {
|
|
||||||
// Navigation nur hinzufügen, wenn sie nicht ausgeblendet wird
|
|
||||||
swiperConfig.navigation = {
|
|
||||||
nextEl: '.swiper-button-next',
|
|
||||||
prevEl: '.swiper-button-prev',
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
?>
|
||||||
// Prüfe, ob die Paginierung ausgeblendet werden soll
|
</div>
|
||||||
if (sliderSettings.hidePagination === '1') {
|
</div>
|
||||||
heroSlider.classList.add('slider-hide-pagination');
|
</div>
|
||||||
} else {
|
</div>
|
||||||
// Pagination nur hinzufügen, wenn sie nicht ausgeblendet wird
|
</header>
|
||||||
swiperConfig.pagination = {
|
|
||||||
el: '.swiper-pagination',
|
|
||||||
clickable: true, // Klick auf Punkt springt zum Slide
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialisiere den Slider mit der konfigurierten Optionen
|
|
||||||
new Swiper('.hero-slider', swiperConfig);
|
|
||||||
});
|
|
||||||
208
Minecraft-Modern-Theme/page-login.php
Normal file
208
Minecraft-Modern-Theme/page-login.php
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<?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 get_footer(); ?>
|
||||||
BIN
Minecraft-Modern-Theme/screenshot.PNG
Normal file
BIN
Minecraft-Modern-Theme/screenshot.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
@@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
Theme Name: Minecraft Modern Theme
|
Theme Name: Minecraft Modern Theme
|
||||||
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||||
Author: M_Viper
|
Author: M_Viper
|
||||||
Description: Ein modernes Gaming-Theme mit konfigurierbarem Header-Slider.
|
Description: Ein modernes Gaming-Theme mit konfigurierbarem Header-Slider.
|
||||||
Author URI: https://M-Viper.de
|
Author URI: https://M-Viper.de
|
||||||
Version: 1.0
|
Version: 1.2
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: minecraft-modern-theme
|
Text Domain: minecraft-modern-theme
|
||||||
@@ -84,20 +84,27 @@ a:hover { color: #fff; }
|
|||||||
box-shadow: 0 2px 15px rgba(0,0,0,0.3);
|
box-shadow: 0 2px 15px rgba(0,0,0,0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* =================================================================== */
|
||||||
|
/* === KORRIGIERT: Header-Layout für linksbündige Ausrichtung ========= */
|
||||||
|
/* =================================================================== */
|
||||||
|
|
||||||
.header-main {
|
.header-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: flex-start; /* <== KORREKTUR: Alle Elemente linksbündig anordnen */
|
||||||
|
gap: 120px; /* Gleichmäßiger Abstand zwischen den Elementen */
|
||||||
}
|
}
|
||||||
|
/* =================================================================== */
|
||||||
|
|
||||||
.site-branding {
|
.site-branding {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 15px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-logo-link img, .custom-logo {
|
.custom-logo-link img, .custom-logo {
|
||||||
max-height: 60px;
|
max-height: 60px;
|
||||||
|
margin-right: 15px;
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,18 +271,12 @@ a:hover { color: #fff; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer-widgets {
|
.footer-widgets {
|
||||||
/* <<< HIER IST DIE KORREKTE LÖSUNG: */
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between; /* Platziert 1 links, 3 rechts, 2 in der Mitte */
|
justify-content: space-between; /* Platziert 1 links, 3 rechts, 2 in der Mitte */
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 40px; /* Gleichmäßiger Abstand zwischen den Widgets */
|
gap: 40px; /* Gleichmäßiger Abstand zwischen den Widgets */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NEUE REGEL: Zieht das dritte Widget nach links */
|
|
||||||
.footer-widget:last-child {
|
|
||||||
margin-right: -0px; /* <<< HIER ANGEPASST: Erhöhter negativer Wert */
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-widget .widget-title {
|
.footer-widget .widget-title {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
color: var(--primary-accent);
|
color: var(--primary-accent);
|
||||||
@@ -529,6 +530,56 @@ html.light-mode .icon-moon { opacity: 0.3; }
|
|||||||
html.light-mode .icon-sun { opacity: 1; }
|
html.light-mode .icon-sun { opacity: 1; }
|
||||||
.theme-toggle:hover .icon-moon, .theme-toggle:hover .icon-sun { transform: scale(1.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);
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 12px 0;
|
||||||
|
text-align: center;
|
||||||
|
position: relative;
|
||||||
|
border-bottom: 3px solid var(--primary-accent);
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.announcement-bar .container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding-right: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.announcement-bar .announcement-title {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.announcement-bar p {
|
||||||
|
margin: 0 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.announcement-close {
|
||||||
|
position: absolute;
|
||||||
|
right: 20px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 24px;
|
||||||
|
line-height: 1;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.7;
|
||||||
|
transition: opacity 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.announcement-close:hover {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* === CUSTOMIZER & SONSTIGES === */
|
/* === CUSTOMIZER & SONSTIGES === */
|
||||||
.hero-slider.slider-hide-arrows .swiper-button-next,
|
.hero-slider.slider-hide-arrows .swiper-button-next,
|
||||||
.hero-slider.slider-hide-arrows .swiper-button-prev {
|
.hero-slider.slider-hide-arrows .swiper-button-prev {
|
||||||
@@ -558,10 +609,6 @@ html.light-mode .icon-sun { opacity: 1; }
|
|||||||
gap: 20px;
|
gap: 20px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.footer-widget:last-child {
|
|
||||||
margin-right: 0; /* Negativen Margin für mobile Ansicht zurücksetzen */
|
|
||||||
}
|
|
||||||
.footer-menu { flex-direction: column; gap: 10px; }
|
|
||||||
|
|
||||||
/* Theme Toggle */
|
/* Theme Toggle */
|
||||||
.theme-toggle {
|
.theme-toggle {
|
||||||
@@ -577,3 +624,88 @@ html.light-mode .icon-sun { opacity: 1; }
|
|||||||
html.light-mode .theme-toggle::before { transform: translateX(28px); }
|
html.light-mode .theme-toggle::before { transform: translateX(28px); }
|
||||||
.icon-moon, .icon-sun { width: 16px; height: 16px; }
|
.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) ==== */
|
||||||
|
/* =================================================================== */
|
||||||
|
|
||||||
|
/* Zielt genau auf das <h2>-Element mit der Klasse "post-title" ab */
|
||||||
|
body.home-title-hidden h2.post-title {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* =========================================================================
|
||||||
|
=== SCROLL TO TOP BUTTON ===============================================
|
||||||
|
========================================================================= */
|
||||||
|
|
||||||
|
#scroll-to-top {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 30px;
|
||||||
|
right: 30px;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
background-color: var(--primary-accent, #00d4ff);
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 1;
|
||||||
|
z-index: 9999;
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease;
|
||||||
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll-to-top.show {
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll-to-top:hover {
|
||||||
|
background-color: #00a8cc; /* Etwas dunklerer Blauton beim Hover */
|
||||||
|
transform: translateY(-5px); /* Kleiner "Bounce"-Effekt beim Hover */
|
||||||
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Anpassungen für kleinere Bildschirme */
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
#scroll-to-top {
|
||||||
|
bottom: 20px;
|
||||||
|
right: 20px;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user