further work on menu and posts

This commit is contained in:
Jonas Heinrich 2020-04-18 19:00:49 +02:00
parent 35b5df405b
commit 98714265b1
3 changed files with 32 additions and 9 deletions

View file

@ -34,8 +34,6 @@ class kit_custom_main_menu extends Walker_Nav_Menu {
<section class="nav-second-level mega-flyout" style=""> <section class="nav-second-level mega-flyout" style="">
<div class="content-wrap"> <div class="content-wrap">
<div class="container container-3-cols"> <div class="container container-3-cols">
<div class="column">
<div class="nav-second-level-group">
' . "\n"; ' . "\n";
} else { } else {
$output .= "\n" . $indent . '<ul>' . "\n"; $output .= "\n" . $indent . '<ul>' . "\n";
@ -55,8 +53,6 @@ class kit_custom_main_menu extends Walker_Nav_Menu {
// build html // build html
if ($display_depth == 1) { if ($display_depth == 1) {
$output .= "\n" . $indent . ' $output .= "\n" . $indent . '
</div>
</div>
</div> </div>
</div> </div>
</section>' . "\n"; </section>' . "\n";
@ -76,6 +72,8 @@ class kit_custom_main_menu extends Walker_Nav_Menu {
if ($depth == 1) { if ($depth == 1) {
$output .= ' $output .= '
<div class="column">
<div class="nav-second-level-group">
<a class="nav-second-level-group-headline" href="' . $permalink . '"> <a class="nav-second-level-group-headline" href="' . $permalink . '">
<div class="icon"></div> <div class="icon"></div>
<span> <span>
@ -84,9 +82,9 @@ class kit_custom_main_menu extends Walker_Nav_Menu {
$output .= ' $output .= '
</span> </span>
</a> </a>
<div class="nav-second-level-opener"> <div class="nav-second-level-opener">
<span>Untermenu öffnen / schließen</span> <span>Untermenu öffnen / schließen</span>
</div>'; </div>';
} else { } else {
$output .= "<li class='" . implode(" ", $item->classes) . "'>"; $output .= "<li class='" . implode(" ", $item->classes) . "'>";
$output .= '<div class="nav-first-level-opener"> $output .= '<div class="nav-first-level-opener">
@ -106,6 +104,9 @@ class kit_custom_main_menu extends Walker_Nav_Menu {
$permalink = $item->url; $permalink = $item->url;
if ($depth == 1) { if ($depth == 1) {
$output .= '
</div>
</div>';
} else { } else {
$output .= '</li>'; $output .= '</li>';
} }
@ -214,7 +215,11 @@ function kit_customize_css()
} }
h2::after { h2::after {
background-color: <?php echo get_theme_mod('theme_color', '#009982'); ?>; background-color: <?php echo get_theme_mod('theme_color', '#009982'); ?>;
}
.page-category-marker {
background-color: <?php echo get_theme_mod('theme_color', '#009982'); ?>;
} }
</style> </style>

View file

@ -1356,6 +1356,7 @@ aside .aside-icon:hover {
.intro-element .content-wrap h2, .intro-element .content-wrap h2,
.intro-element .content-wrap .h2 { .intro-element .content-wrap .h2 {
color: #ffffff; color: #ffffff;
text-shadow: 1px 1px 3px black;
} }
.intro-element .video-loop { .intro-element .video-loop {
@ -3371,7 +3372,6 @@ body.page-theme-color-quaternary .tab-navigation-item.active > div::after {
line-height: 0.83333rem; line-height: 0.83333rem;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .2px; letter-spacing: .2px;
background-color: #009982;
transition: background-color .3s; transition: background-color .3s;
} }

View file

@ -1,3 +1,14 @@
<?php
$kit_categories = get_the_category();
//get name of first category
$kit_category_name = $kit_categories[0]->name;
//get category url
$kit_category_url = get_category_link( $kit_categories[0]->term_id );
?>
<section class="full-width background-color-page-theme" id="c3318"> <section class="full-width background-color-page-theme" id="c3318">
<?php if ( has_post_thumbnail() ) { ?> <?php if ( has_post_thumbnail() ) { ?>
@ -6,6 +17,13 @@
<div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(/fileadmin/user_upload/00_Startseite/20191216-CN-02-251_Homepage.jpg);"> <div class="intro-element align-center background-color-page-theme-contrast" style="background-image: url(/fileadmin/user_upload/00_Startseite/20191216-CN-02-251_Homepage.jpg);">
<?php } ?> <?php } ?>
<div class="content-wrap"> <div class="content-wrap">
<?php if ( has_category() ) { ?>
<a href="<?php echo esc_url( $kit_category_url ); ?>" class="page-category-marker">
<span>
<?php echo esc_html( $kit_category_name ); ?>
</span>
</a>
<?php } ?>
<?php the_title( '<h1>', '</h1>' ); ?> <?php the_title( '<h1>', '</h1>' ); ?>
</div> </div>
</div> </div>