fixes
This commit is contained in:
parent
46f7d34caa
commit
544c416c88
3 changed files with 117 additions and 6 deletions
2
files/bulma.css
vendored
2
files/bulma.css
vendored
|
|
@ -7836,7 +7836,7 @@ html.has-navbar-fixed-bottom {
|
||||||
color: #4a4a4a;
|
color: #4a4a4a;
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
padding: .5rem .75rem;
|
padding: .5rem 1.2rem;
|
||||||
position: relative
|
position: relative
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
119
index.php
119
index.php
|
|
@ -29,12 +29,123 @@
|
||||||
role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
|
role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
|
||||||
data-target="signalNavbar"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span
|
data-target="signalNavbar"> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span
|
||||||
aria-hidden="true"></span> </a></div>
|
aria-hidden="true"></span> </a></div>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
class Nav_Primary_Walker extends Walker_Nav_Menu {
|
||||||
|
|
||||||
|
|
||||||
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
|
$indent = str_repeat("\t", $depth);
|
||||||
|
$output .= "\n$indent\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
|
$indent = str_repeat("\t", $depth);
|
||||||
|
$output .= "$indent\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||||
|
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||||
|
|
||||||
|
$class_names = $value = '';
|
||||||
|
|
||||||
|
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||||
|
$classes[] = 'menu-item-' . $item->ID;
|
||||||
|
|
||||||
|
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||||
|
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||||
|
|
||||||
|
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||||
|
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||||
|
|
||||||
|
$output .= $indent . '';
|
||||||
|
|
||||||
|
$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
|
||||||
|
|
||||||
|
$item_output = $args->before;
|
||||||
|
$item_output .= '<a class="navbar-item" '. $attributes .'>';
|
||||||
|
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
|
||||||
|
$item_output .= '</a>';
|
||||||
|
$item_output .= $args->after;
|
||||||
|
|
||||||
|
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function end_el( &$output, $item, $depth = 0, $args = array() ) {
|
||||||
|
$output .= "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nav_Secondary_Walker extends Walker_Nav_Menu {
|
||||||
|
|
||||||
|
|
||||||
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
|
$indent = str_repeat("\t", $depth);
|
||||||
|
$output .= "\n$indent\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
|
$indent = str_repeat("\t", $depth);
|
||||||
|
$output .= "$indent\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||||
|
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||||
|
|
||||||
|
$class_names = $value = '';
|
||||||
|
|
||||||
|
$classes = empty( $item->classes ) ? array() : (array) $item->classes;
|
||||||
|
$classes[] = 'menu-item-' . $item->ID;
|
||||||
|
|
||||||
|
$class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item, $args ) );
|
||||||
|
$class_names = $class_names ? ' class="' . esc_attr( $class_names ) . '"' : '';
|
||||||
|
|
||||||
|
$id = apply_filters( 'nav_menu_item_id', 'menu-item-'. $item->ID, $item, $args );
|
||||||
|
$id = $id ? ' id="' . esc_attr( $id ) . '"' : '';
|
||||||
|
|
||||||
|
$output .= $indent . '';
|
||||||
|
|
||||||
|
$attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : '';
|
||||||
|
$attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : '';
|
||||||
|
|
||||||
|
$item_output = $args->before;
|
||||||
|
$item_output .= '<a class="navbar-item rentButton" '. $attributes .'>';
|
||||||
|
$item_output .= $args->link_before . apply_filters( 'the_title', $item->title, $item->ID ) . $args->link_after;
|
||||||
|
$item_output .= '</a>';
|
||||||
|
$item_output .= $args->after;
|
||||||
|
|
||||||
|
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function end_el( &$output, $item, $depth = 0, $args = array() ) {
|
||||||
|
$output .= "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
<div id="mainNavbar" class="navbar-menu">
|
<div id="mainNavbar" class="navbar-menu">
|
||||||
<div class="navbar-end">
|
<div class="navbar-end">
|
||||||
<a class="navbar-item" href="#sauna">Die Sauna</a>
|
<?php
|
||||||
<a class="navbar-item" href="#features">Features</a>
|
wp_nav_menu( array(
|
||||||
<a class="navbar-item" href="#story">Hintergründe</a>
|
'menu' => 'primary',
|
||||||
<a class="navbar-item rentButton" href="#rent">Anfragen</a>
|
'container' => false,
|
||||||
|
'items_wrap' => '%3$s',
|
||||||
|
'walker' => new Nav_Primary_Walker(),
|
||||||
|
) );
|
||||||
|
wp_nav_menu( array(
|
||||||
|
'menu' => 'secondary',
|
||||||
|
'container' => false,
|
||||||
|
'items_wrap' => '%3$s',
|
||||||
|
'walker' => new Nav_Secondary_Walker(),
|
||||||
|
) );
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ a.no-underline {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media screen and (max-width: 1024px) {
|
||||||
.rentButton {
|
.rentButton {
|
||||||
margin: 5px 10px;
|
margin: 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue