Dateien nach "Minecraft-Modern-Theme" hochladen

This commit is contained in:
2025-11-29 17:24:06 +00:00
parent 106feb6e60
commit 9e8a51a482
11 changed files with 1267 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
<?php get_header(); ?> <!-- HIER WIRD DER HEADER EINGEBUNDEN -->
<div class="container site-main">
<div class="content-area">
<!-- Hülle um den gesamten FAQ-Inhalt für einen festen Hintergrund -->
<div class="faq-archive-container">
<header class="page-header">
<h1 class="page-title"><?php _e( 'Häufig gestellte Fragen (FAQ)', 'minecraft-modern-theme' ); ?></h1>
<p><?php _e( 'Wählen Sie eine Kategorie, um die passenden Fragen zu sehen.', 'minecraft-modern-theme' ); ?></p>
</header>
<?php
// Alle FAQ-Kategorien abrufen
$categories = get_terms( array(
'taxonomy' => 'faq_category',
'orderby' => 'name',
'order' => 'ASC'
) );
if ( ! empty( $categories ) && ! is_wp_error( $categories ) ) : ?>
<!-- Tab-Navigation -->
<ul class="faq-tabs">
<?php
$is_first = true;
foreach ( $categories as $category ) :
$active_class = $is_first ? 'active' : '';
?>
<li>
<button class="faq-tab-button <?php echo esc_attr($active_class); ?>" data-category="<?php echo esc_attr($category->slug); ?>">
<?php echo esc_html( $category->name ); ?>
</button>
</li>
<?php
$is_first = false;
endforeach; ?>
</ul>
<!-- Container für alle Tab-Inhalte -->
<div class="faq-tab-content-container">
<?php
$is_first_pane = true;
foreach ( $categories as $category ) :
$active_pane_class = $is_first_pane ? 'active' : '';
?>
<div class="faq-tab-pane <?php echo esc_attr($active_pane_class); ?>" data-category="<?php echo esc_attr($category->slug); ?>">
<?php
$faqs = new WP_Query( array(
'post_type' => 'faq',
'posts_per_page' => -1,
'tax_query' => array(
array(
'taxonomy' => 'faq_category',
'field' => 'slug',
'terms' => $category->slug,
),
),
'orderby' => 'menu_order',
'order' => 'ASC',
) );
if ( $faqs->have_posts() ) : ?>
<div class="faq-list">
<?php while ( $faqs->have_posts() ) : $faqs->the_post(); ?>
<div class="faq-item">
<button class="faq-question"><?php the_title(); ?></button>
<div class="faq-answer"><?php the_content(); ?></div>
</div>
<?php endwhile; ?>
</div>
<?php wp_reset_postdata();
else : ?>
<p><?php _e( 'Keine FAQs in dieser Kategorie gefunden.', 'minecraft-modern-theme' ); ?></p>
<?php endif; ?>
</div>
<?php
$is_first_pane = false;
endforeach; ?>
</div>
<?php else : ?>
<p><?php _e( 'Keine FAQ-Kategorien gefunden.', 'minecraft-modern-theme' ); ?></p>
<?php endif; ?>
</div><!-- /faq-archive-container -->
</div>
</div>
<?php get_footer(); ?> <!-- HIER WIRD DER FOOTER EINGEBUNDEN -->

View File

@@ -0,0 +1,26 @@
<?php
// Sicherheit: Verhindert direkten Zugriff auf die Datei
if ( ! defined( 'ABSPATH' ) ) {
exit( 'No script kiddies please!' );
}
// Setze den korrekten Header, damit der Browser es als CSS-Datei erkennt
header( 'Content-Type: text/css' );
// Hole die Einstellungen aus dem Customizer
$slider_font = get_theme_mod( 'slider_font_family', 'Raleway' );
$slider_color = get_theme_mod( 'slider_font_color', '#ffffff' );
$accent_color = get_theme_mod( 'primary_accent_color', '#00d4ff' );
// Gib die CSS-Regeln aus
?>
/* Dynamische Stile für Slider und Hero-Sektion */
:root {
--primary-accent: <?php echo esc_attr($accent_color); ?>;
}
.slider-title, .slider-subtitle, .hero-title, .hero-subtitle, .hero-button-1, .hero-button-2 {
font-family: '<?php echo esc_attr($slider_font); ?>', sans-serif;
color: <?php echo esc_attr($slider_color); ?>;
}

View File

@@ -0,0 +1,93 @@
<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', '&copy; ' . 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>
</html>

View File

@@ -0,0 +1,80 @@
<?php get_header(); ?>
<?php
if ( get_theme_mod('slider_enabled', false) ) :
?>
<section class="hero-slider swiper-container">
<div class="swiper-wrapper">
<?php
for ($i = 1; $i <= 5; $i++) :
$image_url = get_theme_mod('slider_image_' . $i);
if ($image_url) :
$title = get_theme_mod('slider_title_' . $i);
$subtitle = get_theme_mod('slider_subtitle_' . $i);
?>
<div class="swiper-slide" style="background-image: url('<?php echo esc_url($image_url); ?>');">
<div class="slider-content">
<?php if ($title) : ?>
<h2 class="slider-title"><?php echo esc_html($title); ?></h2>
<?php endif; ?>
<?php if ($subtitle) : ?>
<p class="slider-subtitle"><?php echo esc_html($subtitle); ?></p>
<?php endif; ?>
</div>
</div>
<?php
endif;
endfor;
?>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
</section>
<?php else : ?>
<?php
$hero_bg = get_theme_mod( 'hero_bg_image' );
$hero_title = get_theme_mod( 'hero_title', 'Willkommen auf unserem Server' );
$hero_subtitle = get_theme_mod( 'hero_subtitle', 'Trete einer Community voller Abenteuer bei.' );
$btn1_text = get_theme_mod( 'hero_button_1_text', 'Zum Forum' );
$btn1_url = get_theme_mod( 'hero_button_1_url', '#' );
$btn2_text = get_theme_mod( 'hero_button_2_text', 'Zum Teamspeak' );
$btn2_url = get_theme_mod( 'hero_button_2_url', '#' );
?>
<section class="hero-section" style="<?php echo $hero_bg ? "background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('" . esc_url($hero_bg) . "')" : ''; ?>">
<div class="container">
<h1 class="hero-title"><?php echo esc_html($hero_title); ?></h1>
<p class="hero-subtitle"><?php echo esc_html($hero_subtitle); ?></p>
<div class="hero-buttons">
<a href="<?php echo esc_url($btn1_url); ?>" class="hero-button-1"><?php echo esc_html($btn1_text); ?></a>
<a href="<?php echo esc_url($btn2_url); ?>" class="hero-button-2"><?php echo esc_html($btn2_text); ?></a>
</div>
</div>
</section>
<?php endif; ?>
<main id="primary" class="site-main">
<div class="container">
<div class="content-area">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium_large'); ?></a>
</div>
<?php endif; ?>
<div class="post-content">
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post-excerpt">
<?php the_excerpt(); ?>
</div>
</div>
</article>
<?php endwhile; else : ?>
<p><?php _e( 'Keine Beiträge gefunden.', 'minecraft-modern-theme' ); ?></p>
<?php endif; ?>
</div>
</div>
</main>
<?php get_footer(); ?>

View File

@@ -0,0 +1,240 @@
<?php
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// === Theme Setup ===
function minecraft_modern_setup() {
add_theme_support( 'title-tag' );
add_theme_support( 'post-thumbnails' );
// Logo-Unterstützung aktivieren (Maximale Flexibilität)
add_theme_support( 'custom-logo', array(
'height' => 9999, // Sehr hohe Werte, um den Crop-Dialog zu umgehen
'width' => 9999, // Sehr hohe Werte, um den Crop-Dialog zu umgehen
'flex-height' => true,
'flex-width' => true,
'header-text' => array( 'site-title', 'site-description' ),
) );
// Benutzerdefinierten Hintergrund aktivieren
add_theme_support( 'custom-background' );
register_nav_menus( array(
'primary' => __( 'Hauptmenü', 'minecraft-modern-theme' ),
'footer' => __( 'Footer-Menü', 'minecraft-modern-theme' ),
) );
add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
}
add_action( 'after_setup_theme', 'minecraft_modern_setup' );
// === Styles & Scripts laden ===
function minecraft_modern_scripts() {
// Haupt-Stylesheet
wp_enqueue_style( 'minecraft-modern-style', get_stylesheet_uri() );
// Swiper.js CSS (von CDN)
wp_enqueue_style( 'swiper-css', 'https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css' );
// JavaScript für den Header-Scroll-Effekt
wp_enqueue_script(
'minecraft-modern-header-script',
get_template_directory_uri() . '/js/header-scroll.js',
array(),
'1.0',
true
);
// Swiper.js JS (von CDN)
wp_enqueue_script(
'swiper-js',
'https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js',
array(),
'8.0.0',
true
);
// Unsere eigene Slider-Initialisierungs-Datei
wp_enqueue_script(
'minecraft-modern-slider-script',
get_template_directory_uri() . '/js/slider-init.js',
array('swiper-js'), // Hängt von Swiper.js ab
'1.0',
true
);
// NEU: Theme-Toggle-Skript laden
wp_enqueue_script(
'theme-toggle-script',
get_template_directory_uri() . '/js/theme-toggle.js',
array(), // Keine Abhängigkeiten
'1.0',
true
);
// FAQ Skript laden, wenn der Post-Type aktiv ist
if ( post_type_exists('faq') ) {
wp_enqueue_script(
'faq-accordion-script',
get_template_directory_uri() . '/js/faq-accordion.js',
array(),
'1.0',
true
);
}
// Übergebe ALLE Theme-Einstellungen an das JavaScript
// KORREKTUR: Der Objektname muss 'sliderSettings' bleiben, damit slider-init.js funktioniert.
wp_localize_script(
'minecraft-modern-slider-script',
'sliderSettings',
array(
'hideArrows' => get_theme_mod( 'slider_hide_arrows', false ) ? '1' : '0',
'hidePagination' => get_theme_mod( 'slider_hide_pagination', false ) ? '1' : '0',
'defaultMode' => get_theme_mod( 'default_theme_mode', 'dark' ),
'ajax_url' => admin_url('admin-ajax.php')
)
);
// === NEU & WICHTIG: Header-Skript-Informationen übergeben ===
// Dies verhindert das Flackern im Customizer.
wp_localize_script(
'minecraft-modern-header-script', // <-- Richtiges Skript-Handle!
'headerSettings', // <-- Neuer Objektname für Klarheit
array(
'isCustomizer' => is_customize_preview()
)
);
}
add_action( 'wp_enqueue_scripts', 'minecraft_modern_scripts' );
// === Customizer-Datei laden ===
require get_template_directory() . '/inc/customizer.php';
// === Footer-Widgets registrieren ===
function minecraft_modern_footer_widgets() {
register_sidebar( array(
'name' => __( 'Footer Links', 'minecraft-modern-theme' ),
'id' => 'footer-left',
'description' => __( 'Widget-Bereich links im Footer.', 'minecraft-modern-theme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
) );
for ( $i = 1; $i <= 3; $i++ ) {
register_sidebar( array(
'name' => sprintf( __( 'Footer Spalte %d', 'minecraft-modern-theme' ), $i ),
'id' => 'footer-' . $i,
'description' => sprintf( __( 'Widget für die %d. Spalte im Footer.', 'minecraft-modern-theme' ), $i ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
) );
}
register_sidebar( array(
'name' => __( 'Footer Rechts', 'minecraft-modern-theme' ),
'id' => 'footer-right',
'description' => __( 'Widget-Bereich rechts im Footer.', 'minecraft-modern-theme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
) );
}
add_action( 'widgets_init', 'minecraft_modern_footer_widgets' );
// === FAQ Custom Post Type & Taxonomy ===
function create_faq_post_type() {
// Nur registrieren, wenn im Customizer aktiviert
if ( get_theme_mod( 'faq_enabled', true ) ) {
register_post_type('faq',
array(
'labels' => array(
'name' => __( 'FAQs', 'minecraft-modern-theme' ),
'singular_name' => __( 'FAQ', 'minecraft-modern-theme' ),
'add_new' => __( 'Neue FAQ hinzufügen', 'minecraft-modern-theme' ),
'add_new_item' => __( 'Neue FAQ hinzufügen', 'minecraft-modern-theme' ),
'edit_item' => __( 'FAQ bearbeiten', 'minecraft-modern-theme' ),
'new_item' => __( 'Neue FAQ', 'minecraft-modern-theme' ),
'view_item' => __( 'FAQ ansehen', 'minecraft-modern-theme' ),
'search_items' => __( 'FAQs durchsuchen', 'minecraft-modern-theme' ),
'not_found' => __( 'Keine FAQs gefunden', 'minecraft-modern-theme' ),
'not_found_in_trash' => __( 'Keine FAQs im Papierkorb gefunden', 'minecraft-modern-theme' ),
'all_items' => __( 'Alle FAQs', 'minecraft-modern-theme' ),
),
'public' => true,
'has_archive' => true, // Archiv-Seite /faq/ bleibt als Fallback
'menu_icon' => 'dashicons-format-chat',
'supports' => array( 'title', 'editor', 'page-attributes' ),
'rewrite' => array( 'slug' => 'faq' ),
'show_in_rest' => true,
)
);
register_taxonomy(
'faq_category',
'faq',
array(
'label' => __( 'FAQ Kategorien', 'minecraft-modern-theme' ),
'rewrite' => array( 'slug' => 'faq-kategorie' ),
'hierarchical' => true,
'show_in_rest' => true,
)
);
}
}
add_action('init', 'create_faq_post_type');
// =============================================================================
// NEU: Automatische FAQ-Seitenerstellung und Template-Zuweisung
// =============================================================================
/**
* Erstellt automatisch eine "FAQ" Seite, wenn die FAQ-Funktion aktiviert wird.
*/
function create_faq_page_automatically() {
// Prüfen, ob die FAQ-Funktion aktiv ist
if ( get_theme_mod( 'faq_enabled', true ) ) {
// Prüfen, ob die Seite bereits existiert
if ( get_page_by_title( 'FAQ' ) == null ) {
// Seite erstellen
$new_page = array(
'post_title' => 'FAQ',
'post_content' => 'Diese Seite zeigt alle FAQs an. Der Inhalt wird automatisch generiert.',
'post_status' => 'publish',
'post_type' => 'page',
'post_author' => 1,
);
// Seite in die Datenbank einfügen
wp_insert_post( $new_page );
}
}
}
// Diese Funktion wird ausgeführt, wenn der Customizer gespeichert wird.
add_action( 'customize_save_after', 'create_faq_page_automatically' );
/**
* Leitet Anfragen für die "FAQ" Seite auf unser spezielles Template um.
*/
function load_faq_page_template( $template ) {
// Prüfen, ob die FAQ-Funktion aktiv ist
if ( get_theme_mod( 'faq_enabled', true ) ) {
// Prüfen, ob wir uns auf einer Seite befinden
if ( is_page() ) {
global $post;
// Prüfen, ob der Titel der Seite "FAQ" ist
if ( $post && $post->post_title == 'FAQ' ) {
// Pfad zu unserem Template zurückgeben
return get_template_directory() . '/archive-faq.php';
}
}
}
// Standard-Template in allen anderen Fällen
return $template;
}
add_filter( 'template_include', 'load_faq_page_template' );

View File

@@ -0,0 +1,67 @@
<!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
// Zeigt das Logo an, wenn eines vorhanden ist.
if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
the_custom_logo();
}
?>
<?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() ) :
?>
<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>';
}
}
?>
</div>
</div>
</div>
</div>
</header>

View File

@@ -0,0 +1,29 @@
<?php get_header(); ?>
<main id="primary" class="site-main">
<div class="container">
<div class="content-area">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium_large'); ?></a>
</div>
<?php endif; ?>
<div class="post-content">
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post-excerpt">
<?php the_excerpt(); ?>
</div>
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<p><?php _e( 'Keine Beiträge gefunden.', 'minecraft-modern-theme' ); ?></p>
<?php endif; ?>
</div>
</div>
</main>
<?php get_footer(); ?>

View File

@@ -0,0 +1,20 @@
<?php get_header(); ?>
<main id="primary" class="site-main">
<div class="container">
<div class="content-area">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('page-content'); ?>>
<div class="page-content-inner">
<h1 class="page-title"><?php the_title(); ?></h1>
<div class="page-entry">
<?php the_content(); ?>
</div>
</div>
</article>
<?php endwhile; ?>
</div>
</div>
</main>
<?php get_footer(); ?>

View File

@@ -0,0 +1,19 @@
<?php get_header(); ?>
<div class="container site-main">
<div class="content-area">
<article id="post-<?php the_ID(); ?>" <?php post_class('post single-faq'); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
<a href="<?php echo get_post_type_archive_link('faq'); ?>" class="back-to-faq">&larr; <?php _e( 'Zurück zur Übersicht', 'minecraft-modern-theme' ); ?></a>
</header>
<div class="entry-content">
<?php the_content(); ?>
</div>
</article>
</div>
</div>
<?php get_footer(); ?>

View File

@@ -0,0 +1,20 @@
<?php get_header(); ?>
<main id="primary" class="site-main">
<div class="container">
<div class="content-area">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('post'); ?>>
<div class="post-content">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="post-entry">
<?php the_content(); ?>
</div>
</div>
</article>
<?php endwhile; ?>
</div>
</div>
</main>
<?php get_footer(); ?>

View File

@@ -0,0 +1,579 @@
/*
Theme Name: Minecraft Modern Theme
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.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
*/
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;700&display=swap');
/* === DARK / LIGHT MODE VARIABLEN === */
:root {
--bg-color: #14151a;
--surface-color: #1e2029;
--card-bg: #252830;
--text-color: #e4e4e4;
--text-muted: #a0a0a0;
--primary-accent: #00d4ff;
--header-bg: rgba(20, 21, 26, 0.8);
--header-scrolled-bg: #14151a;
--border-color: #333;
--header-height: 500px;
}
html.light-mode {
--bg-color: #f8f9fa;
--surface-color: #ffffff;
--card-bg: #ffffff;
--text-color: #212529;
--text-muted: #6c757d;
--header-bg: rgba(255, 255, 255, 0.95);
--header-scrolled-bg: #ffffff;
--border-color: #dee2e6;
}
/* Sanfte Übergänge */
body, .site-header, .site-footer, .post, .faq-item, .theme-toggle {
transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
/* === ALLGEMEINE STYLES & STICKY FOOTER SETUP === */
body {
font-family: 'Raleway', sans-serif;
background-color: var(--bg-color);
color: var(--text-color);
margin: 0;
line-height: 1.7;
}
/* WICHTIG: Dies sind die Regeln, die den Footer immer unten halten */
html { height: 100%; }
body {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.site-main {
flex: 1; /* Sorgt dafür, dass der Hauptinhalt den verfügbaren Platz ausfüllt */
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text-color); }
a { color: var(--primary-accent); text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
a:hover { color: #fff; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
/* === HEADER & NAVIGATION === */
.site-header {
background-color: var(--header-bg);
backdrop-filter: blur(10px);
padding: 15px 0;
position: sticky;
top: 0;
z-index: 1000;
transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
background-color: var(--header-scrolled-bg);
box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}
.header-main {
display: flex;
justify-content: space-between;
align-items: center;
}
.site-branding {
display: flex;
align-items: center;
gap: 15px;
}
.custom-logo-link img, .custom-logo {
max-height: 60px;
width: auto;
}
.site-branding h1, .site-title {
margin: 0;
font-size: 24px;
font-weight: 700;
}
.site-branding a {
color: var(--text-color);
text-decoration: none;
}
.main-navigation {
flex-grow: 1;
text-align: center;
}
.main-navigation ul {
list-style: none;
margin: 0;
padding: 0;
display: inline-flex;
gap: 30px;
}
.main-navigation a {
font-size: 15px;
font-weight: 600;
color: var(--text-muted);
padding: 5px 0;
transition: color 0.2s;
}
.main-navigation a:hover {
color: var(--primary-accent);
}
.header-info {
display: flex;
align-items: center;
gap: 20px;
}
.social-links {
display: flex;
gap: 15px;
}
.social-links a {
font-size: 18px;
color: var(--text-muted);
transition: color 0.2s;
}
.social-links a:hover {
color: var(--primary-accent);
}
/* === HERO / SLIDER === */
.hero-slider {
width: 100%;
height: var(--header-height);
position: relative;
}
.swiper-slide {
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
}
.swiper-slide::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 1;
}
.slider-content {
text-align: center;
color: #fff;
z-index: 2;
padding: 20px;
}
.slider-title {
font-size: 48px;
font-weight: 700;
margin-bottom: 20px;
text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.slider-subtitle {
font-size: 20px;
font-weight: 400;
}
.swiper-pagination-bullet { background: #fff; opacity: 0.5; }
.swiper-pagination-bullet-active { background: var(--primary-accent); opacity: 1; }
.swiper-button-prev, .swiper-button-next {
color: #fff;
background: rgba(0,0,0,0.3);
width: 44px;
height: 44px;
border-radius: 50%;
transition: background 0.2s;
}
.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; }
/* === Hauptinhalt & Karten-Layout === */
.site-main { padding: 80px 0; }
.content-area {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 30px;
}
.post, .page-content {
background-color: var(--card-bg);
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border-color);
transition: transform 0.3s ease, border-color 0.3s ease;
}
.post:hover, .page-content:hover {
transform: translateY(-5px);
border-color: var(--primary-accent);
box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.post-content, .page-content-inner { padding: 25px; }
.post-title, .page-title {
font-size: 20px;
margin-top: 0;
margin-bottom: 10px;
}
.post-title a, .page-title a {
color: var(--text-color);
}
.post-title a:hover, .page-title a:hover {
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 */
}
.site-footer {
line-height: 1.4;
font-size: 13px;
}
.footer-widgets-container {
/* Dieser Container ist jetzt nur noch ein Wrapper */
margin-bottom: 15px;
}
.footer-widgets {
/* <<< HIER IST DIE KORREKTE LÖSUNG: */
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 */
}
/* 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 {
font-size: 15px;
color: var(--primary-accent);
margin-bottom: 10px;
font-weight: 700;
}
.footer-navigation {
text-align: center;
padding: 10px 0;
border-top: 1px solid var(--border-color);
margin-bottom: 5px;
}
.footer-menu {
list-style: none;
margin: 0;
padding: 0;
display: inline-flex;
align-items: center;
gap: 15px;
}
.footer-menu a {
color: var(--text-muted);
font-weight: 400;
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-legal-links {
text-align: center;
margin-top: 10px;
font-size: 14px;
}
.footer-legal-links a {
color: #888;
text-decoration: none;
transition: color 0.3s ease;
}
.footer-legal-links a:hover { color: #ccc; }
/* === FAQ STYLING === */
.page-header {
text-align: center;
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 1px solid var(--border-color);
}
.page-header .page-title { font-size: 2.5rem; margin-bottom: 10px; }
.faq-category-title {
font-size: 1.5rem;
color: var(--primary-accent);
margin-top: 40px;
margin-bottom: 20px;
border-bottom: 2px solid var(--primary-accent);
padding-bottom: 5px;
display: none;
}
.faq-category-title:first-child { margin-top: 0; }
.faq-item {
background-color: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 8px;
margin-bottom: 15px;
overflow: hidden;
transition: border-color 0.3s ease;
}
.faq-item:hover { border-color: var(--primary-accent); }
.faq-question {
width: 100%;
background: none;
border: none;
padding: 20px;
font-size: 0.95rem;
font-weight: 600;
color: var(--text-color);
text-align: left;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background-color 0.2s ease;
}
.faq-question:hover { background-color: rgba(0, 212, 255, 0.05); }
.faq-question::after {
content: '+';
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-accent);
transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer {
padding: 0 20px;
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.faq-answer p { margin-bottom: 20px; font-size: 0.9rem; }
.faq-item.active .faq-answer {
padding: 0 20px 20px 20px;
max-height: 1000px;
transition: max-height 0.4s ease-in, padding 0.4s ease-in;
}
.single-faq .entry-content {
background-color: var(--card-bg);
padding: 30px;
border-radius: 8px;
border: 1px solid var(--border-color);
}
.back-to-faq {
display: inline-block;
margin-top: 15px;
font-size: 0.9rem;
color: var(--text-muted);
}
.back-to-faq:hover { color: var(--primary-accent); }
.faq-archive-container {
background-color: var(--card-bg);
border-radius: 8px;
border: 1px solid var(--border-color);
padding: 40px;
margin-bottom: 30px;
}
.faq-tabs {
list-style: none;
margin: 0 0 30px 0;
padding: 0;
display: flex;
border-bottom: 2px solid var(--border-color);
}
.faq-tabs li { margin-bottom: -2px; }
.faq-tab-button {
background: none;
border: none;
padding: 15px 25px;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-muted);
cursor: pointer;
border-bottom: 3px solid transparent;
transition: color 0.2s ease, border-color 0.2s ease;
}
.faq-tab-button:hover { color: var(--text-color); }
.faq-tab-button.active {
color: var(--primary-accent);
border-bottom-color: var(--primary-accent);
}
/* === NEUE FAQ TAB STYLING (FESTE HÖHE) === */
.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 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); }
/* === CUSTOMIZER & SONSTIGES === */
.hero-slider.slider-hide-arrows .swiper-button-next,
.hero-slider.slider-hide-arrows .swiper-button-prev {
opacity: 0 !important;
pointer-events: none !important;
transition: opacity 0.3s ease;
}
.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;
}
.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 {
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; }
}