Upload via GUI (3 Dateien)
This commit is contained in:
@@ -1,37 +1,21 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
// Exit if accessed directly.
|
* Minecraft Modern Theme Child.
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
*
|
||||||
exit;
|
* Das Parent-Theme lädt seine eigene style.css und – bei aktivem Child-Theme –
|
||||||
}
|
* automatisch auch die style.css dieses Child-Themes (Handle
|
||||||
|
* "minecraft-modern-child-style"). Hier muss deshalb nichts mehr eingebunden
|
||||||
/**
|
* werden; eigene Anpassungen gehören in style.css oder als Hooks in diese Datei.
|
||||||
* =============================================================================
|
*
|
||||||
* HAUPTFUNKTION: Stylesheets korrekt laden
|
* Templates nur dann hierher kopieren, wenn sie sich wirklich unterscheiden
|
||||||
* =============================================================================
|
* sollen – jede Kopie bekommt Fehlerbehebungen des Parent-Themes nicht mehr mit.
|
||||||
*/
|
*/
|
||||||
function minecraft_modern_child_enqueue_styles() {
|
|
||||||
$parent_style = 'minecraft-modern-style';
|
// Exit if accessed directly.
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
// Cache-Busting über filemtime() statt der statischen Theme-Version:
|
exit;
|
||||||
// sonst liefern Browser nach einer CSS-Änderung weiter die alte Datei aus.
|
}
|
||||||
wp_enqueue_style(
|
|
||||||
$parent_style,
|
// Überschrift auf der FAQ-Seite anzeigen. Ersetzt die frühere Kopie von
|
||||||
get_template_directory_uri() . '/style.css',
|
// archive-faq.php, die sich nur durch diese eine Zeile vom Parent unterschied.
|
||||||
array(),
|
add_filter( 'mm_faq_show_title', '__return_true' );
|
||||||
filemtime( get_template_directory() . '/style.css' )
|
|
||||||
);
|
|
||||||
|
|
||||||
wp_enqueue_style(
|
|
||||||
'minecraft-modern-child-style',
|
|
||||||
get_stylesheet_directory_uri() . '/style.css',
|
|
||||||
array( $parent_style ),
|
|
||||||
filemtime( get_stylesheet_directory() . '/style.css' )
|
|
||||||
);
|
|
||||||
|
|
||||||
// BUG-FIX: Der Nav-Fix-CSS für .submenu-toggle (Desktop-Ausblendung) stand
|
|
||||||
// bereits vollständig in child/style.css. Das wp_add_inline_style() hier
|
|
||||||
// hat exakt denselben CSS-Block ein zweites Mal in den <head> injiziert.
|
|
||||||
// Entfernt – style.css ist die einzige Quelle der Wahrheit.
|
|
||||||
}
|
|
||||||
add_action( 'wp_enqueue_scripts', 'minecraft_modern_child_enqueue_styles' );
|
|
||||||
|
|||||||
@@ -1,171 +1,171 @@
|
|||||||
/*
|
/*
|
||||||
Theme Name: Minecraft Modern Theme Child
|
Theme Name: Minecraft Modern Theme Child
|
||||||
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||||
Description: Ein Child Theme für das Minecraft Modern Theme.
|
Description: Ein Child Theme für das Minecraft Modern Theme.
|
||||||
Author: M_Viper
|
Author: M_Viper
|
||||||
Author URI: https://M-Viper.de
|
Author URI: https://M-Viper.de
|
||||||
Template: Minecraft-Modern-Theme
|
Template: Minecraft-Modern-Theme
|
||||||
Version: 1.1.1
|
Version: 1.2.0
|
||||||
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-child
|
Text Domain: minecraft-modern-theme-child
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
SIDEBAR FLYOUT: Sichtbarkeit
|
SIDEBAR FLYOUT: Sichtbarkeit
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
|
|
||||||
/* Standardmäßig versteckt aber NICHT display:none damit
|
/* Standardmäßig versteckt aber NICHT display:none damit
|
||||||
getBoundingClientRect() korrekte Werte liefert */
|
getBoundingClientRect() korrekte Werte liefert */
|
||||||
.header-sidebar .sub-menu {
|
.header-sidebar .sub-menu {
|
||||||
opacity: 0 !important;
|
opacity: 0 !important;
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
transition: opacity 0.15s ease !important;
|
transition: opacity 0.15s ease !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sichtbar wenn li gehoverd oder flyout-open gesetzt */
|
/* Sichtbar wenn li gehoverd oder flyout-open gesetzt */
|
||||||
.header-sidebar .primary-menu > li.menu-item-has-children:hover > .sub-menu,
|
.header-sidebar .primary-menu > li.menu-item-has-children:hover > .sub-menu,
|
||||||
.header-sidebar .primary-menu > li.menu-item-has-children.flyout-open > .sub-menu,
|
.header-sidebar .primary-menu > li.menu-item-has-children.flyout-open > .sub-menu,
|
||||||
.header-sidebar .menu-item.active > .sub-menu {
|
.header-sidebar .menu-item.active > .sub-menu {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
pointer-events: auto !important;
|
pointer-events: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
FAQ TABS
|
FAQ TABS
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
.faq-tab-content-container { display: grid; }
|
.faq-tab-content-container { display: grid; }
|
||||||
.faq-tab-pane {
|
.faq-tab-pane {
|
||||||
grid-area: 1 / 1 / 2 / 2;
|
grid-area: 1 / 1 / 2 / 2;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: opacity 0.4s ease-in-out;
|
transition: opacity 0.4s ease-in-out;
|
||||||
}
|
}
|
||||||
.faq-tab-pane.active { opacity: 1; pointer-events: auto; }
|
.faq-tab-pane.active { opacity: 1; pointer-events: auto; }
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
SLIDER
|
SLIDER
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
.hero-slider { opacity: 0; transition: opacity 0.4s ease-in-out; }
|
.hero-slider { opacity: 0; transition: opacity 0.4s ease-in-out; }
|
||||||
.hero-slider.swiper-initialized { opacity: 1; }
|
.hero-slider.swiper-initialized { opacity: 1; }
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
NAVIGATION: submenu-toggle auf Desktop nur für Classic/Centered/Mega
|
NAVIGATION: submenu-toggle auf Desktop nur für Classic/Centered/Mega
|
||||||
ausblenden — Sidebar-Layout braucht den Button
|
ausblenden — Sidebar-Layout braucht den Button
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
@media (min-width: 993px) {
|
@media (min-width: 993px) {
|
||||||
.site-header--classic .submenu-toggle,
|
.site-header--classic .submenu-toggle,
|
||||||
.site-header--centered .submenu-toggle,
|
.site-header--centered .submenu-toggle,
|
||||||
.site-header--mega .submenu-toggle {
|
.site-header--mega .submenu-toggle {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
height: 0 !important;
|
height: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
.submenu-toggle {
|
.submenu-toggle {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
.menu-item-has-children.active > .submenu-toggle i {
|
.menu-item-has-children.active > .submenu-toggle i {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
}/*
|
}/*
|
||||||
Theme Name: Minecraft Modern Theme Child
|
Theme Name: Minecraft Modern Theme Child
|
||||||
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
Theme URI: https://git.viper.ipv64.net/M_Viper/Minecraft-Modern-Theme
|
||||||
Description: Ein Child Theme für das Minecraft Modern Theme.
|
Description: Ein Child Theme für das Minecraft Modern Theme.
|
||||||
Author: M_Viper
|
Author: M_Viper
|
||||||
Author URI: https://M-Viper.de
|
Author URI: https://M-Viper.de
|
||||||
Template: Minecraft-Modern-Theme
|
Template: Minecraft-Modern-Theme
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
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-child
|
Text Domain: minecraft-modern-theme-child
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
SIDEBAR FLYOUT: Sichtbarkeit
|
SIDEBAR FLYOUT: Sichtbarkeit
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
|
|
||||||
/* Standardmäßig versteckt aber NICHT display:none damit
|
/* Standardmäßig versteckt aber NICHT display:none damit
|
||||||
getBoundingClientRect() korrekte Werte liefert */
|
getBoundingClientRect() korrekte Werte liefert */
|
||||||
.header-sidebar .sub-menu {
|
.header-sidebar .sub-menu {
|
||||||
opacity: 0 !important;
|
opacity: 0 !important;
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
transition: opacity 0.15s ease !important;
|
transition: opacity 0.15s ease !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sichtbar wenn li gehoverd oder flyout-open gesetzt */
|
/* Sichtbar wenn li gehoverd oder flyout-open gesetzt */
|
||||||
.header-sidebar .primary-menu > li.menu-item-has-children:hover > .sub-menu,
|
.header-sidebar .primary-menu > li.menu-item-has-children:hover > .sub-menu,
|
||||||
.header-sidebar .primary-menu > li.menu-item-has-children.flyout-open > .sub-menu,
|
.header-sidebar .primary-menu > li.menu-item-has-children.flyout-open > .sub-menu,
|
||||||
.header-sidebar .menu-item.active > .sub-menu {
|
.header-sidebar .menu-item.active > .sub-menu {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
pointer-events: auto !important;
|
pointer-events: auto !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
FAQ TABS
|
FAQ TABS
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
.faq-tab-content-container { display: grid; }
|
.faq-tab-content-container { display: grid; }
|
||||||
.faq-tab-pane {
|
.faq-tab-pane {
|
||||||
grid-area: 1 / 1 / 2 / 2;
|
grid-area: 1 / 1 / 2 / 2;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: opacity 0.4s ease-in-out;
|
transition: opacity 0.4s ease-in-out;
|
||||||
}
|
}
|
||||||
.faq-tab-pane.active { opacity: 1; pointer-events: auto; }
|
.faq-tab-pane.active { opacity: 1; pointer-events: auto; }
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
SLIDER
|
SLIDER
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
.hero-slider { opacity: 0; transition: opacity 0.4s ease-in-out; }
|
.hero-slider { opacity: 0; transition: opacity 0.4s ease-in-out; }
|
||||||
.hero-slider.swiper-initialized { opacity: 1; }
|
.hero-slider.swiper-initialized { opacity: 1; }
|
||||||
|
|
||||||
/* ===================================================================
|
/* ===================================================================
|
||||||
NAVIGATION: submenu-toggle auf Desktop nur für Classic/Centered/Mega
|
NAVIGATION: submenu-toggle auf Desktop nur für Classic/Centered/Mega
|
||||||
ausblenden — Sidebar-Layout braucht den Button
|
ausblenden — Sidebar-Layout braucht den Button
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
@media (min-width: 993px) {
|
@media (min-width: 993px) {
|
||||||
.site-header--classic .submenu-toggle,
|
.site-header--classic .submenu-toggle,
|
||||||
.site-header--centered .submenu-toggle,
|
.site-header--centered .submenu-toggle,
|
||||||
.site-header--mega .submenu-toggle {
|
.site-header--mega .submenu-toggle {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
width: 0 !important;
|
width: 0 !important;
|
||||||
height: 0 !important;
|
height: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
pointer-events: none !important;
|
pointer-events: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 992px) {
|
@media (max-width: 992px) {
|
||||||
.submenu-toggle {
|
.submenu-toggle {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
.menu-item-has-children.active > .submenu-toggle i {
|
.menu-item-has-children.active > .submenu-toggle i {
|
||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user